~zentauro


#398 nil pointer derefence 4 months ago

Comment by ~zentauro on ~sircmpwn/aerc2

I am not sure if this is related, but I also got the following error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x8c9d96]

goroutine 1 [running]:
git.sr.ht/~sircmpwn/aerc/widgets.(*DirectoryList).NextPrev(0x0, 0x1)
	/home/zentauro/.cache/yay/aerc/src/aerc-0.4.0/widgets/dirlist.go:263 +0x26
git.sr.ht/~sircmpwn/aerc/commands/account.NextPrevFolder.Execute(0xc00014c4d0, 0xc00027a740, 0x1, 0x1, 0x0, 0xc0001b7530)
	/home/zentauro/.cache/yay/aerc/src/aerc-0.4.0/commands/account/next-folder.go:46 +0xb1
git.sr.ht/~sircmpwn/aerc/commands.(*Commands).ExecuteCommand(0xc00012a180, 0xc00014c4d0, 0xc00027a740, 0x1, 0x1, 0xc000110050, 0xaefe01)
	/home/zentauro/.cache/yay/aerc/src/aerc-0.4.0/commands/commands.go:66 +0xa7
main.execCommand(0xc00014c4d0, 0xc0000940f0, 0xc00027a740, 0x1, 0x1, 0xc00027a740, 0xc000309d40)
	/home/zentauro/.cache/yay/aerc/src/aerc-0.4.0/aerc.go:59 +0xc7
main.main.func2(0xc00027a740, 0x1, 0x1, 0x1, 0x1)
	/home/zentauro/.cache/yay/aerc/src/aerc-0.4.0/aerc.go:155 +0x57
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).BeginExCommand.func1(0xc000314fe0, 0xb)
	/home/zentauro/.cache/yay/aerc/src/aerc-0.4.0/widgets/aerc.go:421 +0x83
git.sr.ht/~sircmpwn/aerc/widgets.(*ExLine).Event(0xc000661f80, 0xaf0640, 0xc0002655c0, 0xc0002655c0)
	/home/zentauro/.cache/yay/aerc/src/aerc-0.4.0/widgets/exline.go:79 +0x131
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event(0xc00014c4d0, 0xaf0640, 0xc0002655c0, 0x95c301)
	/home/zentauro/.cache/yay/aerc/src/aerc-0.4.0/widgets/aerc.go:220 +0x4c6
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).simulate(0xc00014c4d0, 0xc000127000, 0xd, 0x10)
	/home/zentauro/.cache/yay/aerc/src/aerc-0.4.0/widgets/aerc.go:209 +0x8d
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event(0xc00014c4d0, 0xaf0640, 0xc000265400, 0x98b060)
	/home/zentauro/.cache/yay/aerc/src/aerc-0.4.0/widgets/aerc.go:236 +0x3f7
git.sr.ht/~sircmpwn/aerc/lib/ui.(*UI).Tick(0xc0000940f0, 0xc00009a000)
	/home/zentauro/.cache/yay/aerc/src/aerc-0.4.0/lib/ui/ui.go:98 +0x190
main.main()
	/home/zentauro/.cache/yay/aerc/src/aerc-0.4.0/aerc.go:192 +0x672

#398 nil pointer derefence 4 months ago

Ticket created by ~zentauro on ~sircmpwn/aerc2

If I change tabs, then switch folders and quit I get a nil pointer dereference.

I've been able to reproduce it a couple of times and this is the stacktrace:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8c0ffa]

goroutine 1 [running]:
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).CloseBackends(0xc0000d64d0, 0xc00019a501, 0x0)
	/home/zentauro/.cache/yay/aerc/src/aerc-0.4.0/widgets/aerc.go:525 +0xca
main.main()
	/home/zentauro/.cache/yay/aerc/src/aerc-0.4.0/aerc.go:197 +0x703