[GH-ISSUE #64] Updating all bookmarks crashes #42

Closed
opened 2026-02-25 23:33:19 +03:00 by kerem · 2 comments
Owner

Originally created by @muesli on GitHub (Mar 8, 2018).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/64

Trying to update all bookmarks, not specifying an index, i get the crash below. Updating a single bookmark by index works fine.

./shiori update --dont-overwrite -y
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x744e55]

goroutine 1366 [running]:
github.com/RadhiFadlillah/go-readability.toAbsoluteURI(0xc422db3f40, 0x1a, 0xc420881680, 0xc422db3f00, 0x1a)
        /home/muesli/Sources/go/src/github.com/RadhiFadlillah/go-readability/read.go:945 +0x95
github.com/RadhiFadlillah/go-readability.fixRelativeURIs.func1(0x0, 0xc4206ad440)
        /home/muesli/Sources/go/src/github.com/RadhiFadlillah/go-readability/read.go:966 +0xaa
github.com/PuerkitoBio/goquery.(*Selection).Each(0xc4206ad2c0, 0xc4201f3b70, 0x1)
        /home/muesli/Sources/go/src/github.com/PuerkitoBio/goquery/iteration.go:10 +0x53
github.com/RadhiFadlillah/go-readability.fixRelativeURIs(0xc422882b70, 0xc420881680)
        /home/muesli/Sources/go/src/github.com/RadhiFadlillah/go-readability/read.go:958 +0x72
github.com/RadhiFadlillah/go-readability.postProcessContent(0xc422882b70, 0xc420881680)
        /home/muesli/Sources/go/src/github.com/RadhiFadlillah/go-readability/read.go:980 +0x35
github.com/RadhiFadlillah/go-readability.Parse(0xc420236bc0, 0x1f, 0x2540be400, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/muesli/Sources/go/src/github.com/RadhiFadlillah/go-readability/read.go:1156 +0x177
github.com/RadhiFadlillah/shiori/cmd.updateBookmarks.func1(0xc420852b60, 0x0, 0xc4204601f0, 0xc4204e6000, 0x253, 0x400, 0x74, 0x75, 0xc420236bc0, 0x1f, ...)
        /home/muesli/Sources/go/src/github.com/RadhiFadlillah/shiori/cmd/update.go:141 +0xaa
created by github.com/RadhiFadlillah/shiori/cmd.updateBookmarks
        /home/muesli/Sources/go/src/github.com/RadhiFadlillah/shiori/cmd/update.go:138 +0xcdb
Originally created by @muesli on GitHub (Mar 8, 2018). Original GitHub issue: https://github.com/go-shiori/shiori/issues/64 Trying to update all bookmarks, not specifying an index, i get the crash below. Updating a single bookmark by index works fine. ``` ./shiori update --dont-overwrite -y panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x744e55] goroutine 1366 [running]: github.com/RadhiFadlillah/go-readability.toAbsoluteURI(0xc422db3f40, 0x1a, 0xc420881680, 0xc422db3f00, 0x1a) /home/muesli/Sources/go/src/github.com/RadhiFadlillah/go-readability/read.go:945 +0x95 github.com/RadhiFadlillah/go-readability.fixRelativeURIs.func1(0x0, 0xc4206ad440) /home/muesli/Sources/go/src/github.com/RadhiFadlillah/go-readability/read.go:966 +0xaa github.com/PuerkitoBio/goquery.(*Selection).Each(0xc4206ad2c0, 0xc4201f3b70, 0x1) /home/muesli/Sources/go/src/github.com/PuerkitoBio/goquery/iteration.go:10 +0x53 github.com/RadhiFadlillah/go-readability.fixRelativeURIs(0xc422882b70, 0xc420881680) /home/muesli/Sources/go/src/github.com/RadhiFadlillah/go-readability/read.go:958 +0x72 github.com/RadhiFadlillah/go-readability.postProcessContent(0xc422882b70, 0xc420881680) /home/muesli/Sources/go/src/github.com/RadhiFadlillah/go-readability/read.go:980 +0x35 github.com/RadhiFadlillah/go-readability.Parse(0xc420236bc0, 0x1f, 0x2540be400, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /home/muesli/Sources/go/src/github.com/RadhiFadlillah/go-readability/read.go:1156 +0x177 github.com/RadhiFadlillah/shiori/cmd.updateBookmarks.func1(0xc420852b60, 0x0, 0xc4204601f0, 0xc4204e6000, 0x253, 0x400, 0x74, 0x75, 0xc420236bc0, 0x1f, ...) /home/muesli/Sources/go/src/github.com/RadhiFadlillah/shiori/cmd/update.go:141 +0xaa created by github.com/RadhiFadlillah/shiori/cmd.updateBookmarks /home/muesli/Sources/go/src/github.com/RadhiFadlillah/shiori/cmd/update.go:138 +0xcdb ```
kerem closed this issue 2026-02-25 23:33:19 +03:00
Author
Owner

@RadhiFadlillah commented on GitHub (Mar 9, 2018):

Man, this is embarassing. I've made a small mistake in error checking while converting relative URL to absolute URL. It should be fixed by go-readability#c5ea8f.

<!-- gh-comment-id:371673515 --> @RadhiFadlillah commented on GitHub (Mar 9, 2018): Man, this is embarassing. I've made a small mistake in error checking while converting relative URL to absolute URL. It should be fixed by [go-readability#c5ea8f](https://github.com/RadhiFadlillah/go-readability/commit/c5ea8f8edeeb1803d03b3fa291d580c41e4b2170).
Author
Owner

@muesli commented on GitHub (Mar 9, 2018):

Seems fixed indeed!

<!-- gh-comment-id:371675554 --> @muesli commented on GitHub (Mar 9, 2018): Seems fixed indeed!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#42
No description provided.