logo       

RE: Crash of my windows application when using Log4cxx: msg#00022

Subject: RE: Crash of my windows application when using Log4cxx

Hi,

Thanks for the answer. But I don’t want to use the default hierarchy using the default root-logger, I want to cerate another hierarchy.

 

I want to do something like that:

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

LoggerRepositoryPtr repository = new Hierarchy (root);

 

Thanks,

Munir

 


From: Steindl Christian [mailto:c.steindl@xxxxxx]
Sent: Thursday, October 27, 2005 10:03 AM
To: Log4CXX User
Subject: AW: Crash of my windows application when using Log4cxx

 

Hi,

 

do you want a reference to the root-logger? so why not using:

LoggerPtr LogManager::getRootLogger()

void DoNothing ()

{

LoggerPtr root = LogManager::getRootLogger();

}

Greetz,
Christian

 


Von: Munir Badir [mailto:mbadir@xxxxxxxxxxx]
Gesendet: Mittwoch, 26. Oktober 2005 08:55
An: log4cxx-user@xxxxxxxxxxxxxxxxxx
Betreff: FW: Crash of my windows application when using Log4cxx

Hi,

Can anyone guess what could be the problem?

 

Thanks,

Munir

 


From: Munir Badir
Sent: Sunday, October 23, 2005 9:55 AM
To: 'log4cxx-user@xxxxxxxxxxxxxxxxxx'
Subject: 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
______________________________________________________________________


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe