~emersion/alps#101: 
Single line emails fail to open

  1. Compose an email to yourself
  2. write only one line of text for the body
  3. Send!
  4. Try to open that email

Alps will not be able to open the text portion of that email

runtime error: invalid memory address or nil pointer dereference

(aerc also crashes with that same error) For comparison, thunderbird can open that email.

Status
REPORTED
Submitter
~earboxer
Assigned to
No-one
Submitted
3 years ago
Updated
3 years ago
Labels
bug email

~emersion 3 years ago

Can you post the stack trace?

~earboxer 3 years ago

020-07-13T13:31:03-04:00 - [PANIC RECOVER] runtime error: invalid memory address or nil pointer dereference goroutine 115 [running]:
github.com/labstack/echo/v4/middleware.RecoverWithConfig.func1.1.1(0x171c358, 0x1000, 0x0, 0x1800a00, 0xc000465200)
	/Users/zdecook 1/go/pkg/mod/github.com/labstack/echo/v4@v4.1.16/middleware/recover.go:71 +0xee
panic(0x1640d20, 0x1cd2720)
	/usr/local/Cellar/go/1.14.4/libexec/src/runtime/panic.go:969 +0x166
bufio.(*Reader).fill(0xc0001aba40)
	/usr/local/Cellar/go/1.14.4/libexec/src/bufio/bufio.go:100 +0xd4
bufio.(*Reader).ReadSlice(0xc0001aba40, 0x10100c00024b10a, 0x0, 0x1000, 0xc0006b6000, 0x0, 0x5)
	/usr/local/Cellar/go/1.14.4/libexec/src/bufio/bufio.go:359 +0x3d
mime/quotedprintable.(*Reader).Read(0xc0007dc7b0, 0xc0006b6000, 0x1000, 0x1000, 0xc0005072d4, 0xc0005072c0, 0x0)
	/usr/local/Cellar/go/1.14.4/libexec/src/mime/quotedprintable/reader.go:87 +0x35e
bufio.(*Scanner).Scan(0xc00024b418, 0x0)
	/usr/local/Cellar/go/1.14.4/libexec/src/bufio/scan.go:213 +0xa4
git.sr.ht/~emersion/alps/plugins/viewtext.viewer.ViewMessagePart(0xc000465200, 0xc000487640, 0xc000488190, 0x0, 0x0, 0x17e5da0, 0xc0001915d0)
	/Users/zdecook 1/test/gitstuffs/alps/plugins/viewtext/viewer.go:67 +0x138
git.sr.ht/~emersion/alps/plugins/base.viewMessagePart(0xc000465200, 0xc000487640, 0xc000488190, 0xc0005fa570, 0x0, 0x0, 0x0)
	/Users/zdecook 1/test/gitstuffs/alps/plugins/base/viewer.go:31 +0x92
git.sr.ht/~emersion/alps/plugins/base.handleGetPart(0xc000465200, 0x1061900, 0xc000682480, 0x4)
	/Users/zdecook 1/test/gitstuffs/alps/plugins/base/routes.go:308 +0x5f7
git.sr.ht/~emersion/alps/plugins/base.registerRoutes.func2(0xc000465200, 0x4, 0x10149db)
	/Users/zdecook 1/test/gitstuffs/alps/plugins/base/routes.go:33 +0x30
git.sr.ht/~emersion/alps.(*goPlugin).SetRoutes.func1(0x1800a00, 0xc000465200, 0xc00035e660, 0xc00024ba40)
	/Users/zdecook 1/test/gitstuffs/alps/plugin_go.go:39 +0x40
github.com/labstack/echo/v4.(*Echo).add.func1(0x1800a00, 0xc000465200, 0xc00024ba00, 0x1479a67)
	/Users/zdecook 1/go/pkg/mod/github.com/labstack/echo/v4@v4.1.16/echo.go:512 +0x8a
github.com/labstack/echo/v4/middleware.RecoverWithConfig.func1.1(0x1800a00, 0xc000465200, 0x0, 0x0)
	/Users/zdecook 1/go/pkg/mod/github.com/labstack/echo/v4@v4.1.16/middleware/recover.go:78 +0x12a
git.sr.ht/~emersion/alps.New.func4.1(0x1800be0, 0xc00039a320, 0xc000467a40, 0x16)
	/Users/zdecook 1/test/gitstuffs/alps/server.go:431 +0x1a6
git.sr.ht/~emersion/alps.New.func3.1(0x1800be0, 0xc00039a320, 0x3, 0x4)
	/Users/zdecook 1/test/gitstuffs/alps/server.go:406 +0x217
github.com/labstack/echo/v4.(*Echo).ServeHTTP.func1(0x1800be0, 0xc00039a320, 0xc00021e900, 0xc00024bb80)
	/Users/zdecook 1/go/pkg/mod/github.com/labstack/echo/v4@v4.1.16/echo.go:617 +0x110
git.sr.ht/~emersion/alps.New.func2.1(0x1800be0, 0xc00039a320, 0x1, 0x1)
	/Users/zdecook 1/test/gitstuffs/alps/server.go:393 +0x56
github.com/labstack/echo/v4.(*Echo).ServeHTTP(0xc0002e01e0, 0x17f12a0, 0xc0004a2540, 0xc0003c8d00)
	/Users/zdecook 1/go/pkg/mod/github.com/labstack/echo/v4@v4.1.16/echo.go:623 +0x16c
net/http.serverHandler.ServeHTTP(0xc000302000, 0x17f12a0, 0xc0004a2540, 0xc0003c8d00)
	/usr/local/Cellar/go/1.14.4/libexec/src/net/http/server.go:2807 +0xa3
net/http.(*conn).serve(0xc00039a280, 0x17f2820, 0xc000030e40)
	/usr/local/Cellar/go/1.14.4/libexec/src/net/http/server.go:1895 +0x86c
created by net/http.(*Server).Serve
	/usr/local/Cellar/go/1.14.4/libexec/src/net/http/server.go:2933 +0x35c

goroutine 1 [IO wait]:
internal/poll.runtime_pollWait(0x9422410, 0x72, 0x0)
	/usr/local/Cellar/go/1.14.4/libexec/src/runtime/netpoll.go:203 +0x55
internal/poll.(*pollDesc).wait(0xc00078a498, 0x72, 0x0, 0x0, 0x16ec757)
	/usr/local/Cellar/go/1.14.4/libexec/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/Cellar/go/1.14.4/libexec/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc00078a480, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.14.4/libexec/src/internal/poll/fd_unix.go:384 +0x1d4
net.(*netFD).accept(0xc00078a480, 0x50, 0x50, 0xc000100140)
	/usr/local/Cellar/go/1.14.4/libexec/src/net/fd_unix.go:238 +0x42
net.(*TCPListener).accept(0xc0001068a0, 0x1066

2020-07-13T13:31:03-04:00 ERROR runtime error: invalid memory address or nil pointer dereference