Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Walker fails with memory error #265

Closed
arthsmn opened this issue Feb 28, 2025 · 7 comments
Closed

Walker fails with memory error #265

arthsmn opened this issue Feb 28, 2025 · 7 comments

Comments

@arthsmn
Copy link

arthsmn commented Feb 28, 2025

Describe the bug
Can't open walker.

Version
0.12.15

Minimal Config
No config.

To Reproduce
Try opening it.

Expected behavior
It should open.

Screenshots
N/A.

Desktop

  • OS: NixOS
  • DE: Niri

Additional context
Using the hardened NixOS profile, maybe the scudo allocator is the source of the problem?

Logs:

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: closure error: unexpected panic caught: runtime error: invalid memory address or nil pointer dereference
	
	Closure added at:
		main.main at ./walker.go:173
		runtime.main at runtime/proc.go:272
		runtime.goexit at runtime/asm_amd64.s:1700 [recovered]
	panic: closure error: unexpected panic caught: runtime error: invalid memory address or nil pointer dereference
	
	Closure added at:
		main.main at ./walker.go:173
		runtime.main at runtime/proc.go:272
		runtime.goexit at runtime/asm_amd64.s:1700
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6f9373]

goroutine 1 [running, locked to thread]:
github.com/diamondburned/gotk4/pkg/core/closure.(*FuncStack).TryRepanic(0xc00023a0f0)
	github.com/diamondburned/gotk4/[email protected]/core/closure/funcstack.go:118 +0xe6
panic({0xc11140?, 0xc00013c9b0?})
	runtime/panic.go:785 +0x132
github.com/diamondburned/gotk4/pkg/core/closure.(*FuncStack).Panicf(0xc00023a090, {0xe7a46e, 0x1b}, {0xc000052818, 0x1, 0x1})
	github.com/diamondburned/gotk4/[email protected]/core/closure/funcstack.go:104 +0x908
github.com/diamondburned/gotk4/pkg/core/closure.(*FuncStack).TryRepanic(0xc00023a090)
	github.com/diamondburned/gotk4/[email protected]/core/closure/funcstack.go:122 +0xbc
panic({0xc66dc0?, 0x175f490?})
	runtime/panic.go:785 +0x132
github.com/knadh/koanf/v2.(*Koanf).Raw(...)
	github.com/knadh/koanf/[email protected]/koanf.go:156
github.com/knadh/koanf/v2.(*Koanf).Merge(0xc000052a88, 0x6?)
	github.com/knadh/koanf/[email protected]/koanf.go:202 +0x13
github.com/abenz1267/walker/internal/config.Get({0xc00009a720?, 0x1?})
	github.com/abenz1267/walker/internal/config/config.go:463 +0x1a8
github.com/abenz1267/walker/internal/ui.Activate.func1(0xc000229d58)
	github.com/abenz1267/walker/internal/ui/ui.go:115 +0xd9
reflect.Value.call({0xc13f80?, 0x1145e68?, 0x572fd1?}, {0xe69732, 0x4}, {0xc000229d40, 0x1, 0xc00009a4c0?})
	reflect/value.go:581 +0xca6
reflect.Value.Call({0xc13f80?, 0x1145e68?, 0xdecb80?}, {0xc000229d40?, 0x11482f8?, 0x7c236cd38dc0?})
	reflect/value.go:365 +0xb9
github.com/diamondburned/gotk4/pkg/core/glib._gotk4_goMarshal(0x7c036cd240e0, 0x0, 0x1, 0x7fff0d4c0a20, 0xc000053578?, 0x7cc36cd24ac0)
	github.com/diamondburned/gotk4/[email protected]/core/glib/glib.go:306 +0x978
github.com/diamondburned/gotk4/pkg/gio/v2._Cfunc_g_application_activate(0x7cc36cd24ac0)
	_cgo_gotypes.go:13549 +0x3f
github.com/diamondburned/gotk4/pkg/gio/v2.(*Application).Activate.func1(0x7cc36cd24ac0)
	github.com/diamondburned/gotk4/[email protected]/gio/v2/gio.go:41449 +0x34
github.com/diamondburned/gotk4/pkg/gio/v2.(*Application).Activate(0xc000229d10)
	github.com/diamondburned/gotk4/[email protected]/gio/v2/gio.go:41449 +0x37
main.main.func3(0xc000288170)
	./walker.go:267 +0x91d
github.com/diamondburned/gotk4/pkg/gio/v2._gotk4_gio2_Application_ConnectCommandLine(0xc000053938?, 0x7c236cd69150, 0x0?)
	github.com/diamondburned/gotk4/[email protected]/gio/v2/gio_export.go:1841 +0x102
github.com/diamondburned/gotk4/pkg/gio/v2._Cfunc_g_application_run(0x7cc36cd24ac0, 0x1, 0x7bd36cd3a5f0)
	_cgo_gotypes.go:14100 +0x4b
github.com/diamondburned/gotk4/pkg/gio/v2.(*Application).Run.func3(0x7cc36cd24ac0, 0x1, 0x7bd36cd3a5f0)
	github.com/diamondburned/gotk4/[email protected]/gio/v2/gio.go:42200 +0x67
github.com/diamondburned/gotk4/pkg/gio/v2.(*Application).Run(0xc000229d10, {0xc0000241b0, 0x1, 0x1})
	github.com/diamondburned/gotk4/[email protected]/gio/v2/gio.go:42200 +0x1f1
main.main()
	./walker.go:303 +0x7f6
@arthsmn arthsmn changed the title Walker fails with segfault Walker fails with memory error Feb 28, 2025
@jwldr
Copy link

jwldr commented Mar 1, 2025

Got a similar error, which disappeared after creating a default config via walker -C.

@abenz1267
Copy link
Owner

Is this a problem with the nix flake or package or whatever? I have no hands in there. Walker expects a default config in /etc/xdg/walker or a user-config in ~/.config/walker. The user-config will not be autogenerated.

@arthsmn
Copy link
Author

arthsmn commented Mar 1, 2025

Is this a problem with the nix flake or package or whatever? I have no hands in there. Walker expects a default config in /etc/xdg/walker or a user-config in ~/.config/walker. The user-config will not be autogenerated.

Wouldn't it be better if walker worked without a config? This behavior is confusing and unintuitive.

@KMohZaid
Copy link

Got a similar error, which disappeared after creating a default config via walker -C.

true, thanks for help

@danielnehrig
Copy link

anyways the proper way would be to validate if the required configuration exists and if not print out a notification maybe its worth a pr

@KMohZaid
Copy link

anyways the proper way would be to validate if the required configuration exists and if not print out a notification maybe its worth a pr

yes, it should check if config file exists or not before doing anything and use a default values for variable

@abenz1267
Copy link
Owner

fixed. will print out an error now without config folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants