~rjarry/aerc-devel

4 2

aerc panic when decrypting message

Details
Message ID
<CL3MIG6DC6JL.3FRN1356X01GY@guix-aspire>
DKIM signature
pass
Download raw message
After I typed the password into pinentry, aerc panicked:

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

goroutine 1 [running]:
git.sr.ht/~rjarry/aerc/logging.PanicHandler()
/tmp/guix-build-aerc-0.0.0-20220531123251-2551dd1bfa2c.drv-0/src/git.sr.ht/~rjarry/aerc/logging/panic-logger.go:47
+0x495
panic({0x934ec0, 0xdc3300})
/gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.17.9/lib/go/src/runtime/panic.go:1047
+0x266
git.sr.ht/~rjarry/aerc/lib/ui.(*Context).HideCursor(...)
/tmp/guix-build-aerc-0.0.0-20220531123251-2551dd1bfa2c.drv-0/src/git.sr.ht/~rjarry/aerc/lib/ui/context.go:115
git.sr.ht/~rjarry/aerc/widgets.(*Terminal).Close(0xc00027c3c0,
{0xa82500, 0xc000032110})
/tmp/guix-build-aerc-0.0.0-20220531123251-2551dd1bfa2c.drv-0/src/git.sr.ht/~rjarry/aerc/widgets/terminal.go:202
+0x1af
git.sr.ht/~rjarry/aerc/widgets.(*Terminal).flushTerminal(0xc00027c3c0)
/tmp/guix-build-aerc-0.0.0-20220531123251-2551dd1bfa2c.drv-0/src/git.sr.ht/~rjarry/aerc/widgets/terminal.go:175
+0x119
git.sr.ht/~rjarry/aerc/widgets.(*Terminal).Event(0xc00027c3c0,
{0xa83200, 0xc0005ba500})
/tmp/guix-build-aerc-0.0.0-20220531123251-2551dd1bfa2c.drv-0/src/git.sr.ht/~rjarry/aerc/widgets/terminal.go:413
+0x1a5
git.sr.ht/~rjarry/aerc/widgets.(*PartViewer).Event(...)
/tmp/guix-build-aerc-0.0.0-20220531123251-2551dd1bfa2c.drv-0/src/git.sr.ht/~rjarry/aerc/widgets/msgviewer.go:792
git.sr.ht/~rjarry/aerc/widgets.(*PartSwitcher).Event(...)
/tmp/guix-build-aerc-0.0.0-20220531123251-2551dd1bfa2c.drv-0/src/git.sr.ht/~rjarry/aerc/widgets/msgviewer.go:379
git.sr.ht/~rjarry/aerc/widgets.(*MessageViewer).Event(0x85c3fe,
{0xa83200, 0xc0005ba500})
/tmp/guix-build-aerc-0.0.0-20220531123251-2551dd1bfa2c.drv-0/src/git.sr.ht/~rjarry/aerc/widgets/msgviewer.go:475
+0x4e
git.sr.ht/~rjarry/aerc/widgets.(*Aerc).Event(0xc00027c000, {0xa83200,
0xc0005ba500})
/tmp/guix-build-aerc-0.0.0-20220531123251-2551dd1bfa2c.drv-0/src/git.sr.ht/~rjarry/aerc/widgets/aerc.go:288
+0x33f
git.sr.ht/~rjarry/aerc/lib/ui.(*UI).Tick(0xc0001120a0)
/tmp/guix-build-aerc-0.0.0-20220531123251-2551dd1bfa2c.drv-0/src/git.sr.ht/~rjarry/aerc/lib/ui/ui.go:101
+0x195
main.main()
/tmp/guix-build-aerc-0.0.0-20220531123251-2551dd1bfa2c.drv-0/src/git.sr.ht/~rjarry/aerc/aerc.go:227
+0xb0c
---

Reproduction steps
==================

(1) Try to open an encrypted message.
(2) If necessary, type password.
(3) Be sad because aerc has crashed.

    -- (
Details
Message ID
<CL3MLB2SIQ40.2EB6FBBHXY2L4@Archetype>
In-Reply-To
<CL3MIG6DC6JL.3FRN1356X01GY@guix-aspire> (view parent)
DKIM signature
pass
Download raw message
On Thu Jun 30, 2022 at 6:52 PM CEST, ( wrote:
> (3) Be sad because aerc has crashed.
How reliably can you reproduce your sadness?
Details
Message ID
<CL3MTDENE1C6.3LZYFICDILHAC@guix-aspire>
In-Reply-To
<CL3MLB2SIQ40.2EB6FBBHXY2L4@Archetype> (view parent)
DKIM signature
pass
Download raw message
On Thu Jun 30, 2022 at 5:56 PM BST, Moritz Poldrack wrote:
> How reliably can you reproduce your sadness?

Seems like it only happens when pinentry-ncurses is invoked, as when the
password is cached by the GPG agent the crash doesn't occur. I'm not
sure whether it happens with pinentry-gtk-2. I'll test that in a
moment...

    -- (
Details
Message ID
<CL3N00GQV629.34KRCBDE8ZAXY@guix-aspire>
In-Reply-To
<CL3MTDENE1C6.3LZYFICDILHAC@guix-aspire> (view parent)
DKIM signature
pass
Download raw message
I can confirm that it works when pinentry-gtk-2 is used. Perhaps aerc
and pinentry-ncurses try to fight over control of the terminal or
something?

    -- (
Details
Message ID
<CL3N32YN1TDE.TN5H3PROG1CT@guix-aspire>
In-Reply-To
<CL3N00GQV629.34KRCBDE8ZAXY@guix-aspire> (view parent)
DKIM signature
pass
Download raw message
Oh, also, pinentry-ncurses is noticeably sluggish when typing in the
password, and the crash seems to happen as soon as pinentry-ncurses is
invoked (pinentry-ncurses obscures the log, which makes it seem like it
happens after the password is typed, though if you deliberately enter
the wrong password you may briefly see the log before pinentry-ncurses
restarts).

    -- (
Reply to thread Export thread (mbox)