vlang / ved

1 MB text editor written in V with hardware accelerated text rendering. Compiles in <1s.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vid not working in Manjaro (Arch)

jangofett4 opened this issue · comments

commented

System Information

image
freetype2 and glfw-x11 is installed (couldn't find freetype6 and 'normal' glfw)

Steps to reproduce

  1. Clone and compile
$ git clone https://github.com/vlang/vid
$ cd vid
$ v .
  1. Run
$ ./vid

A fullscreen app opens and closes immediately leaving behind this log:

create window wnd=0x556517844fc0 ptr==0x556517843f10
Trying to load font from RobotoMono-Regular.ttf
Parçalama arızası (çekirdek döküldü) // this says segmentation fault (core halted?)

RobotoMono-Regular.ttf does exists in vid folder. This problem is probably caused from freetype or glfw but not entirely sure.

commented

So I think I pinpointed where the error occurs:
image
Not sure what 'timer' is or what this function is loading but at first line string.contains is segfaulting (seems like a v error?)

I've got the same error on MacOs Catalina :

Capture d’écran 2020-02-11 à 15 26 29

freetype does not install RobotoMono-Regular.ttf

I've installed it with this font zip package but it didn't resolve anything : https://www.wfonts.com/font/roboto-mono

Capture d’écran 2020-02-11 à 15 29 04

I suppose that : in Mac you need to call RobotoMono font and not RobotoMono-Regular

Check partial solution in #63

This seg fault isn't a problem with the font file and @jangofett4 is correct that the lines of code he highlighted are where the seg fault happens. The error is due to 'line' pointing to invalid memory on the first iteration of the for loop at line 53, but the actual problem is due to some missing files and improper checks (or defaults) imo.

Please try again with the latest version of V. I can't test on either Manjaro or Mac, but I just compiled ved on both Windows and Ubuntu Linux, and it compiled clean and ran fine.