~aronne


#11 aerc crashes after piping git patch repeatedly 5 months ago

Comment by ~aronne on ~rjarry/aerc

Hi,

Another way that I can make it crash (at least on my PC), is by selecting any email with a pdf attachment and piping the attachment to xdg-open.

goroutine 1 [running]:
runtime/debug.Stack()
	runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
	runtime/debug/stack.go:16 +0x19
main.PanicTermFix(0x0)
	git.sr.ht/~rjarry/aerc/aerc.go:231 +0x45
panic({0x5612afab7200, 0x5612afe3c330})
	runtime/panic.go:1047 +0x266
github.com/creack/pty.Getsize(...)
	github.com/creack/pty@v1.1.17/winsize.go:23
git.sr.ht/~rjarry/aerc/widgets.(*Terminal).Draw(0xc000a56fd0, 0xc00039f0b0)
	git.sr.ht/~rjarry/aerc/widgets/terminal.go:254 +0x176
git.sr.ht/~rjarry/aerc/lib/ui.(*TabContent).Draw(0xc0001e41e0, 0x0)
	git.sr.ht/~rjarry/aerc/lib/ui/tab.go:394 +0x143
git.sr.ht/~rjarry/aerc/lib/ui.(*Grid).Draw(0xc000278000, 0xc0001e41e0)
	git.sr.ht/~rjarry/aerc/lib/ui/grid.go:144 +0x2ef
git.sr.ht/~rjarry/aerc/widgets.(*Aerc).Draw(0xc0002780b0, 0xc0001e41e0)
	git.sr.ht/~rjarry/aerc/widgets/aerc.go:177 +0x2e
git.sr.ht/~rjarry/aerc/lib/ui.(*UI).Tick(0xc00007a0a0)
	git.sr.ht/~rjarry/aerc/lib/ui/ui.go:113 +0x1f7
main.main()
	git.sr.ht/~rjarry/aerc/aerc.go:216 +0xa6c
aerc crashed: runtime error: invalid memory address or nil pointer dereference

I don't know if it makes any difference, but I'm using awesomewm as my window manager, so when I open the attachment, my terminal (alacritty) gets resized at the same time.

#11 aerc crashes after piping git patch repeatedly 5 months ago

Ticket created by ~aronne on ~rjarry/aerc

aerc version: 0.6.0
distro: Arch Linux

I can't write down the exact steps to reproduce, but I've managed to make the program crash randomly two or three times while repeatedly performing the following steps on an open git PATCH message:

  1. | less
  2. Page up and down a bit
  3. Press q
  4. Press q (now we're back in the message)
  5. | -m less
  6. Page up and down a bit
  7. Press q
  8. Press q (now we're back in the message)
  9. Repeat from step 1 until the program crashes

This is the stack trace:

goroutine 1 [running]:
runtime/debug.Stack()
	runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
	runtime/debug/stack.go:16 +0x19
main.PanicTermFix(0x0)
	git.sr.ht/~rjarry/aerc/aerc.go:231 +0x45
panic({0x55a63a6b7200, 0x55a63aa3c330})
	runtime/panic.go:1047 +0x266
github.com/creack/pty.StartWithAttrs(0x0, 0xc0006df818, 0xc0002cc1e0)
	github.com/creack/pty@v1.1.17/run.go:58 +0x152
git.sr.ht/~rjarry/aerc/widgets.(*Terminal).Draw(0xc0006f2790, 0xc00028c930)
	git.sr.ht/~rjarry/aerc/widgets/terminal.go:242 +0x105
git.sr.ht/~rjarry/aerc/lib/ui.(*TabContent).Draw(0xc00022dc20, 0x0)
	git.sr.ht/~rjarry/aerc/lib/ui/tab.go:394 +0x143
git.sr.ht/~rjarry/aerc/lib/ui.(*Grid).Draw(0xc00012c4d0, 0xc00022dc20)
	git.sr.ht/~rjarry/aerc/lib/ui/grid.go:144 +0x2ef
git.sr.ht/~rjarry/aerc/widgets.(*Aerc).Draw(0xc00012c580, 0xc00022dc20)
	git.sr.ht/~rjarry/aerc/widgets/aerc.go:177 +0x2e
git.sr.ht/~rjarry/aerc/lib/ui.(*UI).Tick(0xc00021fa40)
	git.sr.ht/~rjarry/aerc/lib/ui/ui.go:113 +0x1f7
main.main()
	git.sr.ht/~rjarry/aerc/aerc.go:216 +0xa6c
aerc crashed: runtime error: invalid memory address or nil pointer dereference