logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Webb <stephen.w...@ieee.org>
Subject Re: MutexException at exit when using SocketHubAppender
Date Wed, 08 Jun 2011 05:31:58 GMT
> 
> See https://issues.apache.org/jira/browse/LOGCXX-278, which is fixed in 0.10.1 
that has never been released.
> On Wed, May 13, 2009 at 2:51 PM, Gerrit van Doorn <gdoorn <at> 
newwireless.com> wrote:When I use SocketHubAppender and the application exits I 
get a "Debug Error!" message telling me the application requested the Runtime to 
terminate in an unusual way. When debugging the application it runs fine (I 
receive messages in Chainsaw) but when the application exits it tells me:
> 
> "Unhandled exception at .... in ... Microsoft C++ exception: 
log4cxx::helpers::MutexException at memory location ...".
> Is there a solution to this? Am I using the SocketHubAppender incorrectly? My 
config is:
> log4j.rootLogger=TRACE, SOCKETHUB
> log4j.appender.SOCKETHUB=org.apache.log4j.net.SocketHubAppender
> log4j.appender.SOCKETHUB.port=4445
> 
> 
> -- Dale King
> 

To fix this remove the LogLog::debug(...) lines from SocketHubAppender::close(). 
As the application shuts down, the mutex used by LogLog is deleted before 
SocketHubAppender::close() is called. 

You also should remove the throw ThreadException() from Thread::join() as the 
tread can be stopped when this is called. 

-- Stephen Webb




Mime
View raw message