View Issue Details

IDProjectCategoryView StatusLast Update
0004010Multi Theft Auto : San AndreasClientpublic2013-06-07 12:18
ReporterrobholAssigned ToArc 
PrioritynormalSeveritymajorReproducibilityrandom
Status resolvedResolutionfixed 
Product Version 
Target Version1.0Fixed in Version1.0 
Summary0004010: setPedSkin randomly doesn't work.
Description

Summary says it all. Sometimes, without any apparent reason, setPedSkin doesn't work. Applies to both players and peds.

TagsNo tags attached.

Activities

robhol

2009-03-25 13:24

reporter   ~~0008629

Last edited: 2009-03-25 13:40

Still messes up in the later nightlies using setElementModel. Even when setting the skin fails, (ie. it doesn't change,) the function returns true.

Happens randomly, but on the same skin IDs: apparently which skins it affects changes after a reconnect. When a skin doesn't work, it will continue not working for that entire session, until player reconnects again.

Edit: spawnPlayer also seems unreliable, making this issue somewhat more critical, since there's no way of setting a player or ped's skin reliably now...

ccw

2009-03-27 17:25

administrator   ~~0008658

Last edited: 2009-03-27 17:27

This seems to be a failure in CModelInfoSA:

Occasionally there a persistent failure to load a particular model. When this fail occurs the following is noted:
a) FUNC_CStreamingHasModelLoaded will always return 0 for that model.
b) ARRAY_ModelLoaded, which usually mirrors the return value of FUNC_CStreaming
HasModelLoaded (i.e. 0=Model not loaded; 1=Model loaded), is set to 2.
c) The only way to recover is to restart the client.

Thoughts on solving the issue:
a) Sometimes the failed models seem to be related in some fashion. i.e. If rollergirl fails, then so might rollerguy. So could it be animation related? Or sounds?
b) The value of 2 in ARRAY_ModelLoaded is probably some sort of error code.
Would be helpful to find out what it means.

ccw

2009-03-27 20:33

administrator   ~~0008661

Added a way to reproduce the issue in brophy.lua (r97)
Start the test with 'steston'
Stop the test with 'stestoff'

Added debug tracing lines to CModelInfoSA::IsLoaded (r564)

It also looks like the value of 2 in ARRAY_ModelLoaded is not set in FUNC_CStreaming__HasModelLoaded, but elsewhere.

I can do no more here. Someone familiar with Game SA needs to look at this.

Arc

2009-03-27 23:04

administrator   ~~0008669

Last edited: 2009-03-27 23:24

The successful loading of a model goes as follows:

  • 408989: the value in ARRAY_ModelLoaded is set to 2 (guessing "load requested")
  • 40CEA3: set to 3 (guessing "loading". This subroutine contains a loop and is called constantly, I guess it polls a queue of requested models)
  • 40CB71: set to 1 ("load complete")

Thus when this bug happens, the model has never actually made it into the request queue (or is being ignored for some reason).

Arc

2009-03-27 23:52

administrator   ~~0008670

Root of the bug is at 408FB9. Skin 7 must be loaded. As soon as you /setskin 7, the skins that were previously "blocked" start working again.

TheGTA

2013-06-07 12:18

updater   ~~0018688

In the eir fork you can see the model loading code. I have fixed the issue of skin 7 needing to be loaded. Animations were not loading unless skin 7 had loaded. Kind of weird. I do not experience drawbacks to removing that check (no crashes, etc).

Issue History

Date Modified Username Field Change