~rjarry/aerc-devel

setup crashes if window is not large enough

Omar Polo <op@omarpolo.com>
Details
Message ID
<3C0445YFB4K4X.33HV0Q07DOX4R@venera>
DKIM signature
pass
Download raw message
Hello,

trying aerc I've spotted an issue in the setup procedure: if the
terminal is not wide enough aerc crashes.

It's easily reproducible by using a "small" window (I'm using 80x24
usually).  Type a long-ish password in the imap section, than press
"next" to go to the smtp settings and observe the crash.  My guess is
that the automatically-generated url for smtp doesn't fit and that
crashes aerc.

Running aerc in a terminal wide enough or by writing accounts.conf from
scratch is fine: i've ran aerc for approximately a week in a 80x24 xterm
and it's fine.

This is happening on OpenBSD 7.1-CURRENT with xterm:

$ uname -a
OpenBSD venera 7.1 GENERIC.MP#490 amd64
$ echo $TERM
xterm-256color

and here's the stacktrace:

$ aerc          
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:236 +0x45
panic({0x2605c0, 0xc00033aa40})
	runtime/panic.go:844 +0x258
git.sr.ht/~rjarry/aerc/lib/ui.(*Context).Printf(0xc000276330?, 0x2, 0x1,
{0x0?, 0x0?, 0x0?}, {0x2fc161?, 0x0?}, {0xc0001af398, 0x1, ...})
	git.sr.ht/~rjarry/aerc/lib/ui/context.go:70 +0x2ce
git.sr.ht/~rjarry/aerc/widgets.(*Selector).Draw(0xc000222a80, 0xc000276360)
	git.sr.ht/~rjarry/aerc/widgets/selector.go:52 +0x425
git.sr.ht/~rjarry/aerc/lib/ui.(*Grid).Draw(0xc0000c4790, 0xc0003dbe60)
	git.sr.ht/~rjarry/aerc/lib/ui/grid.go:144 +0x2ff
git.sr.ht/~rjarry/aerc/widgets.(*AccountWizard).Draw(0x0?, 0x8?)
	git.sr.ht/~rjarry/aerc/widgets/account-wizard.go:655 +0x2e
git.sr.ht/~rjarry/aerc/lib/ui.(*TabContent).Draw(0xc00033e000?, 0x0?)
	git.sr.ht/~rjarry/aerc/lib/ui/tab.go:394 +0x12e
git.sr.ht/~rjarry/aerc/lib/ui.(*Grid).Draw(0xc0000c44d0, 0xc00033e000)
	git.sr.ht/~rjarry/aerc/lib/ui/grid.go:144 +0x2ff
git.sr.ht/~rjarry/aerc/widgets.(*Aerc).Draw(0xc0000c4580, 0xc00033e000)
	git.sr.ht/~rjarry/aerc/widgets/aerc.go:177 +0x2e
git.sr.ht/~rjarry/aerc/lib/ui.(*UI).Tick(0xc000235680)
	git.sr.ht/~rjarry/aerc/lib/ui/ui.go:113 +0x1f7
main.main()
	git.sr.ht/~rjarry/aerc/aerc.go:221 +0xa4a
aerc crashed: Attempted to draw outside of context


Thanks,

Omar Polo
Reply to thread Export thread (mbox)