hismailbulut / Neoray

Simple and lightweight GUI client for Neovim
MIT License
148 stars 5 forks source link

Crash on macOS #17

Closed andis-sprinkis closed 3 years ago

andis-sprinkis commented 3 years ago

Edit: Probably related to the other crash ticket, but was not sure.

Please complete the following information:

Describe the bug Crash on lauching the program

Steps to reproduce

make
./bin/neoray_debug

Then crash. Same on make release Your neoray config in init.vim

let s:fontname = 'CascadiaCodePL'
let s:fontsize = 10

execute 'set guifont=' . s:fontname . ':h' . s:fontsize

Crash log if available (may be generated by neoray after crash) From debug binary:

$ ./bin/neoray_debug                                                                                                     19:06:43
[DEBUG] [NVIM] Neovim started with command: nvim --embed
[TRACE] [NVIM] Neovim version 0.5.0
[DEBUG] [NVIM] Attached to neovim as an ui client.
[TRACE] [NEORAY] Glfw version: 3.3.4 Cocoa NSGL EGL OSMesa
[DEBUG] [NEORAY] Video mode {Width:1440 Height:2560 RedBits:8 GreenBits:8 BlueBits:8 RefreshRate:60}
[DEBUG] [NEORAY] Creating window, width: 864 height: 1920
[DEBUG] [NEORAY] Glfw window created successfully.
[DEBUG] [NEORAY] Monitor diagonal: 23.79 dpi: 123.45
[DEBUG] [NEORAY] Input callbacks are initialized.
[DEBUG] [RENDERER] Initializing opengl.
[TRACE] [RENDERER] Opengl Version: 4.1 ATI-3.10.22
[DEBUG] [RENDERER] Vendor: ATI Technologies Inc.
[DEBUG] [RENDERER] Renderer: AMD Radeon Pro 560X OpenGL Engine
[DEBUG] [RENDERER] GLSL: 4.10
[DEBUG] [NEORAY] Loading default font.
[DEBUG] [NVIM] Deprecated option neoray_key_increase_fontsize is <C-ScrollWheelUp>
[DEBUG] [NVIM] Deprecated option neoray_key_decrease_fontsize is <C-ScrollWheelDown>
[DEBUG] [NEORAY] Window is now visible.
[TRACE] [PERFORMANCE] Start time: 270.302955ms
[DEBUG] [NEORAY] Loading font CascadiaCodePL with size 10
[TRACE] [NEORAY] Regular: CascadiaCodePL-Regular.otf
[WARNING] [NEORAY] Font has no bold italic face.
[WARNING] [NEORAY] Font has no italic face.
[TRACE] [NEORAY] Bold: CascadiaCodePL-Bold.otf
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7fff72779929]

runtime stack:
runtime.throw(0x4635390, 0x2a)
    /usr/local/Cellar/go/1.16.6/libexec/src/runtime/panic.go:1117 +0x72
runtime.sigpanic()
    /usr/local/Cellar/go/1.16.6/libexec/src/runtime/signal_unix.go:718 +0x2ef

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x4501a70, 0xc00056f588, 0x391af5c0)
    /usr/local/Cellar/go/1.16.6/libexec/src/runtime/cgocall.go:154 +0x7a fp=0xc00056f558 sp=0xc00056f520 pc=0x4006cba
github.com/go-gl/gl/v3.3-core/gl._Cfunc_glowTexSubImage2D(0x7fff42531277, 0xde1, 0x0, 0x10000000100, 0x140100001908, 0x0)
    _cgo_gotypes.go:19616 +0x65 fp=0xc00056f588 sp=0xc00056f558 pc=0x421a4a5
github.com/go-gl/gl/v3.3-core/gl.TexSubImage2D.func1(0xde1, 0x0, 0x10000000100, 0x140100001908, 0x0)
    /Users/andis.sprinkis/go/pkg/mod/github.com/go-gl/gl@v0.0.0-20210813123233-e4099ee2221f/v3.3-core/gl/package.go:12489 +0xc5 fp=0xc00056f5d0 sp=0xc00056f588 pc=0x424a245
