Skip to content

Conversation

patrikjuvonen
Copy link
Contributor

@patrikjuvonen patrikjuvonen commented Aug 4, 2018

Mantis Bug Tracker issue
9139, fixes #446

Summary:

@patrikjuvonen patrikjuvonen added the bug Something isn't working label Aug 4, 2018
@patrikjuvonen patrikjuvonen added this to the 1.5.6 milestone Aug 4, 2018
@patrikjuvonen
Copy link
Contributor Author

Now that I think of it, are these supposed to support vehicle and ped models too?

@qaisjp
Copy link
Contributor

qaisjp commented Aug 4, 2018

does it work with vehicle and ped models?

@patrikjuvonen
Copy link
Contributor Author

Seems like it does. I'll add those model checks in as well.

@qaisjp
Copy link
Contributor

qaisjp commented Aug 16, 2018

What kind of crash is caused, and where does it crash?

pModelInfo is currently (or should be) returning NULL for incorrect values so the current code (in master) should not be crashing.

If there is an underlying bug with CGameSA::GetModelInfo then that should be fixed instead.

@Pirulax
Copy link
Contributor

Pirulax commented Aug 16, 2018

It doesn't crash with invalid modelID, it just returns false.
At least for me.

@qaisjp qaisjp added the feedback Further information is requested label Aug 23, 2018
@qaisjp
Copy link
Contributor

qaisjp commented Aug 29, 2018

This bug seems to be associated with https://github.com/multitheftauto/mtasa-blue/pull/155/files.

It returns true on this line: https://github.com/multitheftauto/mtasa-blue/pull/155/files#diff-3beea7b726cdd57f96a6d8226af4eb9fR538

Removing the offending line does not fix the problem. Returning false fixes the problem. Is return true a typo?

cc @Sergeanur @botder

@qaisjp qaisjp removed this from the 1.5.6 milestone Sep 2, 2018
@Sergeanur
Copy link
Contributor

I don't quite remember, but I think CModelInfoSA::IsValid was used on animation request, so return true was required.

@patrikjuvonen patrikjuvonen added this to the 1.5.7 milestone Sep 4, 2018
@qaisjp qaisjp removed this from the 1.5.7 milestone Sep 7, 2018
@patrikjuvonen
Copy link
Contributor Author

patrikjuvonen commented Jan 3, 2019

I guess another option is to mark any 20000+ invalid (or make a separate IsValid method that doesn't care if it's 20000+...)

This is what I've been able to find out so far:

If the name starts with "txd", assume it's refering to a global txd. (https://github.com/multitheftauto/mtasa-blue/blob/master/Client/mods/deathmatch/logic/CModelNames.cpp#L10480)

Encode global txd as model id 20000+ (https://github.com/multitheftauto/mtasa-blue/blob/master/Client/mods/deathmatch/logic/CModelNames.cpp#L10498)

So some "global txd" is what 20000+ ids are, then causes a crash. No actual model has an id of 20000+ so I mean it must be related to some other internal SA fact how things work.

EDIT:
#784 (comment)
@forkerer commented:

As far as I'm aware, (and in the IDB i'm using), 20000 is original size of that array in gta sa, trying to change physical properties of anything above that crashes the client. I think the additional space reserved in CGameSA (up to 26000) was made either by mistake, or in case of mta team wanting to expand some limits.

@patrikjuvonen patrikjuvonen added this to the Backlog milestone Feb 23, 2019
@patrikjuvonen patrikjuvonen removed the feedback Further information is requested label Feb 24, 2019
@patrikjuvonen patrikjuvonen modified the milestones: Backlog, 1.5.7 Feb 24, 2019
@patrikjuvonen patrikjuvonen merged commit 944ecde into multitheftauto:master Feb 24, 2019
@patrikjuvonen patrikjuvonen deleted the issue-9139 branch February 24, 2019 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

engineSetModelLODDistance(20000,1000) causes client crash
4 participants