Skip to content
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

Game crashes sometimes on scene change #2821

Open
Poobslag opened this issue Oct 15, 2024 · 7 comments · Fixed by #2825, #2824, #2838 or #2872
Open

Game crashes sometimes on scene change #2821

Poobslag opened this issue Oct 15, 2024 · 7 comments · Fixed by #2825, #2824, #2838 or #2872
Labels
bug Something isn't working priority-3 This is very noticable. It should be completed, certain players would consider it a "must have".

Comments

@Poobslag
Copy link
Owner

Poobslag commented Oct 15, 2024

In Adventure mode, I finished a level in Starberry Mountain. Instead of being dropped back to the map screen, the game crashed.

godot2024-10-15T12.34.30.log
godot.log
godot(4).log

The logs apparently show that the game was in the process of retrieving the achievement status for many achievements.

@Poobslag Poobslag added bug Something isn't working priority-3 This is very noticable. It should be completed, certain players would consider it a "must have". labels Oct 15, 2024
@Poobslag
Copy link
Owner Author

It always seems to be for the "aggregate achievement" achievement triggering the crash -- the one that checks for all of the dependent achievements.

@Poobslag
Copy link
Owner Author

func is_achievement_achieved(id: String) -> bool:
	_log("Getting Steam achievement: %s" % [id])
	var get_achievement_response: Dictionary = Steam.getAchievement(id)
	_log("getAchievement(%s) response: %s" % [id, get_achievement_response])
	
	return get_achievement_response["achieved"]

Maybe we should check achievements differently? This method optimistically assumes the method will always return a dictionary with an achieved boolean in it. Maybe it returns garbage sometimes?

@Poobslag Poobslag added priority-2 This is important. It must be completed before 1.0. and removed priority-3 This is very noticable. It should be completed, certain players would consider it a "must have". labels Oct 15, 2024
@Poobslag
Copy link
Owner Author

Poobslag commented Oct 16, 2024

I've made a new version of the game which checks these getAchievement responses and makes fewer steam calls, but it still crashed a moment ago. I'm hoping that if I run the game with --verbose flag enabled, it will maybe log something about the crash -- but it crashes very unpredictably.

On Monday, I playtested for 12 hours and the game didn't crash once. On Tuesday, it crashed 2 or 3 times for me! All of the crashes for me were during levels in Starberry Mountain.

Faulting application name: turbofat.exe, version: 1.3.0.0, time stamp: 0x66f60127
Faulting module name: ntdll.dll, version: 10.0.19041.5007, time stamp: 0x688f8c4b
Exception code: 0xc0000374
Fault offset: 0x00000000000ff3c9
Faulting process id: 0x6818
Faulting application start time: 0x01db1fe5d89fcc3c
Faulting application path: C:\workspace\steam\steamworks-sdk\tools\ContentBuilder\content\turbofat-win\turbofat.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: ae5dedad-6e58-4cb7-b4c4-839f75a74871
Faulting package full name: 
Faulting package-relative application ID: 

@Poobslag Poobslag changed the title Game crashes sometimes when trying to get many achievements Game crashes sometimes on scene change Oct 16, 2024
@Poobslag
Copy link
Owner Author

godotengine/godot#85692

This may be related to Godot #85692. We could try adjusting breadcrumb.change_scene() to do something different.

@Poobslag Poobslag linked a pull request Oct 18, 2024 that will close this issue
@Poobslag
Copy link
Owner Author

Poobslag commented Oct 18, 2024

This seems to be happening less frequently after the recent changes, but it is still affecting some users.

One user says it seems to be growing more frequent; the simplest explanation for growing more frequent over time would be that it's tied to save file size. Let's experiment with making the save file very large, or having them change save files.

@Poobslag Poobslag linked a pull request Oct 28, 2024 that will close this issue
@Poobslag
Copy link
Owner Author

I've removed the ResourceCache singleton logic; while I never had any evidence this was broken, it's kind of a weird nasty thing I probably shouldn't be doing.

@Poobslag Poobslag added this to the Post-release tweaks milestone Nov 1, 2024
@Poobslag
Copy link
Owner Author

Poobslag commented Nov 19, 2024

It's been about 2-3 weeks since anyone reported a scene change crash, I think the ResourceCache singleton logic fixed most of them.

I encountered a crash within the Godot editor about five days ago, so I'm leaving logging enabled there to see if I can track that down. But for now, I'm downgrading this to a 3 and removing it from the milestone since it doesn't seem to be affecting players anymore.

@Poobslag Poobslag added priority-3 This is very noticable. It should be completed, certain players would consider it a "must have". and removed priority-2 This is important. It must be completed before 1.0. labels Nov 19, 2024
@Poobslag Poobslag removed this from the Post-release tweaks milestone Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-3 This is very noticable. It should be completed, certain players would consider it a "must have".
Projects
None yet
1 participant