View Issue Details

IDProjectCategoryView StatusLast Update
0002873FSSCPFRED graphicspublic2022-06-11 00:54
ReporterFUBAR-BDHR Assigned ToThe_E  
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version3.6.19 
Fixed in Version22.0.0 
Summary0002873: Texture replacement crashing FRED when set to files that were added after FRED was opened
DescriptionI've got this crash a number of times now but can't figure out a way to reliably reproduce it. It is always caused by the same thing but doesn't always happen. If you have FRED open and copy a new texture into the maps directory it can cause FRED to crash. This can happen while saving or loading a mission using the newly added texture.
Steps To ReproduceAgain it's random but the following has caused it:

Open FRED, place a model to be texture replaced in FRED. Save mission. Copy new texture to the data\maps folder. Go into texture replacement and assign the texture you just copied to the ship. Save the mission. It may or may not crash.

Another version is to have FRED open, copy a map into data\maps, then load a mission that uses that map. Of course this one involves changing/fixing the texture replacement in notepad which is still the only way to do texture replacement on some ships.
Additional InformationStack:

     fred2_open_3_6_19_SSE2-DEBUG.exe!debug_int3(char * file, int line) Line 768 C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!WinAssert(char * text, char * filename, int linenum) Line 966 + 0x13 bytes C++
> fred2_open_3_6_19_SSE2-DEBUG.exe!bm_unlock(int handle) Line 1786 + 0x2c bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!bm_lock(int handle, unsigned char bpp, unsigned char flags, bool nodebug) Line 1728 + 0x9 bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!opengl_create_texture(int bitmap_handle, int bitmap_type, tcache_slot_opengl * tslot) Line 933 + 0x15 bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!gr_opengl_tcache_set_internal(int bitmap_handle, int bitmap_type, float * u_scale, float * v_scale, int tex_unit) Line 1055 + 0x11 bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!gr_opengl_tcache_set(int bitmap_handle, int bitmap_type, float * u_scale, float * v_scale, int stage) Line 1110 + 0x19 bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!opengl_render_pipeline_program(int start, const vertex_buffer * bufferp, const buffer_data * datap, int flags) Line 722 + 0x1c bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!gr_opengl_render_buffer(int start, const vertex_buffer * bufferp, int texi, int flags) Line 1273 + 0x15 bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!gr_render_buffer(int start, const vertex_buffer * bufferp, int texi, int flags) Line 755 + 0x18 bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!model_render_buffers(polymodel * pm, int mn, bool is_child) Line 4730 + 0x1e bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!model_render_children_buffers(polymodel * pm, int mn, int detail_level) Line 4493 + 0xf bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!model_really_render(int model_num, matrix * orient, vec3d * pos, unsigned int flags, int objnum) Line 2977 + 0x13 bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!model_render(int model_num, matrix * orient, vec3d * pos, unsigned int flags, int objnum, int lighting_skip, int * replacement_textures) Line 2023 + 0x19 bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!render_one_model_htl(object * objp) Line 913 + 0x47 bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!obj_render_all(void (object *)* render_function, bool * draw_viewer_last) Line 281 + 0x9 bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!render_models() Line 672 + 0xe bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!render_frame() Line 1520 C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!CFREDApp::OnIdle(long lCount) Line 526 C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!CWinThread::Run() Line 621 + 0x17 bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!CWinApp::Run() Line 832 C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!AfxWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 47 + 0xd bytes C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 26 C++
     fred2_open_3_6_19_SSE2-DEBUG.exe!__tmainCRTStartup() Line 275 + 0x2c bytes C
     fred2_open_3_6_19_SSE2-DEBUG.exe!WinMainCRTStartup() Line 189 C
     kernel32.dll!750b33aa()
     [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
     ntdll.dll!77539ef2()
     ntdll.dll!77539ec5()
     fred2_open_3_6_19_SSE2-DEBUG.exe!send_ship_kill_packet(object * objp, object * other_objp, float percent_killed, int self_destruct) Line 2525 + 0x41 bytes C++

Autos from BM_Unlock()


        bitmapnum 618 int
+ bm_bitmaps 0x01ecd138 struct bitmap_entry * bm_bitmaps {filename=0x01ecd138 "cursorweb.ani" signature=9410 palette_checksum=0 ...} bitmap_entry [4750]
+ bm_bitmaps[bitmapnum] {filename=0x01ee5378 "EAC_Freighter_02_Grn.dds" signature=12226 palette_checksum=0 ...} bitmap_entry
+ bm_bitmaps[bitmapnum].filename 0x01ee5378 "EAC_Freighter_02_Grn.dds" char [32]
        bm_bitmaps[bitmapnum].handle 3444368 int
        handle 618 int
TagsNo tags attached.

Activities

Goober5000

2014-06-30 03:13

administrator   ~0015949

The E, was this the issue that was fixed in r10717?

The_E

2014-06-30 06:08

administrator   ~0015959

No, this is a separate, likely unrelated issue. The fix in 10717 was an edge case that resulted in an invalid operation on a vector; this looks to me like a general limitation of the virtual filesystem FS uses.

MjnMixael

2022-06-10 18:37

manager   ~0017122

I went to test this and found that there is now a warning for files not being in the file list created at game startup. I was unable to get it to crash even when continuing through the warning. I tried this about 10 times. Screenshot of the warning is attached.

Seems like it's no longer an issue. Recommend closing.
Capture.PNG (24,778 bytes)   
Capture.PNG (24,778 bytes)   

Issue History

Date Modified Username Field Change
2013-05-16 02:17 FUBAR-BDHR New Issue
2014-06-30 03:13 Goober5000 Changeset attached => fs2open trunk r10717
2014-06-30 03:13 Goober5000 Note Added: 0015949
2014-06-30 03:13 Goober5000 Assigned To => The_E
2014-06-30 03:13 Goober5000 Status new => code review
2014-06-30 03:17 Goober5000 Relationship added has duplicate 0002960
2014-06-30 06:08 The_E Note Added: 0015959
2014-07-01 02:04 Goober5000 Changeset removed fs2open trunk r10717 =>
2014-07-03 08:31 The_E Relationship deleted has duplicate 0002960
2014-07-03 15:28 MageKing17 Status code review => acknowledged
2022-06-10 18:37 MjnMixael File Added: Capture.PNG
2022-06-10 18:37 MjnMixael Note Added: 0017122
2022-06-10 18:56 z64555 Status acknowledged => closed
2022-06-10 18:56 z64555 Resolution open => fixed
2022-06-10 18:56 z64555 Fixed in Version => 22.0.0
2022-06-11 00:54 Goober5000 Status closed => resolved