-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Savestate Loading doesn't work in Celeste64, causes SIGSEGV in ThreadManager.cpp
#591
Comments
One of the issues is present when enabling the checkpoint log, because appending the log line to ImGui log window may cause a malloc. However, no memory allocation must be performed during checkpoint code, nothing that can alter the process memory mapping. But the main issue lies in the following line: libTAS/src/library/checkpoint/Checkpoint.cpp Line 702 in a3246fe
Knowing that in Celeste64, one of the memory segments has a size of 274 GB! Adding the write flag commits the allocated memory, hence the memory allocation error. I could fix it already, I'm only calling the This is related to a more general issue that I couldn't really solve. I would really like to be able to see if a memory page is mapped to a physical page or not. There is the When I implemented the above fix, the 274GB segment got fragmented multiple times, which should mean that some memory pages where committed because they are flagged as We would have more understanding if we could look at |
Interesting. After that change, I can now savestate (with skip unmapped pages at least, without that option I get "state invalid because new threads were created" 100% of the time). When launching with GDB, I still get the |
The |
When I start the game without gdb, save a state and then load it, one of messages gets printed:
or
or
or
or just
When I start the game in gdb, I get this backtrace
libTAS/src/library/checkpoint/ThreadManager.cpp
Lines 105 to 106 in a3246fe
There's a null check, so maybe this is related to the fact that
current_thread
is a thread_local?The text was updated successfully, but these errors were encountered: