Skip to content

Fixing a JSON crash on saved weapon loadout data#551

Open
Gravxd wants to merge 1 commit intoTomGrobbe:masterfrom
Gravxd:master
Open

Fixing a JSON crash on saved weapon loadout data#551
Gravxd wants to merge 1 commit intoTomGrobbe:masterfrom
Gravxd:master

Conversation

@Gravxd
Copy link

@Gravxd Gravxd commented Dec 8, 2025

Not sure how it happens but some clients get this error which persists across servers running different game builds and other data. Somehow their client sided data is corrupted, this code just provides a quick fix so that it doesn't crash building the menu making vMenu unusable for that client.

{
SavedWeapons.Add(save, JsonConvert.DeserializeObject<List<ValidWeapon>>(kvpValue));
}
catch
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's throw a JsonException (or even just an Exception) on the catch so we can see what's causing the error - might help us fix it in the future 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants