code-disaster / steamworks4j

A thin Java wrapper to access the Steamworks API
https://code-disaster.github.io/steamworks4j/
MIT License
468 stars 64 forks source link

EXCEPTION_ACCESS_VIOLATION in SteamUGC.getQueryUGCResult #139

Closed Zarkonnen closed 6 months ago

Zarkonnen commented 6 months ago

As of about 3 days ago, steamworks4j started crashing my game with an EXCEPTION_ACCESS_VIOLATION during SteamUGC.getQueryUGCResult. Note that the game didn't change at that time, so maybe this is a difference in what the Steam API is doing.

This is happening both with steamworks4j 1.3 and 1.9. This is causing the game to crash on startup for an increasing number of players. Unfortunately, I don't know anything about debugging JNI calls.

I've attached hs_err_pid.log files:

Linux/1.9: hs_err_pid4334.log

Windows/1.3: hs_err_pid8304.log

code-disaster commented 6 months ago

Hm are you trying to cache the SteamUGCQuery instance to process it later? I never tried to call that function outside the UGC callback. See https://github.com/code-disaster/steamworks4j/blob/master/tests/src/main/java/com/codedisaster/steamworks/test/SteamClientAPITest.java#L268-L274.

Zarkonnen commented 6 months ago

Ooh, that might be why. Let me try, thank you!

Zarkonnen commented 6 months ago

Yes, I can confirm that this was caused by my attempting to access query information outside the callback.