~geemili


#127 panic: runtime error: index out of range in handleFetchMessages 6 months ago

Comment by ~geemili on ~sircmpwn/aerc2

I added some debug statements to try to shed some light on this issue:

diff --git a/worker/imap/fetch.go b/worker/imap/fetch.go
index 7d1bfcf..e9d0363 100644
--- a/worker/imap/fetch.go
+++ b/worker/imap/fetch.go
@@ -72,6 +72,8 @@ func (imapw *IMAPWorker) handleFetchMessages(
 
        go func() {
                for _msg := range messages {
+                       imapw.worker.Logger.Printf("seq num: %d, uid: %d", _msg.SeqNum, _msg.Uid)
+                       imapw.worker.Logger.Printf("seqMap len: %d", len(imapw.seqMap))
                        imapw.seqMap[_msg.SeqNum-1] = _msg.Uid
                        switch msg.(type) {
                        case *types.FetchMessageHeaders:

Relevant part of debug log:

# When switching from a folder with 1 item in it
2019/06/09 18:54:36 seq num: 408, uid: 4445
2019/06/09 18:54:36 seqMap len: 1

# When switch from a folder with 4 items
2019/06/09 18:58:39 seq num: 408, uid: 4445
2019/06/09 18:58:39 seqMap len: 4

#127 panic: runtime error: index out of range in handleFetchMessages 6 months ago

Comment by ~geemili on ~sircmpwn/aerc2

I get a very similar error on 702ad43bd2e5474669eae07eade44669f4f24b02:

panic: runtime error: index out of range                                                                                                                                                                                                                                         

                                        goroutine 64 [running]:
                                                               git.sr.ht/~sircmpwn/aerc/worker/imap.(*IMAPWorker).handleFetchMessages.func1(0xc0000a1620, 0xc0001841c0, 0x8e1b80, 0xc00075b140, 0xc000144780, 0xc0000a1680)
                                                                                                                                                                                                                            /home/geemili/sources/git.sr.ht/sircmpwn/aerc/worker/imap/fetch.go:75 +0x96b
                           created by git.sr.ht/~sircmpwn/aerc/worker/imap.(*IMAPWorker).handleFetchMessages
                                                                                                                /home/geemili/sources/git.sr.ht/sircmpwn/aerc/worker/imap/fetch.go:73 +0xbf

It happens whenever I switch to a different folder, switch back, and then try to open a message. Depending on the folders involved it doesn't always fail, but it consistently fails when I switch back to INBOX from a non-empty folder.

#177 Filter directory is not correct when building with custom $SHAREDIR 6 months ago

Comment by ~geemili on ~sircmpwn/aerc2

Yes, but I ran make clean and then tried installing again.

I looked into it a bit further, and now I realize that the filter path is set in the config, and editing it there fixed it.

I must note though, that if I do not set the GOPATH, go tries to store the dependencies to GOROOT. That fails as I am on NixOS, and go is installed via nix which installs it in /nix/store/, which is read-only.

#177 Filter directory is not correct when building with custom $SHAREDIR 6 months ago

Ticket created by ~geemili on ~sircmpwn/aerc2

When I make and install with a different $SHAREDIR the root filter dir is not correct. For example, if I build with:

env GOPATH=$HOME/go PREFIX=$HOME/.local SHAREDIR=$HOME/.local/share/aerc make install

Then when I open an email it shows:

sh: /usr/local/share/aerc/filters/plaintext: No such file or directory                                                         
(END)