akiyosi / goneovim

A GUI frontend for neovim.
MIT License
2.35k stars 60 forks source link

`SIGSEGV: segmentation violation` using `GonvimWorkspaceNew` command #515

Closed Hellfar closed 4 months ago

Hellfar commented 6 months ago

Hi,

I just installed and tried Goneovim :) . I thought it would be nice to let you know that there is an issue with the GonvimWorkspaceNew command (seen here). Tried with version v0.6.8 as well as v0.6.7.

And it output the following error:

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

goroutine 1 [running, locked to thread]:
github.com/akiyosi/goneovim/editor.(*Workspace).updateSize(0xc0004d0000)
    github.com/akiyosi/goneovim/editor/workspace.go:791 +0x215
github.com/akiyosi/goneovim/editor.(*Editor).workspaceAdd(0xc0000de000)
    github.com/akiyosi/goneovim/editor/editor.go:1115 +0x52
github.com/akiyosi/goneovim/editor.(*Workspace).handleGui(0xc0001c6000, {0xc0001faa10, 0x1, 0xc0001def68?})
    github.com/akiyosi/goneovim/editor/workspace.go:1700 +0x10d1
github.com/akiyosi/goneovim/editor.(*Workspace).registerSignal.func2()
    github.com/akiyosi/goneovim/editor/workspace.go:319 +0xad
github.com/akiyosi/goneovim/editor.callbackneovimSignalada841_GuiSignal(0xc0000061a0?)
    github.com/akiyosi/goneovim/editor/moc.go:4178 +0x36
github.com/akiyosi/goneovim/editor._Cfunc_neovimSignalada841_EventDefault(0x2e06df0, 0x7f9000000f50)
    _cgo_gotypes.go:6917 +0x48
github.com/akiyosi/goneovim/editor.(*neovimSignal).EventDefault.func1(0x8?, {0x1429e48?, 0xc0004ce028?})
    github.com/akiyosi/goneovim/editor/moc.go:4632 +0x9d
github.com/akiyosi/goneovim/editor.(*neovimSignal).EventDefault(0x2e06df0?, {0x1429e48?, 0xc0004ce028?})
    github.com/akiyosi/goneovim/editor/moc.go:4632 +0x2f
github.com/akiyosi/goneovim/editor.callbackneovimSignalada841_Event(0x54f1c5?, 0x7f9000000f50)
    github.com/akiyosi/goneovim/editor/moc.go:4627 +0xe5
github.com/akiyosi/qt/widgets._Cfunc_QApplication_QApplication_Exec()
    _cgo_gotypes.go:2630 +0x47
github.com/akiyosi/qt/widgets.QApplication_Exec(...)
    github.com/akiyosi/qt/widgets/widgets-minimal.go:2962
github.com/akiyosi/goneovim/editor.InitEditor({{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, ...}, ...)
    github.com/akiyosi/goneovim/editor/editor.go:308 +0xad9
main.main()
    github.com/akiyosi/goneovim/cmd/goneovim/main.go:46 +0x1b9

Do not hesitate to ask for further information :) .

akiyosi commented 6 months ago

@Hellfar Thank you for reporting this issue. I have identified the issue and have made a fix. You can try the fixed version in the following artifacts. https://github.com/akiyosi/goneovim/actions/runs/7497927939