steward-fu / nds

NDS Emulator (DraStic) for Miyoo A30, Miyoo Mini (Plus), TRIMUI SMART and F(x)tec Pro1 (QX1000)
https://steward-fu.github.io/website/index.htm
GNU General Public License v3.0
150 stars 14 forks source link

The command of kill causes savestate corrupted #13

Closed steward-fu closed 11 months ago

steward-fu commented 11 months ago

Send many kill commands to DraStic emulator and then got corrupted savestate.

steward-fu commented 11 months ago

In current design, we added some hooking points in DraStic emulator to prevent from corrupted savestate.

/ # ps aux | grep dras
 1278 root       0:00 {launch.sh} /bin/sh /mnt/SDCARD/Emu/drastic/launch.sh /mnt/SDCARD/Roms/NDS/test.nds
 1300 root       0:01 ./drastic /mnt/SDCARD/Roms/NDS/test.nds
 1320 root       0:00 grep dras

/ # kill 1300; kill 1300; kill 1300; kill 1300; kill 1300; 
/ # [SDL] Oops sigterm !
0 mini hash hits out of 0 accesses (nan%)
0 hash accesses:
 nan% hit in one hop
 nan% hit in two hops
 nan% hit in three hops
 nan% hit in four or more hops
Saving directory config to file named /mnt/SDCARD/Emu/drastic/config/drastic.cf2
Saving state to /mnt/SDCARD/Emu/drastic/savestates/_savestate_temp.dss.
RTC: Loaded savestate time Tue Nov 14 16:18:41 2023
[SDL] wait for savestate complete
Renaming savestate file to /mnt/SDCARD/Emu/drastic/savestates/test_10.dss.
[SDL] wait for savestate done
[SDL] writing settings to json file done !