Segfault in 4.0.25

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 <target>, is_active=1, models=0x7ffff3205000, view=0x7ffff32399e8, system=0x7b14a0 <sysfunc>, 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 <target>, is_active=1, models=0x7ffff3205000, view=0x7ffff32399e8, system=0x7b14a0 <sysfunc>, rect=...) at /home/allen/4ed/code/4ed_file_view.cpp:6099
#1  do_render_file_view (system=system@entry=0x7b14a0 <sysfunc>, view=view@entry=0x7ffff32399e8, models=models@entry=0x7ffff3205000, scroll=0x7fffa808b9c0, rect=..., is_active=1, target=0x7b11e0 <target>, 
    user_input=0x7fffffff9940, active=<optimised out>) at /home/allen/4ed/code/4ed_file_view.cpp:6509
#2  0x00007fffb25f171e in app_step (system=<optimised out>, target=<optimised out>, memory=<optimised out>, input=<optimised out>, app_result_=<optimised out>) at /home/allen/4ed/code/4ed.cpp:2402
#3  0x00000000004065ed in main (argc=<optimised out>, argv=<optimised out>) 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.



Edited by James Payne on Reason: Initial post
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.
Cool thanks Allen, I'll give it a go :)
Yup, that works thank you! :)

Will it be incorporated into a release on the itch.io page at some point?
Yep in the next build (4.0.26)