James Payne
7 posts
Segfault in 4.0.25
Edited by James Payne on Reason: Initial post
Might already be fixed in your dev version but worth mentioning anyway, I'm getting a segfault when editing a file on my system using 4coder

 1 2 3 Thread 1 "4ed" received signal SIGSEGV, Segmentation fault. draw_file_loaded (target=0x7b11e0 , is_active=1, models=0x7ffff3205000, view=0x7ffff32399e8, system=0x7b14a0 , rect=...) at /home/allen/4ed/code/4ed_file_view.cpp:6099 6099 /home/allen/4ed/code/4ed_file_view.cpp: No such file or directory. 

Backtrace:

 1 2 3 4 5 6 (gdb) backtrace #0 draw_file_loaded (target=0x7b11e0 , is_active=1, models=0x7ffff3205000, view=0x7ffff32399e8, system=0x7b14a0 , rect=...) at /home/allen/4ed/code/4ed_file_view.cpp:6099 #1 do_render_file_view ([email protected]=0x7b14a0 , [email protected]=0x7ffff32399e8, [email protected]=0x7ffff3205000, scroll=0x7fffa808b9c0, rect=..., is_active=1, target=0x7b11e0 , user_input=0x7fffffff9940, active=) at /home/allen/4ed/code/4ed_file_view.cpp:6509 #2 0x00007fffb25f171e in app_step (system=, target=, memory=, input=, app_result_=) at /home/allen/4ed/code/4ed.cpp:2402 #3 0x00000000004065ed in main (argc=, argv=) at /home/allen/4ed/code/platform_linux/linux_4ed.cpp:1946 

Seems to be occurring when I add a "-" into a particular line in a file and is repeatable currently on my system.

Allen Webster
473 posts / 4 projects
Heyo
Segfault in 4.0.25
Good news! This is fixed most likely, there isn't quite enough information here to be 100% sure but I'm pretty sure. Thanks for the report. When you're encountering this issue, if you'd rather keep using 4coder instead of switching editors, then when you reload the file, paste in a big chunk of code, delete the code, and continue editing as normal. The bug has to do with the first time a medium size file crosses the 4096 token count, and the render loop reads past the end of the token array by one... if it's the same bug that is.
James Payne
7 posts
Segfault in 4.0.25
Cool thanks Allen, I'll give it a go :)
James Payne
7 posts
Segfault in 4.0.25
Yup, that works thank you! :)

Will it be incorporated into a release on the itch.io page at some point?
Allen Webster
473 posts / 4 projects
Heyo
Segfault in 4.0.25
Yep in the next build (4.0.26)