Closed ChrKn closed 1 year ago
Ah, what a specific crash.
I think I know the overall cause of the crash, but I'll need to debug the code to fix it.
Thanks for the report and thorough investigation! I managed to reproduce it on Mac as well, it crashes with the following stacktrace:
ERROR: Oops, crashed with signal 11 :(
INFO: 0 julius 0x0000000102be7a1a backtrace_print + 42
INFO: 1 julius 0x0000000102be38a5 handler + 37
INFO: 2 libsystem_platform.dylib 0x00007fff77fb4b5d _sigtramp + 29
INFO: 3 AppKit 0x00007fff49e52f96 GCC_except_table7 + 2250
INFO: 4 julius 0x0000000102be2cf4 platform_file_manager_compare_filename_prefix + 36
INFO: 5 julius 0x0000000102cb3b31 find_first_file_with_prefix + 193
INFO: 6 julius 0x0000000102cb38ef scroll_to_typed_text + 111
INFO: 7 julius 0x0000000102cb32b6 handle_input + 294
INFO: 8 julius 0x0000000102c7e7bd window_draw + 125
INFO: 9 julius 0x0000000102c4c76b game_draw + 11
INFO: 10 julius 0x0000000102be37ca run_and_draw + 26
INFO: 11 julius 0x0000000102be383f main_loop + 95
INFO: 12 julius 0x0000000102be358f main + 95
INFO: 13 libdyld.dylib 0x00007fff77dc93d5 start + 1
That was quick. I was unsure if such a weird and specific crash would even warrant a fix attempt.
Julius 1.7.0 on Windows 10 using the GOG version of C3.
Okay, this is a weird one. It only happens, when there are exactly 100 saves and the name for the save file would be the last in the list, e.g.
a.sav b.sav ... z.sav zzz.sav « new file
I have attached three sets of save files to potentially reproduce the problem. Should in theory work whenever there are 100 saves. The files I have renamed are Trading Trouble 01 to 15, because those were the ones I first encountered the bug with and used to try to narrow it down with.
Tests I have done: