mholt / timeliner

All your digital life on a single timeline, stored locally -- DEPRECATED, SEE TIMELINIZE (link below)
https://timelinize.com
GNU Affero General Public License v3.0
3.56k stars 116 forks source link

runtime error: invalid memory address or nil pointer dereference #71

Closed Elycin closed 3 years ago

Elycin commented 3 years ago

Hi there,

Before going into any details, I looked to see if there are any previous issues in relation to this one, I found #7 but this seems to be slightly different, so I'm posting here to look for help.

I have a proper configuration as follows of timeliner.toml in my root directory that I specify via -config /root/timeliner.toml

I got timeliner successfully working with google photos last night and woke up this morning to find that the process has stopped with the following stack trace:

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

goroutine 10 [running]:
github.com/mholt/timeliner.(*WrappedClient).GetLatest(0xc00000c780, 0xd6d6e0, 0xc000107920, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10000000000, 0x0, ...)
        /root/timeliner/wrappedclient.go:69 +0x532
main.main.func1(0xc000288510, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10000000000, 0xd5ff00, 0xc00008dcc0, 0xc0001c1c60, ...)
        /root/timeliner/cmd/timeliner/main.go:190 +0x17f
created by main.main
        /root/timeliner/cmd/timeliner/main.go:183 +0xbb4

Any ideas on how I can fix this?

Thanks in advance.

mholt commented 3 years ago

What version are you running (commit SHA) and what is the command that you're running?

Elycin commented 3 years ago

@mholt I cloned the repository and compiled the application using the master branch last night. (41cce90c698bf35d1f3985b5b50fa029d9ed9fef).
The command I am running is timeliner -v -config /root/timeliner.toml get-latest google_photos/[REDACTED]@gmail.com

Please let me know if there's any other information I could provide.

mholt commented 3 years ago

Cool, thanks. I'm pretty sure I simply forgot to do a nil check on that line. I haven't tested this myself, but would you mind pulling the latest commit and trying again?

(Edit: I quickly decided to move the nil check to a different line, so I pushed another commit that I think is more correct. Commit cf15516.)

Elycin commented 3 years ago

That looks to have solved it. Thanks for the quick help! Here's a console replay: https://asciinema.org/a/RVYcicoORZOMcW28wNKkc3OG3

mholt commented 3 years ago

Awesome, thanks for the great and helpful report!