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

Panic when window is closed and login required #158

Open
baznikin opened this issue Aug 27, 2024 · 0 comments
Open

Panic when window is closed and login required #158

baznikin opened this issue Aug 27, 2024 · 0 comments

Comments

@baznikin
Copy link

I am testing session expiring on new headscale/tailscale installation. I waited until my session expired, client disconnected and try to connect.

If app window is opened - no crash, dialog "Login required - Open browser to authenticate with Tailscale" pops up.
If app window is closed and connect via tray icon - app crashed, see backtrace below.

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:
		github.com/diamondburned/gotk4/pkg/glib/v2.IdleAdd at github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:33679
		deedles.dev/trayscale/internal/ui.(*App).initTray at deedles.dev/trayscale/internal/ui/app.go:337
		deedles.dev/trayscale/internal/ui.(*App).initSettings.func2 at deedles.dev/trayscale/internal/ui/settings.go:42
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x19aba0a]

goroutine 1 [running, locked to thread]:
github.com/diamondburned/gotk4/pkg/core/closure.(*FuncStack).Panicf(0xc0004ca300, {0x1f45128, 0x1b}, {0xc000051778, 0x1, 0x1})
	github.com/diamondburned/gotk4/[email protected]/core/closure/funcstack.go:104 +0x908
github.com/diamondburned/gotk4/pkg/core/closure.(*FuncStack).TryRepanic(0xc0004ca300)
	github.com/diamondburned/gotk4/[email protected]/core/closure/funcstack.go:122 +0xbc
panic({0x1c3c160?, 0x3981ec0?})
	runtime/panic.go:785 +0x132
deedles.dev/trayscale/internal/ui.Confirmation.Show({{0x1f34281, 0xe}, {0x1f598de, 0x2e}, {0x1f331c3, 0xd}, {0x1f2cf8c, 0x7}}, 0x21b9e08?, 0xc00016c000)
	deedles.dev/trayscale/internal/ui/dialogs.go:16 +0x4a
deedles.dev/trayscale/internal/ui.(*App).startTS(0xc0000b86c0, {0x21be8d0, 0xc000320070})
	deedles.dev/trayscale/internal/ui/app.go:231 +0x210
deedles.dev/trayscale/internal/ui.(*App).initTray.func1()
	deedles.dev/trayscale/internal/ui/app.go:346 +0xa3
github.com/diamondburned/gotk4/pkg/core/glib._gotk4_sourceFunc(0x1021)
	github.com/diamondburned/gotk4/[email protected]/core/glib/glib.go:352 +0xd9
github.com/diamondburned/gotk4/pkg/gio/v2._Cfunc_g_application_run(0x5a5fed0, 0x1, 0x5cdbd50)
	_cgo_gotypes.go:14091 +0x4b
github.com/diamondburned/gotk4/pkg/gio/v2.(*Application).Run.func3(0x5a5fed0, 0x1, 0x5cdbd50)
	github.com/diamondburned/gotk4/[email protected]/gio/v2/gio.go:42200 +0x67
github.com/diamondburned/gotk4/pkg/gio/v2.(*Application).Run(0xc00022d140, {0xc0000360a0, 0x1, 0x1})
	github.com/diamondburned/gotk4/[email protected]/gio/v2/gio.go:42200 +0x1f1
deedles.dev/trayscale/internal/ui.(*App).Run(0xc0000b86c0, {0x21be9e8?, 0xc000265000?})
	deedles.dev/trayscale/internal/ui/app.go:411 +0x2df
main.main()
	deedles.dev/trayscale/cmd/trayscale/trayscale.go:49 +0xae
@baznikin baznikin changed the title Panic when requesting connect and login required Panic when window is closed and login required Aug 27, 2024
Repository owner deleted a comment Aug 27, 2024
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

2 participants
@baznikin and others