~yashsriv

https://yashsriv.org

Software Engineer @ Facebook, London


#150 mark emails copied to the copy-to directory as read 6 months ago

Comment by ~yashsriv on ~sircmpwn/aerc2

Fixed by 35f5732

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

Comment by ~yashsriv on ~sircmpwn/aerc2

I think this is similar to #168 which was also only crashing once per message. The logs I captured for that might be relevant in this case as well.

#168 Crash on receiving new mail after commit b83e7c9 6 months ago

bug added by ~yashsriv on ~sircmpwn/aerc2

#168 Crash on receiving new mail after commit b83e7c9 6 months ago

Ticket created by ~yashsriv on ~sircmpwn/aerc2

Open aerc. Send a mail to yourself from another client. Wait for aerc tick to refresh and aerc crashes.

The crash error is:

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

goroutine 42 [running]:
bufio.(*Reader).fill(0xc0003f0f48)
    /usr/lib/go/src/bufio/bufio.go:100 +0xe0
bufio.(*Reader).Peek(0xc0003f0f48, 0x1, 0x0, 0x7fe9c83998e0, 0x40981b, 0xc0003f0d28, 0x2)
    /usr/lib/go/src/bufio/bufio.go:138 +0x4f
github.com/emersion/go-message/textproto.ReadHeader(0xc0003f0f48, 0x1000, 0x1000, 0xc000538000, 0x0, 0x0, 0x0)
    $GOPATH/pkg/mod/github.com/emersion/go-message@v0.10.3/textproto/header.go:384 +0x4c
git.sr.ht/~sircmpwn/aerc/worker/imap.(*IMAPWorker).handleFetchMessages.func1(0xc0003e8c00, 0xc0001740e0, 0x8dcb20, 0xc0005c1410, 0xc0002c6080, 0xc0003e8c60)
    /aerc/worker/imap/fetch.go:70 +0x293
created by git.sr.ht/~sircmpwn/aerc/worker/imap.(*IMAPWorker).handleFetchMessages
    /aerc/worker/imap/fetch.go:64 +0xbf

Relevant log portion is as follows:

2019/06/08 01:23:42 Fetching message headers
_4JYDQ UID FETCH 88732 (BODYSTRUCTURE ENVELOPE INTERNALDATE FLAGS UID BODY[HEADER])
* 25 FETCH (UID 88732 INTERNALDATE "07-Jun-2019 19:53:37 +0000" FLAGS (\Seen) ENVELOPE ("Sat, 8 Jun 2019 01:23:37 +0530" "Hello there" (("Yash Srivastav" NIL "yash111998" "gmail.com")) (("Yash Srivastav" NIL "yash111998" "gmail.com")) (("Yash Srivastav" NIL "yash111998" "gmail.com")) (("Yash Srivastav" NIL "yash111998" "gmail.com")) NIL NIL NIL "<CAF+684bZM6XCTKwR3WbBQ8SiH55v1hPiQXXPfWQ8A3-O4SGEjw@mail.gmail.com>") BODY[HEADER] {294}
MIME-Version: 1.0
Date: Sat, 8 Jun 2019 01:23:37 +0530
Message-ID: <CAF+684bZM6XCTKwR3WbBQ8SiH55v1hPiQXXPfWQ8A3-O4SGEjw@mail.gmail.com>
Subject: Hello there
From: Yash Srivastav <yash111998@gmail.com>
To: Yash Srivastav <yash111998@gmail.com>
Content-Type: text/plain; charset="UTF-8"

 BODYSTRUCTURE ("TEXT" "PLAIN" ("CHARSET" "UTF-8") NIL NIL "7BIT" 35 1 NIL NIL NIL))
2019/06/08 01:23:42 ->(ui) *types.MessageInfo:*types.FetchMessageHeaders
2019/06/08 01:23:42 (ui)<= *types.MessageInfo(78):*types.FetchMessageHeaders(77)
* 25 FETCH (UID 88732 FLAGS (\Seen))
_4JYDQ OK Success

I believe the error is due to the second * 25 FETCH we receive which has none of the other fields set other than UID and FLAGS. I'm unable to understand why it happens? Any ideas?

#151 How to install it on Ubuntu 16.04? 6 months ago

Comment by ~yashsriv on ~sircmpwn/aerc2

edit: The command is go version. It was a multiline code block which is being rendered on a single line.

#151 How to install it on Ubuntu 16.04? 6 months ago

Comment by ~yashsriv on ~sircmpwn/aerc2

You could check if you have the proper go version like this: $ go version go version go1.12.4 linux/amd64

The above is the output for my go installation. Its ok as long as you have anything greater than go1.11.0. If you have an older version, please check online as to how to install a newer version of go as I'm not very familiar with the recommended way for ubuntu.

Then, you should clone aerc to any place you want and try a make.

#151 How to install it on Ubuntu 16.04? 6 months ago

Comment by ~yashsriv on ~sircmpwn/aerc2

PS: You need to have go version >= 1.11

#151 How to install it on Ubuntu 16.04? 6 months ago

Comment by ~yashsriv on ~sircmpwn/aerc2

Hi. So aerc uses Go 1.11 modules for dependency management. The new go modules don't work if you clone a repository under $GOPATH as it assumes it to be the older $GOPATH based dependency management.

In order to compile aerc, either clone to some place outside $GOPATH and compile or you could export GO111MODULE=on and then compile inside the $GOPATH