You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Munir Badir <mb...@mercury.com> on 2005/10/23 09:55:24 UTC

Crash of my windows application when using Log4cxx

Hi,

I have a windows application, and I tried to use the log4cxx 0.9.7 / 0.9.8.
I wrote a simple function called DoNothing and when I call it my application
crashes.

It crashes in the ObjectImpl::releaseRef() calling the delete this.

 

void ObjectImpl::releaseRef() const

{

  if ( apr_atomic_dec32( & ref ) == 0 )

  {

    delete this;

  }

}

 

 

I tried the same code with a simple console windows application and it
worked fine.

 

Please help.

 

 

My simple function:

 

Void DoNothing ()

{

LoggerPtr root(new RootCategory(Level::getDebug()));

}

 

 

Crash stack:

 

NTDLL! 77f9193c()

NTDLL! 77fb1cff()

NTDLL! 77fa63b6()

KERNEL32! 7c58f7ba()

_CrtIsValidHeapPointer(const void * 0x0311f798) line 1697

_free_dbg_lk(void * 0x0311f798, int 1) line 1044 + 9 bytes

_free_dbg(void * 0x0311f798, int 1) line 1001 + 13 bytes

free(void * 0x0311f798) line 956 + 11 bytes

operator delete(void * 0x0311f798) line 7 + 9 bytes

log4cxx::spi::RootCategory::`vector deleting destructor'(unsigned int 1) +
116 bytes

log4cxx::helpers::ObjectImpl::releaseRef() line 43 + 55 bytes

log4cxx::helpers::ObjectPtrT<log4cxx::Logger>::~ObjectPtrT<log4cxx::Logger>(
) line 85 + 45 bytes

LTLogger::DoNothing() line 19 + 8 bytes

 

 

 

Thanks,

Munir



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________