github.com/go-gl/gl/v3.3-core/gl.TexSubImage2D(0xde1, 0x0, 0x10000000100, 0x140100001908, 0x0)
    /Users/andis.sprinkis/go/pkg/mod/github.com/go-gl/gl@v0.0.0-20210813123233-e4099ee2221f/v3.3-core/gl/package.go:12489 +0x79 fp=0xc00056f608 sp=0xc00056f5d0 pc=0x421ba79
main.(*Texture).clear(0x4bc00c0)
    /Users/andis.sprinkis/Downloads/neoray-0.0.9/src/texture.go:46 +0xa9 fp=0xc00056f648 sp=0xc00056f608 pc=0x44d9549
main.(*Renderer).clearAtlas(0x4bc0050)
    /Users/andis.sprinkis/Downloads/neoray-0.0.9/src/renderer.go:121 +0x9f fp=0xc00056f6e0 sp=0xc00056f648 pc=0x44d00ff
main.(*Renderer).setFont(0x4bc0050, 0x41200000, 0xc000560090, 0x10, 0xc000539100, 0x0, 0x0, 0xc0000d6700)
    /Users/andis.sprinkis/Downloads/neoray-0.0.9/src/renderer.go:68 +0xb8 fp=0xc00056f708 sp=0xc00056f6e0 pc=0x44cfc18
main.(*UIOptions).setGuiFont(0x4bc0120, 0xc0005140c0, 0x12)
    /Users/andis.sprinkis/Downloads/neoray-0.0.9/src/uioptions.go:65 +0x496 fp=0xc00056f890 sp=0xc00056f708 pc=0x44d9bb6
main.option_set(0xc00017e330, 0x1, 0x1)
    /Users/andis.sprinkis/Downloads/neoray-0.0.9/src/redrawevents.go:108 +0x2bc fp=0xc00056f998 sp=0xc00056f890 pc=0x44c74dc
main.handleRedrawEvents()
    /Users/andis.sprinkis/Downloads/neoray-0.0.9/src/redrawevents.go:28 +0x4cd3 fp=0xc00056fae0 sp=0xc00056f998 pc=0x44c5513
main.(*Editor).update(0x4bbfec0)
    /Users/andis.sprinkis/Downloads/neoray-0.0.9/src/editor.go:171 +0x34 fp=0xc00056fb00 sp=0xc00056fae0 pc=0x44adc94
main.(*Editor).MainLoop(0x4bbfec0)
    /Users/andis.sprinkis/Downloads/neoray-0.0.9/src/editor.go:154 +0x62d fp=0xc00056fcd0 sp=0xc00056fb00 pc=0x44ad9cd
main.main()
    /Users/andis.sprinkis/Downloads/neoray-0.0.9/src/main.go:69 +0x447 fp=0xc00056ff88 sp=0xc00056fcd0 pc=0x44b7767
runtime.main()
    /usr/local/Cellar/go/1.16.6/libexec/src/runtime/proc.go:225 +0x256 fp=0xc00056ffe0 sp=0xc00056ff88 pc=0x403e4f6
runtime.goexit()
    /usr/local/Cellar/go/1.16.6/libexec/src/runtime/asm_amd64.s:1371 +0x1 fp=0xc00056ffe8 sp=0xc00056ffe0 pc=0x4077161

goroutine 20 [IO wait]:
internal/poll.runtime_pollWait(0xbd61320, 0x72, 0x0)
    /usr/local/Cellar/go/1.16.6/libexec/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc0000ac098, 0x72, 0x0, 0x0, 0x45f0315)
    /usr/local/Cellar/go/1.16.6/libexec/src/internal/poll/fd_poll_runtime.go:87 +0xe6
internal/poll.(*pollDesc).waitRead(...)
    /usr/local/Cellar/go/1.16.6/libexec/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc0000ac080, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.16.6/libexec/src/internal/poll/fd_unix.go:401 +0x32f
