> > 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