Re: LOG4CXX_DECODE_CHAR Crash on windows

2009-11-17 Thread Zhou Tao
Thanks Curt, My comments in line. * * *2009/11/18 Curt Arnold * > > *Mismatching run-time libraries is a easy way to manufacture a crash. > Basically any time one DLL tries to deallocate some resource allocated by a > DLL using a different run time library (and that includes two DLLs that each >

Re: LOG4CXX_DECODE_CHAR Crash on windows

2009-11-17 Thread Curt Arnold
Mismatching run-time libraries is a easy way to manufacture a crash. Basically any time one DLL tries to deallocate some resource allocated by a DLL using a different run time library (and that includes two DLLs that each use /MT since they have the own instances of the run- time library),

Re: LOG4CXX_DECODE_CHAR Crash on windows

2009-11-17 Thread Zhou Tao
I take a look at the problem. The issue is caused by using mixed MT/MD option in one process. My DLL is using MT option and log4cxx is using MD, so they are using different copy of CRT lib. I call the LOG4CXX_DECODE_CHAR macro within my DLL to create a LogString variable then get the fail. ( note:

LOG4CXX_DECODE_CHAR Crash on windows

2009-11-13 Thread Zhou Tao
Hi all, I am using log4cxx on win32 platform and build the log4cxx with MT option( Runtime Library) within MS visual Studio 2005. The project default setting is MD. All APR, APR-UTIL and LOG4CXX projects are set to be MT mode. After the build, I get a crash in the LOG4CXX_DECODE_CHAR macro. The