~rjarry/aerc#41: 
wizard crash on small terminals

aerc' wizard crashes in some case when the window is not large enough. To reproduce, open an xterm window 80x24, then:

  • fill the first page of the wizard (account name, fullname, email address); press next.

  • fill the imap settings, press "next" to go to the smtp settings and observe the crash:

venera$ 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, 0xc000382ec0})
        runtime/panic.go:844 +0x258
git.sr.ht/~rjarry/aerc/lib/ui.(*Context).Printf(0xc000461590?, 0x2, 0x1, {0x200?, 0x23627dfff?, 0x2360a4600?}, {0x2fc161?, 0xc00019b318?}, {0xc00019b398, 0x1, ...})
        git.sr.ht/~rjarry/aerc/lib/ui/context.go:70 +0x2ce
git.sr.ht/~rjarry/aerc/widgets.(*Selector).Draw(0xc000220a80, 0xc0004615c0)
        git.sr.ht/~rjarry/aerc/widgets/selector.go:52 +0x425
git.sr.ht/~rjarry/aerc/lib/ui.(*Grid).Draw(0xc00018e790, 0xc000461260)
        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(0xc000384000?, 0x0?)
        git.sr.ht/~rjarry/aerc/lib/ui/tab.go:394 +0x12e
git.sr.ht/~rjarry/aerc/lib/ui.(*Grid).Draw(0xc00018e4d0, 0xc000384000)
        git.sr.ht/~rjarry/aerc/lib/ui/grid.go:144 +0x2ff
git.sr.ht/~rjarry/aerc/widgets.(*Aerc).Draw(0xc00018e580, 0xc000384000)
        git.sr.ht/~rjarry/aerc/widgets/aerc.go:177 +0x2e
git.sr.ht/~rjarry/aerc/lib/ui.(*UI).Tick(0xc000233680)
        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

my (unconfirmed) guess is that the "Yes/No" and "Previous/Next" buttons of the smtp page would be drawed outside of the screen due to a window height that's too small.

With a bigger xterm (90x34) it does not crash and I can successfully complete the wizard and use aerc. The rest of the interface works fine in a 80x24 xterm window.

This happened on OpenBSD 7.1-CURRENT with xterm and aerc v0.9.0 (not built from the master branch, just the latest release.)

Status
RESOLVED FIXED
Submitter
Omar Polo
Assigned to
No-one
Submitted
4 months ago
Updated
4 months ago
Labels
bug ui

~rjarry REPORTED FIXED 4 months ago

Koni Marti referenced this ticket in commit 4a4050ee.

Omar Polo 4 months ago · edit

"~rjarry" outgoing@sr.ht wrote:

Ticket resolved: FIXED

Koni Marti referenced this ticket in commit 4a4050ee.

Can confirm that it fixes the issue for me; the wizard it's working correctly now. Thanks!

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