~sircmpwn/aerc2#255: 
panic when completing directories

aerc crashes when I tried to autocomplete the command :mv Ar<tab> with the following error:

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

goroutine 1 [running]:
git.sr.ht/~sircmpwn/aerc/widgets.(*AccountView).Directories(...)
	/Users/jelle/src/aerc/widgets/account.go:157
git.sr.ht/~sircmpwn/aerc/commands.GetFolders(0xc0001ce000, 0xc0000ae3d0, 0x1, 0x1, 0xc0000d0ed8, 0xc0000ae3c0, 0xc0000d0e90)
	/Users/jelle/src/aerc/commands/commands.go:127 +0x1ce
git.sr.ht/~sircmpwn/aerc/commands/msg.Move.Complete(...)
	/Users/jelle/src/aerc/commands/msg/move.go:26
git.sr.ht/~sircmpwn/aerc/commands.(*Commands).GetCompletions(0xc000010188, 0xc0001ce000, 0xc0003020b8, 0x5, 0x0, 0x0, 0x0)
	/Users/jelle/src/aerc/commands/commands.go:86 +0x12e
main.getCompletions(0xc0001ce000, 0xc0003020b8, 0x5, 0x8, 0x7200979bf8, 0x4)
	/Users/jelle/src/aerc/aerc.go:80 +0x15d
main.main.func2(0xc0003020b8, 0x5, 0x4, 0xc0003020b8, 0xc0003020b8)
	/Users/jelle/src/aerc/aerc.go:150 +0x41
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).BeginExCommand.func3(0xc0003020b8, 0x5, 0x5, 0x8, 0xc0003020b8)
	/Users/jelle/src/aerc/widgets/aerc.go:366 +0x3d
git.sr.ht/~sircmpwn/aerc/lib/ui.(*TextInput).nextCompletion(0xc0001af1e0)
	/Users/jelle/src/aerc/lib/ui/textinput.go:178 +0x1f8
git.sr.ht/~sircmpwn/aerc/lib/ui.(*TextInput).Event(0xc0001af1e0, 0x453e0a0, 0xc0002ca0e0, 0xc000394030)
	/Users/jelle/src/aerc/lib/ui/textinput.go:257 +0x34d
git.sr.ht/~sircmpwn/aerc/widgets.(*ExLine).Event(0xc00060af40, 0x453e0a0, 0xc0002ca0e0, 0xc0001dc1d8)
	/Users/jelle/src/aerc/widgets/exline.go:68 +0xcd
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event(0xc0001ce000, 0x453e0a0, 0xc0002ca0e0, 0xc0000a7800)
	/Users/jelle/src/aerc/widgets/aerc.go:169 +0x494
git.sr.ht/~sircmpwn/aerc/lib/ui.(*UI).Tick(0xc0001e0050, 0xc0002d0000)
	/Users/jelle/src/aerc/lib/ui/ui.go:90 +0xc9
main.main()
	/Users/jelle/src/aerc/aerc.go:172 +0x565

This is build from commit b73fcaa (latest master at this time).

I tried to replicate this bug, but found that normally the tab completion only works when I have typed 1 letter, and otherwise just does nothing.

Status
RESOLVED FIXED
Submitter
~pingiun
Assigned to
No-one
Submitted
3 years ago
Updated
3 years ago
Labels
No labels applied.

~sircmpwn REPORTED FIXED 3 years ago

~ksshannon 3 years ago

Is there a reference to which commit this was fixed in? I'm still seeing the same behavior with the same command at 1bedb8fe...

~ksshannon 3 years ago

I should note that it is while I'm viewing a message.

~jeffas 3 years ago

Hopefully this patch fixes this, seems to on my end. https://lists.sr.ht/~sircmpwn/aerc/%3C20191001170148.40696-1-dev%40jeffas.io%3E

~ksshannon 3 years ago

Yes, the patch fixed it for me. Thanks.

Register here or Log in to comment, or comment via email.