Hi all,

I'm currently trying to get M compiled and working with MSVC 7.1.

When compiling in Debug mode with the settings below, I get a crash when
closing M. It seems to be because the 'memory locker' is destroyed, but
still (tentatively) used after. Here are the call trace

Destruction of the memory locker.

        Md.exe!wxCriticalSection::~wxCriticalSection()  Line 155        C++
        Md.exe!MemoryCriticalSection::~MemoryCriticalSection()  + 0xf   C++
        Md.exe!$E6()  + 0xd     C++
        msvcr71d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 376 C
        msvcr71d.dll!exit(int code=0)  Line 303 + 0xd   C
        Md.exe!WinMainCRTStartup()  Line 406    C
        kernel32.dll!77e814c7()         

And, after, use of it.

        ntdll.dll!77f69ecd()    
        ntdll.dll!77f5b2e6()    
        Md.exe!wxCriticalSection::Enter()  Line 161     C++
        
Md.exe!MemoryCriticalSectionLocker::MemoryCriticalSectionLocker(wxCriticalSection & 
critsect={...})  Line 875 + 0x2f    C++
        Md.exe!wxDebugFree(void * buf=0x01468410, bool __formal=false)  Line 955 + 0xd 
 C++
        Md.exe!operator delete(void * buf=0x01468410)  Line 84 + 0xb    C++
        Md.exe!ModulesList::erase(ModulesList::iterator i={...})  Line 330 + 0x52      
 C++
        Md.exe!ModulesList::~ModulesList()  Line 330 + 0x7b     C++
        Md.exe!$E3()  + 0x28    C++
        msvcr71d.dll!doexit(int code=0, int quick=0, int retcaller=0)  Line 376 C
        msvcr71d.dll!exit(int code=0)  Line 303 + 0xd   C
        Md.exe!WinMainCRTStartup()  Line 406    C
        kernel32.dll!77e814c7()         

The order of destructions does not seem correct, but I don't know how to
change it...


Preprocessor definitions: 
   _DEBUG;__WXDEBUG__;WIN32;WINVER=0x0400;STRICT;wxUSE_BASE=1

Settings from setup0.h:

#define wxUSE_DEBUG_CONTEXT 1
#define wxUSE_MEMORY_TRACING 1
#define wxUSE_GLOBAL_MEMORY_OPERATORS 1
#define wxUSE_DEBUG_NEW_ALWAYS 1
#ifdef _MSC_VER
  #ifndef _DEBUG
    #define wxUSE_ON_FATAL_EXCEPTION 1
  #endif
#else
    #define wxUSE_ON_FATAL_EXCEPTION 0
#endif

-- 
Xavier Nodet
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." - Benjamin Franklin, 1759.

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to