bakkesmodorg / BakkesModSDK

The current BakkesModSDK (Unofficial SDK for Rocket League)
http://bakkesmod.com
223 stars 49 forks source link

SDK Crash in GetUserLoadoutSave #58

Open tgracin opened 1 year ago

tgracin commented 1 year ago

I am developing a plugin (forking OrganizeMyGarageOpenSource) and I noticed a SDK crash in function GetUserLoadoutSave of class GameWrapper. You won't see much from the log, but here it is: Launch.log

More details: In the log you can see it crashed in pluginsdk.dll just after calling GarageModel::EquipPresetPrivate(). The line in which it crashes is this: const auto presetWrapper = gw->GetUserLoadoutSave();

Setup: I attached an Event to Function TAGame.GameEvent_Soccar_TA.Destroyed which calls this function.

Scenario: This works as intended in offline matches (exhibitions) or leaving freeplay, but if you play a casual/ranked match and click "quick play" or "ready" button after a game is over (to play another game), this event which we hooked to (TAGame.GameEvent_Soccar_TA.Destroyed) will be triggered at the same moment when game reconnects between servers. My assumption is that this function uses a pointer that is not longer valid (previous server). Hence, the game crashes.

I checked, and the pointer to GameWrapper is still valid when the function is called.

Martinii89 commented 1 year ago

Thanks for the report. I've been able to replicate the crash on my end. I'll investigate the cause and try to get it fixed for the next release.

Martinii89 commented 1 year ago

Can you dm me on discord? (Martinn#1036)

77FN7 commented 1 year ago

this my discord OFN#5199