net.(*netFD).accept(0xc0000ac080, 0x50, 0x404ea3c, 0xc000288c78)
    /usr/local/Cellar/go/1.16.6/libexec/src/net/fd_unix.go:172 +0x58
net.(*TCPListener).accept(0xc0000bc000, 0x30, 0x30, 0x57aa5b8)
    /usr/local/Cellar/go/1.16.6/libexec/src/net/tcpsock_posix.go:139 +0x50
net.(*TCPListener).Accept(0xc0000bc000, 0xc0000a41b0, 0xc000288ce8, 0x41b64d0, 0xc0000a41d0)
    /usr/local/Cellar/go/1.16.6/libexec/src/net/tcpsock.go:261 +0x8e
net/http.(*Server).Serve(0xc000098000, 0x46ba970, 0xc0000bc000, 0x0, 0x0)
    /usr/local/Cellar/go/1.16.6/libexec/src/net/http/server.go:2961 +0x470
net/http.(*Server).ListenAndServe(0xc000098000, 0xd8, 0x0)
    /usr/local/Cellar/go/1.16.6/libexec/src/net/http/server.go:2890 +0x10a
net/http.ListenAndServe(...)
    /usr/local/Cellar/go/1.16.6/libexec/src/net/http/server.go:3144
main.start_pprof.func1()
    /Users/andis.sprinkis/Downloads/neoray-0.0.9/src/utils_debug.go:27 +0x105
created by main.start_pprof
    /Users/andis.sprinkis/Downloads/neoray-0.0.9/src/utils_debug.go:26 +0x45

goroutine 21 [select]:
os/exec.(*Cmd).Start.func2(0xc0001cd760)
    /usr/local/Cellar/go/1.16.6/libexec/src/os/exec/exec.go:449 +0x136
created by os/exec.(*Cmd).Start
    /usr/local/Cellar/go/1.16.6/libexec/src/os/exec/exec.go:448 +0xbaf

goroutine 22 [runnable]:
github.com/neovim/go-client/msgpack.(*Decoder).Unpack(0xc00010e640, 0xc00045fb00, 0xc00037248c)
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/msgpack/unpack.go:159 +0xe9f
github.com/neovim/go-client/msgpack.(*decodeState).unpack(...)
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/msgpack/decode.go:49
github.com/neovim/go-client/msgpack.decodeNoReflect(0xc000822750, 0x0, 0x0)
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/msgpack/decode.go:666 +0x5f9
github.com/neovim/go-client/msgpack.decodeNoReflect(0xc000822750, 0x0, 0x0)
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/msgpack/decode.go:658 +0x465
github.com/neovim/go-client/msgpack.decodeNoReflect(0xc000822750, 0xc000710bf0, 0x194)
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/msgpack/decode.go:658 +0x465
github.com/neovim/go-client/msgpack.interfaceDecoder(0xc000822750, 0x4580320, 0xc000710bf0, 0x194)
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/msgpack/decode.go:363 +0x110
github.com/neovim/go-client/msgpack.sliceArrayDecoder.decodeSlice(0x4646318, 0xc000822750, 0x4570580, 0xc0000267e0, 0x197)
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/msgpack/decode.go:422 +0x22e
github.com/neovim/go-client/msgpack.(*Decoder).Decode(0xc00010e640, 0x45652a0, 0xc0000267e0, 0x0, 0x0)
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/msgpack/decode.go:114 +0x22d
github.com/neovim/go-client/msgpack/rpc.(*Endpoint).createCall(0xc00011d520, 0xc0003673e0, 0xc000372140, 0x6, 0xc00011d820, 0x1, 0x0, 0xc000113e10)
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/msgpack/rpc/rpc.go:461 +0x93f
github.com/neovim/go-client/msgpack/rpc.(*Endpoint).handleNotification(0xc00011d520, 0x3, 0xc, 0x2)
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/msgpack/rpc/rpc.go:640 +0x185
github.com/neovim/go-client/msgpack/rpc.(*Endpoint).Serve(0xc00011d520, 0x0, 0x0)
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/msgpack/rpc/rpc.go:218 +0x2ab
github.com/neovim/go-client/nvim.(*Nvim).Serve(0xc00011b4d0, 0x0, 0x0)
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/nvim/nvim.go:53 +0xae
github.com/neovim/go-client/nvim.(*Nvim).startServe.func1(0xc00011b4d0)
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/nvim/nvim.go:59 +0x3d
created by github.com/neovim/go-client/nvim.(*Nvim).startServe
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/nvim/nvim.go:58 +0x9f

