Phazorknight / Cogito

Immersive Sim Template Project for GODOT 4
MIT License
717 stars 81 forks source link

Crash when opening escape menu #101

Closed ac-arcana closed 4 months ago

ac-arcana commented 4 months ago

On the latest build I am crashing whenever I press escape. It is crashing on player_state_savetime on tab_menu_controller.gd:82

I deleted my userdata and this crash persists.

Phazorknight commented 4 months ago

Does this line appear in your output log? CSM: Get existing player state: No player state found for slot [slot]

In any case, I'm pretty sure this is due to my careless implementation on how the menu reads any existing saved 😅 (deleting the data in this case unfortuantely won't help). Should hopefully have a fix for you shortly...

ac-arcana commented 4 months ago

image

Phazorknight commented 4 months ago

Can you give https://github.com/Phazorknight/Cogito/commit/aca79f53e292f55dbdc8b99b821605978c86f484 a try and see if that fixes it for you?

ac-arcana commented 4 months ago

Crashing in a different spot now...

image

image

Phazorknight commented 4 months ago

Okay, so this error is related to how the system time and date is read into a string and then parsed. It just occurred to me that this string can probably differ in it's formatting depending on the OS settings.

Unfortuantely that's gonna be a bit tricky to troubleshoot for me, but if you could just add this line in the _ready() function of the cogito_scene_manager.gd and let me know what it prints out, it should help me narrow it down.

print("System datetime string: ", Time.get_datetime_string_from_system(false))

ac-arcana commented 4 months ago

image as you requested :)

Phazorknight commented 4 months ago

@ac-arcana this looks like the time string format I worked with, so still odd that you got an error. Anyway, I just merged @FailSpy 's PR with a possible fix into main.

Could you give it a go and see if it solves your issue?

(edit: accidentally closed this, reponed now)

ac-arcana commented 4 months ago

It is fixed, thank you!