David Butler
81 posts / 1 project
I love pretty much anything technical, whether it be programming, networking, hacking or electronics.
[Feature request] Turn missing font segfault into a fatal error with a friendly message
So, this is Day 1 with 4coder for me, having a lot of fun hacking around with it :)

after building my custom_4coder.so I bundled it with the other binaries and put them in a bin/ directory in my project directory. ( I was thinking that it would be best just to have a copy of 4coder with every project, because I was thinking I might want a different custom_4coder.so for each projects and bundling the other binaries with it ensures that they will all work together, (I'm not sure if there are linking incompatibilities between versions). This pattern might be a mistake, who knows its the first thing I tried...

Anyway, I forgot the font directory, and so I hit this:

 1 2 3 4 Thread 1 "4ed" received signal SIGSEGV, Segmentation fault. 0x00007ffff3f24132 in font_get_or_make_page (system=0x619140 , [email protected]=0x7fffd38d2048, font=0x0, [email protected]=0x622720, [email protected]=0) at /home/allen/Documents/4coder/code/4ed_font_static_functions.cpp:193 

For me it was pretty easy to figure out what was going on, but other people might not. So I was going to recommend that there be a nice user friendly message to the user why it is crashing... kinda like the messages about missing ".so" files you already have. (Which is a really nice touch by the way :) )

Anyway, this isn't really very important but thought I might mention it...

Linux Ubuntu 16.04.2 LTS 4.0.20 Super

Allen Webster
474 posts / 4 projects
Heyo
[Feature request] Turn missing font segfault into a fatal error with a friendly message
I am glad you're enjoying it!

An alternative to bundling all of 4coder with every project would be to keep just your 4coder_custom.so in each project and use the flag '-d <project>/<custom>.so' for each project, which will set it to try to load the specified file before it loads the 4coder_custom.so at the executable site. I don't know if that's more or less convenient, just another option.

Thanks for the suggestion, shouldn't be too hard to do that.