August 25th, 2005, 03:28 AM
CRash in _AFX_CTL3D_THREAD::~_AFX_CTL3D_THREAD()
When exiting my program it crashes here (mainly in the debug build).
This is all MFC/CRT code so I don't have any control over it - unless there's some tidying up that's not done. I'm not sure about that as this is all supposed to be automatic. Using MFC6 as a static library in Win2000. Mainly legacy code too, so I'm struggling a bit.
Code: From APP3DS.CPP in MFC/SRC
_AFX_CTL3D_STATE* pCtl3dState = _afxCtl3dState.GetDataNA();
if (pCtl3dState != NULL && pCtl3dState->m_pfnUnAutoSubclass != NULL)
(*pCtl3dState->m_pfnUnAutoSubclass)(); // <--- crashes HERE
All the functions in pCtl3dState are set to 0xfeeefeee. The program did originally call Enable3DControlsStatic but as that's obsolete I've taken it out but it made no difference.
Last edited by simon.heffer; August 25th, 2005 at 03:29 AM.
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.