[Gtkradiant] [Bug 290] New: Crash on Flush & Reload of Textures *AFTER* loading q3dm*sample.map

gtkradiant@zerowing.idsoftware.com gtkradiant@zerowing.idsoftware.com
Tue, 08 Jan 2002 22:17:55 -0600


           Summary: Crash on Flush & Reload of Textures *AFTER* loading
           Product: GtkRadiant
           Version: 1.2-nightly
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P1
         Component: editor
        AssignedTo: ttimo@idsoftware.com
        ReportedBy: eviltypeguy@qeradiant.com

Crash on Flush & Reload of Textures *AFTER* loading q3dm*sample.map,
here are all the relevant details i've been able to collect, and steps to 

1) Open a 1.2 Trunk CVS build of GtkRadiant
2) Load q3dm1sample.map
3) Select Textures -> Flush & Reload Shaders

Get a windows error box under WIN2K that says:
"The instruction at "0x05854453" referenced memory at "0x00000004c". The memory 
could not be "read".

Which of course I know is a not very helpful error :)

So here's the messages/trace from Visual Studio:
"Unhandled exception in q3radiant.exe (MD3MODEL.DLL): 0xC0000005: Access 

The last statement to be executed (the one it died on) is:

8) plugins/md3model/md3surface.cpp:113    g_QglTable.m_pfn_qglBindTexture
(GL_TEXTURE_2D, m_pShader->getTexture()->texture_number);

m_pShader *is* defined at this time, but texture_number is NULL.

The trace of statements back from this one goes like so:
7) plugins/md3model/md3surface.cpp:99 ((CMD3Surface*)m_children->pdata[i])->Draw

6) plugins/md3model/miscmodel.cpp:78 m_model->pRender->Draw(state);

CamWnd::Cam_DrawBrush(brush_s *, int)
5) radiant/camwindow.cpp:789  break;

4) radiant/camwindow.cpp:892 for(b = pList->next; b != pList; b=b->next)

3) radiant/camwindow.cpp:979  switch(m_Camera.draw_mode)

2) radiant/camwindow.cpp:1228  qglEnableClientState(GL_VERTEX_ARRAY)

1)  radiant/camwindow.cpp:1469  QE_CheckOpenGLForErrors ();

I realize that not all of these steps may be helpful, but they were included 
for completeness. I thought this might be a simple IncRef/DecRef missing crash 
but I matched up the map-module tree (which doesn't appear to have this crash) 
and every single IncRef/DecRef matched up as far as location and conditions 
from what I could tell. I don't honestly know enough about how memory 
allocation/shader stuff, etc. works to really fix this. I've spent a 
considerable amount of time trying though...sorry.

------- You are receiving this mail because: -------
Whoops!  I have no idea!