2019-10-17 00:06 EDT


View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002501FSSCPmodelspublic2011-09-26 07:20
Reporterniffiwan 
Assigned Toniffiwan 
PrioritynormalSeverityminorReproducibilityrandom
StatusresolvedResolutionfixed 
Product Version3.6.13 
Target VersionFixed in Version3.6.13 
Summary0002501: models without correct glowpoint textures can cause crash
DescriptionThis was reported here as occurring in certain missions in WoD:
http://www.hard-light.net/forums/index.php?topic=78123.0

TagsNo tags attached.
Attached Files
  • patch file icon mantis2501.patch (701 bytes) 2011-09-15 06:16 -
    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++)
    
    patch file icon mantis2501.patch (701 bytes) 2011-09-15 06:16 +

-Relationships
+Relationships

-Notes

~0012820

niffiwan (developer)

Last edited: 2011-09-15 06:17

Waiting on kir2yar to provide feedback via forum

~0012821

niffiwan (developer)

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.

~0012861

niffiwan (developer)

Committed to trunk revision 7811
+Notes

-Issue History
Date Modified Username Field Change
2011-09-15 06:14 niffiwan New Issue
2011-09-15 06:14 niffiwan Status new => assigned
2011-09-15 06:14 niffiwan Assigned To => niffiwan
2011-09-15 06:15 niffiwan Note Added: 0012820
2011-09-15 06:15 niffiwan Status assigned => feedback
2011-09-15 06:16 niffiwan Note Added: 0012821
2011-09-15 06:16 niffiwan File Added: mantis2501.patch
2011-09-15 06:17 niffiwan Note Edited: 0012820
2011-09-26 07:19 niffiwan Note Added: 0012861
2011-09-26 07:20 niffiwan Status feedback => resolved
2011-09-26 07:20 niffiwan Fixed in Version => 3.6.13
2011-09-26 07:20 niffiwan Resolution open => fixed
+Issue History