goroutine 50 [semacquire]:
sync.runtime_SemacquireMutex(0xc0003008fc, 0x900000000, 0x1)
    /usr/local/Cellar/go/1.16.6/libexec/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc0003008f8)
    /usr/local/Cellar/go/1.16.6/libexec/src/sync/mutex.go:138 +0x1d4
sync.(*Mutex).Lock(0xc0003008f8)
    /usr/local/Cellar/go/1.16.6/libexec/src/sync/mutex.go:81 +0x85
main.(*NvimProcess).startUI.func1(0xc0000a4240, 0x2, 0x2)
    /Users/andis.sprinkis/Downloads/neoray-0.0.9/src/nvimproc.go:233 +0x88
reflect.Value.call(0x4574420, 0xc000374390, 0x13, 0x45f178e, 0x9, 0xc000129d70, 0x1, 0x1, 0x404ea3c, 0x450d3c0, ...)
    /usr/local/Cellar/go/1.16.6/libexec/src/reflect/value.go:476 +0x99c
reflect.Value.CallSlice(0x4574420, 0xc000374390, 0x13, 0xc000129d70, 0x1, 0x1, 0x41b302a, 0xc00011d5e8, 0x1)
    /usr/local/Cellar/go/1.16.6/libexec/src/reflect/value.go:350 +0xd9
github.com/neovim/go-client/msgpack/rpc.(*Endpoint).runNotifications(0xc00011d520)
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/msgpack/rpc/rpc.go:677 +0xf1
created by github.com/neovim/go-client/msgpack/rpc.(*Endpoint).Serve
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/msgpack/rpc/rpc.go:192 +0x18d

goroutine 23 [semacquire]:
sync.runtime_SemacquireMutex(0xc00011b4fc, 0x900000000, 0x1)
    /usr/local/Cellar/go/1.16.6/libexec/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc00011b4f8)
    /usr/local/Cellar/go/1.16.6/libexec/src/sync/mutex.go:138 +0x1d4
sync.(*Mutex).Lock(0xc00011b4f8)
    /usr/local/Cellar/go/1.16.6/libexec/src/sync/mutex.go:81 +0x85
github.com/neovim/go-client/nvim.(*Nvim).Serve(0xc00011b4d0, 0x0, 0x0)
    /Users/andis.sprinkis/go/pkg/mod/github.com/neovim/go-client@v1.1.7/nvim/nvim.go:51 +0x56
main.(*NvimProcess).startUI.func2(0x4bbfec0)
    /Users/andis.sprinkis/Downloads/neoray-0.0.9/src/nvimproc.go:240 +0x59
created by main.(*NvimProcess).startUI
    /Users/andis.sprinkis/Downloads/neoray-0.0.9/src/nvimproc.go:239 +0x44a

Debug output (you can generate starting neoray with --verbose option)

hismailbulut commented 3 years ago

Can you try start neoray with this command: neoray -u NORC --noplugin

andis-sprinkis commented 3 years ago

Can you try start neoray with this command: neoray -u NORC --noplugin

Then it actually starts.

hismailbulut commented 3 years ago

I haven't tested the commit, please try the new version and let me know if it was fixed.

andis-sprinkis commented 3 years ago

@hismailbulut I can confirm that 0.1.0 built from source starts up fine with above mentioned setup.