~sircmpwn/aerc2#478: 
panic: Attempted to create context with negative offset

Occasionally, I will leave aerc running as I code other projects, and come back to the following error:

[koeng@kgnode2 ~]$ aerc
panic: Attempted to create context with negative offset

goroutine 1 [running]:
git.sr.ht/~sircmpwn/aerc/lib/ui.(*Context).Subcontext(0xc0002864e0, 0x0, 0xffffffffffffffff, 0xbf, 0x1, 0xc00004bd70)
        git.sr.ht/~sircmpwn/aerc/lib/ui/context.go:47 +0x1e7
git.sr.ht/~sircmpwn/aerc/lib/ui.(*Grid).Draw(0xc0001684d0, 0xc0002864e0)
        git.sr.ht/~sircmpwn/aerc/lib/ui/grid.go:143 +0x256
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Draw(0xc000168580, 0xc0002864e0)
        git.sr.ht/~sircmpwn/aerc/widgets/aerc.go:176 +0x3f
git.sr.ht/~sircmpwn/aerc/lib/ui.(*UI).Tick(0xc000260870, 0xc000020000)
        git.sr.ht/~sircmpwn/aerc/lib/ui/ui.go:113 +0x1d1
main.main()
        git.sr.ht/~sircmpwn/aerc/aerc.go:194 +0x697

aerc crashes, but tends not to crash when I am using it. I am using Arch Linux running the i3 window manager, running aerc in st. Any possible fixes?

Status
REPORTED
Submitter
~koeng
Assigned to
No-one
Submitted
6 months ago
Updated
3 months ago
Labels
No labels applied.

~samhh 3 months ago

I'm seeing the same a lot today. I'm on Arch under xmonad in Alacritty.

It seems to happen for me after opening URLs in urlscan and focusing away from aerc.

~dilyn 3 months ago*

I experience a similar crash and crash message. It happens precisely when resizing aerc to be smaller than the terminal size it was opened from.

goroutine 1 [running]:
runtime/debug.Stack(0x330368, 0xc0005c5a20, 0x82ff53)
    /usr/lib/go/src/runtime/debug/stack.go:24 +0x9f
runtime/debug.PrintStack()
    /usr/lib/go/src/runtime/debug/stack.go:16 +0x25
main.PanicTermFix(0x0)
    /tmp/11947/build/aerc/aerc.go:212 +0x57
panic(0x2622c0, 0xc000020020)
    /usr/lib/go/src/runtime/panic.go:971 +0x499
git.sr.ht/~sircmpwn/aerc/lib/ui.(*Context).Subcontext(0xc000352030, 0x0, 0xffffffffffffffff, 0x89, 0x1, 0xc0005c5c60)
    /tmp/11947/build/aerc/lib/ui/context.go:47 +0x1e7
git.sr.ht/~sircmpwn/aerc/lib/ui.(*Grid).Draw(0xc0001b04d0, 0xc000352030)
    /tmp/11947/build/aerc/lib/ui/grid.go:143 +0x256
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Draw(0xc0001b0580, 0xc000352030)
    /tmp/11947/build/aerc/widgets/aerc.go:177 +0x3d
git.sr.ht/~sircmpwn/aerc/lib/ui.(*UI).Tick(0xc00026c000, 0x31e500)
    /tmp/11947/build/aerc/lib/ui/ui.go:113 +0x1d1
main.main()
    /tmp/11947/build/aerc/aerc.go:197 +0x70a
aerc crashed: Attempted to create context with negative offset

ETA: Running 100% wayland, foot terminal.

~samhh 3 months ago

My stacktrace looks the same as dilyn's.

I've added some data to the panic locally and it looks like my y (input to Subcontext) is coming through as -1 for some reason.

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