View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000396 | FSSCP | gameplay | public | 2005-04-30 16:28 | 2005-04-30 17:10 |
| Reporter | phreak | Assigned To | phreak | ||
| Priority | urgent | Severity | crash | Reproducibility | random |
| Status | resolved | Resolution | fixed | ||
| Platform | P4 3.2 | OS | WinXP | OS Version | SP2 |
| Product Version | 3.6.5 | ||||
| Summary | 0000396: Crash on loading | ||||
| Description | People have been getting strange errors about certain missions crashing upon loading. All i'm seeing right now is that its crashing in model_load() with an access violation error a closer inspection of the code reveals its crashing in this segment of code for (i=0; i< MAX_POLYGON_MODELS; i++) { *****if ( Polygon_models[i] ) { if (!stricmp(filename, Polygon_models[i]->filename) && !duplicate)***** { // Model already loaded; just return. Polygon_models[i]->used_this_mission++; return Polygon_models[i]->id; } } else if ( num == -1 ) { // This is the first empty slot num = i; } } whats going on is that something is setting Polygon_models[i] to some non-null garbage value and then it keeps getting accessed. + [245] 0x00000000 + [246] 0x00000000 + [247] 0x00000000 + [248] 0x00000000 + [249] 0x00000000 + [250] 0x00000001 ** + [251] 0x00000001 ** + [252] 0x00000008 ** + [253] 0x00000000 + [254] 0x00000000 + [255] 0x00000000 + [256] 0x00000000 This occurs whether i'm running an inf_build or not. also it seems to happen on select missions. I can play some missions in Derelict fine, but it'll crash for some other missions. | ||||
| Tags | No tags attached. | ||||
|
|
well that was easier than i thought. when a ship is paged in, so are all of its textures, including afterburner plume bitmaps. If the bitmap doesn't exist, it should be set to -1; however, the default value was -2. This caused bm_page_in_texture() to keep processing since bitmap_num != -1 (should be changed to if (bitmap_num < 0) return;) This in turn caused garbage to be written into Polygon_models[whatever]. since i guess bm_bitmaps[-2] points to some location in Polygon_models. fixxxed |