hismailbulut / Neoray

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

Segfault after loading of Consolas Font #21

Closed a-gerescher closed 3 years ago

a-gerescher commented 3 years ago

Please complete the following information:

Describe the bug

Without font changes there is no problem, if i change the font to Consolas, startup throws segfault.

Steps to reproduce

Your neoray config in init.vim (Only the part that concerns neoray!)

set guifont=Consolas:h10

Crash log if available (may be generated by neoray after crash)

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

[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 Win32 WGL EGL OSMesa MinGW
[DEBUG] [NEORAY] Video mode {Width:1920 Height:1080 RedBits:8 GreenBits:8 BlueBits:8 RefreshRate:60}
[DEBUG] [NEORAY] Creating window, width: 1152 height: 810
[DEBUG] [NEORAY] Glfw window created successfully.
[DEBUG] [NEORAY] Monitor diagonal: 27.01 dpi: 81.57
[DEBUG] [NEORAY] Input callbacks are initialized.
[DEBUG] [RENDERER] Initializing opengl.
[TRACE] [RENDERER] Opengl Version: 3.3.0 NVIDIA 471.41
[DEBUG] [RENDERER] Vendor: NVIDIA Corporation
[DEBUG] [RENDERER] Renderer: NVIDIA GeForce GTX 760/PCIe/SSE2
[DEBUG] [RENDERER] GLSL: 3.30 NVIDIA via Cg compiler
[DEBUG] [NEORAY] Loading default font.
[DEBUG] [NVIM] Option CursorAnimTime is 0.08
[DEBUG] [NVIM] Option Transparency is 0.95
[DEBUG] [NVIM] Option TargetTPS is 120
[WARNING] [NVIM] Invalid option BoxDrawingOn
[DEBUG] [NVIM] Option WindowSize is 120 40
[DEBUG] [NEORAY] Window size changed internally: 960 640
[DEBUG] [NEORAY] Window position centered.
[DEBUG] [NVIM] Option WindowState is centered
[DEBUG] [NVIM] Option KeyFullscreen is <M-C-CR>
[DEBUG] [NVIM] Option KeyZoomIn is <C-ScrollWheelUp>
[DEBUG] [NVIM] Option KeyZoomOut is <C-ScrollWheelDown>
[DEBUG] [NEORAY] Window is now visible.
[TRACE] [PERFORMANCE] Start time: 1.8587459s
[DEBUG] [NEORAY] Loading font Consolas with size 10
[TRACE] [NEORAY] Regular: consola.ttf
[TRACE] [NEORAY] Bold Italic: consolaz.ttf
[TRACE] [NEORAY] Italic: consolai.ttf
[TRACE] [NEORAY] Bold: consolab.ttf
Segmentation fault
hismailbulut commented 3 years ago

Hello @a-gerescher and thanks for the information. It seems like you are not using latest version, I can understand from the debug log. Please install the latest one from releases page or pull from git and recompile. If you encounter again after updating please send me the following informations: Does it only happen with Consolas font? Does it only happen at startup? (Remove guifont command from your init.vim and write it after neoray starts.) Does it happen with minimal config? (Start neoray with '-u NORC' option and write command 'set guifont=Consolas')

a-gerescher commented 3 years ago

Hello and thanks a lot. I am using the latest version from your releases page. (987338f commit) Unfortunately i am unable to compile it myself. Microsoft Build Tools are not installable on my PC. And i tried a lot. It crashes too when i start with '-u NORC' and write :set guifont=Consolas. It stops crashing if i use the default font with the latest version. Crashes too with every monospace font on my PC. Other fonts i didn't try. As i think Verdana makes no sense in an nvim client. Neovim itself doesnt crash with these fonts. Is it possible to load fonts with additional debug information?

Thanks a lot again for your work.

hismailbulut commented 3 years ago

This issue may not be a font issue and I think it's same with #17. I will ask him whether the issue has been fixed or not.

hismailbulut commented 3 years ago

Please try the new latest release and let me know if it was fixed.

a-gerescher commented 3 years ago

Fixed, works on my system.