Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown link parse failed #2906

Closed
grsky360 opened this issue Sep 12, 2021 · 3 comments
Closed

Markdown link parse failed #2906

grsky360 opened this issue Sep 12, 2021 · 3 comments
Assignees
Labels
Milestone

Comments

@grsky360
Copy link

grsky360 commented Sep 12, 2021

Describe the problem

When I try to import my joplin export files, I met an error

  1. Cannot import joplin files
  2. When I tried to import other correct files, SiYuan still cannot handle it
  3. When I kill the Kernel and restart it, the program is back to normal, but still cannot import my files.

I found out the minimum reproducible file, please confirm why cause that. And why an error caused the kernel cannot handle other requests

<a href="https://github.com/Null-Ouwenjie/zhizhihu" class="wrap external" target="_blank" rel="nofollow noreferrer" data-za-detail-view-id="1043">
GitHub - Null-Ouwenjie/zhizhihu: zhihu.com Unofficial Client for Android</a>

Version environment

  • Version: 1.3.4

Log File

E 2021/09/12 16:11:14 log.go:88: PANIC RECOVERED: runtime error: index out of range [147] with length 147
	/usr/local/go/src/runtime/panic.go:971 (0x4039878)
/usr/local/go/src/runtime/panic.go:88 (0x4036d64)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/88250/lute@v1.7.4-0.20210905172232-1ed933af5a5f/parse/inline_link.go:65 (0x445a954)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/88250/lute@v1.7.4-0.20210905172232-1ed933af5a5f/parse/inline.go:236 (0x4452146)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/88250/lute@v1.7.4-0.20210905172232-1ed933af5a5f/parse/inline.go:56 (0x445002b)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/88250/lute@v1.7.4-0.20210905172232-1ed933af5a5f/parse/inlines.go:65 (0x445b6ec)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/88250/lute@v1.7.4-0.20210905172232-1ed933af5a5f/parse/inlines.go:110 (0x445b54a)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/88250/lute@v1.7.4-0.20210905172232-1ed933af5a5f/parse/inlines.go:19 (0x445b232)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/88250/lute@v1.7.4-0.20210905172232-1ed933af5a5f/parse/parse.go:90 (0x44631e9)
/Users/Vanessa/Work/Code/siyuan-src/kernel/model/import.go:401 (0x4bea7f0)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/88250/lute@v1.7.4-0.20210905172232-1ed933af5a5f/ast/walk.go:36 (0x43fe2d8)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/88250/lute@v1.7.4-0.20210905172232-1ed933af5a5f/ast/walk.go:44 (0x43fe324)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/88250/lute@v1.7.4-0.20210905172232-1ed933af5a5f/ast/walk.go:44 (0x43fe324)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/88250/lute@v1.7.4-0.20210905172232-1ed933af5a5f/ast/walk.go:31 (0x4baf8b0)
/Users/Vanessa/Work/Code/siyuan-src/kernel/model/import.go:392 (0x4baf844)
/Users/Vanessa/Work/Code/siyuan-src/kernel/model/import.go:249 (0x4badf17)
/Users/Vanessa/Work/Code/siyuan-src/kernel/api/import.go:30 (0x4c45a84)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go:165 (0x4bc6d84)
/Users/Vanessa/Work/Code/siyuan-src/kernel/model/session.go:78 (0x4bc6d66)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go:165 (0x4949dd5)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/gin-contrib/sessions@v0.0.3/sessions.go:52 (0x4949dbd)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go:165 (0x4c2c016)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/gin-contrib/gzip@v0.0.3/handler.go:60 (0x4c2bffe)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go:165 (0x4947619)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/gin-gonic/gin@v1.7.4/recovery.go:99 (0x4947600)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go:165 (0x493d849)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/gin-gonic/gin@v1.7.4/gin.go:489 (0x493d82f)
/Users/Vanessa/Work/GoGoGo/pkg/mod/github.com/gin-gonic/gin@v1.7.4/gin.go:445 (0x493d31b)
/usr/local/go/src/net/http/server.go:2887 (0x43ab9c2)
/usr/local/go/src/net/http/server.go:1952 (0x43a6dec)
/usr/local/go/src/runtime/asm_amd64.s:1371 (0x40741a0)
@88250 88250 self-assigned this Sep 12, 2021
@88250
Copy link
Member

88250 commented Sep 12, 2021

Thanks for report this bug, but I can't reproduce it with the specified case.

Markdown:
image

Imported:
image

From the log error details, I will fix the NPE bug, but I still can't ensure whether it is fixed this issue you reported at all, please check it after v1.3.5 is released, thanks.

@88250 88250 added the Bug label Sep 12, 2021
@88250 88250 added this to the 1.3.5 milestone Sep 12, 2021
88250 added a commit to 88250/lute that referenced this issue Sep 12, 2021
@88250 88250 changed the title Import markdown error with newline html Markdown link parse failed Sep 12, 2021
@88250 88250 closed this as completed Sep 12, 2021
@88250
Copy link
Member

88250 commented Sep 12, 2021

If there is any further information, welcome to post, thank you!

@grsky360
Copy link
Author

Got it. Let me try to reproduce it in different environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants