Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Issue 76 #78

Merged
merged 2 commits into from
Aug 24, 2022
Merged

Issue 76 #78

merged 2 commits into from
Aug 24, 2022

Conversation

carsakiller
Copy link
Owner

@carsakiller carsakiller commented Aug 24, 2022

It looks like onVehicleSpawn() is getting called before onCreate() so we cannot guarantee that g_savedata is initialized before being needed.

image

This leads to nil exceptions, especially when syncing with the companion web app.

This PR moves the initializing of g_savedata variables to be executed immediately and not in onCreate() to hopefully fix this issue.

Fixes #76, #75

Also seems to fix #77, I assume it was linked as onVehicleSpawn() was getting called before onCreate() and it was corrupting G_vehicles somehow.

@carsakiller carsakiller added bug Something isn't working g_savedata Has to do with g_savedata labels Aug 24, 2022
@carsakiller carsakiller self-assigned this Aug 24, 2022
@carsakiller carsakiller mentioned this pull request Aug 24, 2022
@carsakiller
Copy link
Owner Author

Requesting review as I just want a brief check over to see if this would interfere with the companion at all.

@carsakiller carsakiller merged commit a40d665 into main Aug 24, 2022
@carsakiller carsakiller deleted the issue-76 branch August 24, 2022 14:58
carsakiller added a commit that referenced this pull request Nov 15, 2022
* fix: move g_savedata init

* version bump
carsakiller added a commit that referenced this pull request Nov 15, 2022
* fix: move g_savedata init

* version bump
carsakiller added a commit that referenced this pull request Nov 15, 2022
* fix: move g_savedata init

* version bump
carsakiller added a commit that referenced this pull request Nov 15, 2022
* fix: move g_savedata init

* version bump
carsakiller added a commit that referenced this pull request Nov 30, 2022
* fix: move g_savedata init

* version bump
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working g_savedata Has to do with g_savedata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vehicleList not responding Issue in career C2 packetSendingQueue error when connecting carsas companion
2 participants