axllent / imap-scrub

A ultility to trim down your IMAP mailbox by saving & removing attachments or deleting messages based on rules
MIT License
20 stars 5 forks source link

panic: runtime error: invalid memory address or nil pointer dereference #4

Closed dk-teknologisk-capi closed 2 years ago

dk-teknologisk-capi commented 2 years ago

Every now and then I get a `panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x28 pc=0xdaf1e7]

goroutine 1 [running]: github.com/axllent/imap-scrub/lib.PrintHdrDetails(0xc0000aaa00) /mnt/apache/sandpit/go/imap-scrub/lib/utils.go:40 +0x47 main.main() /mnt/apache/sandpit/go/imap-scrub/main.go:247 +0x10ad'

I can restart and it will continue. Annoying, however.

axllent commented 2 years ago

Thanks for the bug report. To be honest I haven't a clue what can cause this, and I haven't ever experienced this issue myself. Out of curiosity, what OS are you running? As a starting point though, I've updated the module dependencies which includes the library used to parse the emails, which may solve your issue. Please upgrade to 0.0.3 and report back as to whether this helps or not?

dk-teknologisk-capi commented 2 years ago

I'm using Windows 10. I will upgrade and test again!

dk-teknologisk-capi commented 2 years ago

Since 0.0.3 I have had no issues - though I didn't stress it as much as when removing the first tons of messages using 0.0.2. Great utility! Have you considered making a GUI for it?

axllent commented 2 years ago

@carstenpanch Awesome to hear it's fixed, I'll confider this done then. Regarding a GUI, it definitely not in the planning as multi-OS/architecture GUIs are a pain in the ass to get working, build and support, especially with Go. Thanks for the feedback though :)