On Wed, 30 Sep 2009, CLEMENT Francis wrote: > Here is it : > Debug with ctrlclnt v 1.26pre05, Call Stack (with source and source args > options activated) : > > ntdll!RtlpWaitForCriticalSection+0x8a > ntdll!RtlEnterCriticalSection+0x46 > CtrlClnt!SysCreateTlsKey(int * TlsKey = 0x0047a3cc, <function> * pFreeProc = > 0x00404c60)+0xf [c:\temp\xmail-1.26-pre05\sysdepwin.cpp @ 1216] > CtrlClnt!ErrOnceSetup(void)+0x15 [c:\temp\xmail-1.26-pre05\errors.cpp @ 333] > CtrlClnt!SysThreadOnce(struct SYS_THREAD_ONCE * pThrOnce = 0x0047a3d0, > <function> * pOnceProc = 0x00404bf0)+0x16 > [c:\temp\xmail-1.26-pre05\sysdepwin.cpp @ 1287] > CtrlClnt!ErrSetupEnv(void)+0x15 [c:\temp\xmail-1.26-pre05\errors.cpp @ 343] > CtrlClnt!ErrSetErrorCode(int iError = -5, char * pszInfo = 0x00000000 "", > int iSize = -1)+0x9 [c:\temp\xmail-1.26-pre05\errors.cpp @ 380] > CtrlClnt!SysLockMutex(void * hMutex = 0xfeeefeee, int iTimeout = > 4194304)+0x26 [c:\temp\xmail-1.26-pre05\sysdepwin.cpp @ 937] > CtrlClnt!BSslLockingCB(int iMode = 9, int iType = 1, char * pszFile = > 0x100b2a44 ".\crypto\err\err.c", int iLine = 419)+0x22 > [c:\temp\xmail-1.26-pre05\sslbind.cpp @ 82] > WARNING: Stack unwind information not available. Following frames may be > wrong. > LIBEAY32!CRYPTO_lock+0x81 > LIBEAY32!ENGINE_load_ubsec+0x7bb > ntdll!LdrShutdownThread+0xa3 > KERNEL32!ExitThread+0x53 > KERNEL32!FreeLibraryAndExitThread+0x24 > msafd!SockAsyncThread+0xe7 > KERNEL32!BaseThreadStart+0x52
Really wierd. Seems like an MS async thread exit, triggers a call (via DllMain -> ThreadDetach almost certainly) to the SSL code, which at that point, has already been freed. This happens after main() returns, so it's pretty hairy to fix. Lemme think ... - Davide _______________________________________________ xmail mailing list xmail@xmailserver.org http://xmailserver.org/mailman/listinfo/xmail