CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2


Threaded View

  1. #1
    Join Date
    Aug 2005

    Angry 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 04:29 AM. Reason: typo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center