View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002501 | FSSCP | models | public | 2011-09-15 10:14 | 2011-09-26 11:20 |
Reporter | niffiwan | Assigned To | niffiwan | ||
Priority | normal | Severity | minor | Reproducibility | random |
Status | resolved | Resolution | fixed | ||
Product Version | 3.6.13 | ||||
Fixed in Version | 3.6.13 | ||||
Summary | 0002501: models without correct glowpoint textures can cause crash | ||||
Description | This was reported here as occurring in certain missions in WoD: http://www.hard-light.net/forums/index.php?topic=78123.0 | ||||
Tags | No tags attached. | ||||
|
Waiting on kir2yar to provide feedback via forum |
|
The cause seems to be that a texture is not defined for a models glowpoint. When the model-read code checks the glowpoints, it does a check that the texture string is greater than length zero. However there is nothing to handle the case when the string is length zero or less. Therefore you can have uninitialized memory determining what the texture is. This causes random crashes as some random memory values work OK (i.e. less than 0 are ignored), but others don't. The attached patch sets the glowpoint texture indexes to -1 when the glowpoint string is length < zero. |
2011-09-15 10:16
|
mantis2501.patch (701 bytes)
Index: code/model/modelread.cpp =================================================================== --- code/model/modelread.cpp (revision 7707) +++ code/model/modelread.cpp (working copy) @@ -1753,6 +1753,11 @@ { nprintf(( "Model", "Glow point bank %i nebula texture num is %d for '%s'\n", gpb, bank->glow_neb_bitmap, pm->filename)); } + } else { + // niffiwan: no "props" string found - ensure we don't have a random texture assigned! + bank->glow_bitmap = -1; + bank->glow_neb_bitmap = -1; + Warning( LOCATION, "No Glow point texture for bank '%d' referenced by model '%s'\n", gpb, pm->filename); } for (j = 0; j < bank->num_points; j++) |
|
Committed to trunk revision 7811 |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-09-15 10:14 | niffiwan | New Issue | |
2011-09-15 10:14 | niffiwan | Status | new => assigned |
2011-09-15 10:14 | niffiwan | Assigned To | => niffiwan |
2011-09-15 10:15 | niffiwan | Note Added: 0012820 | |
2011-09-15 10:15 | niffiwan | Status | assigned => feedback |
2011-09-15 10:16 | niffiwan | Note Added: 0012821 | |
2011-09-15 10:16 | niffiwan | File Added: mantis2501.patch | |
2011-09-15 10:17 | niffiwan | Note Edited: 0012820 | |
2011-09-26 11:19 | niffiwan | Note Added: 0012861 | |
2011-09-26 11:20 | niffiwan | Status | feedback => resolved |
2011-09-26 11:20 | niffiwan | Fixed in Version | => 3.6.13 |
2011-09-26 11:20 | niffiwan | Resolution | open => fixed |