logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Mercer <lsmer...@gmail.com>
Subject PatternLayout / Access Violation on win32 Release build only
Date Wed, 20 May 2009 08:41:07 GMT
Log4cxx users,

I have a project using log4cxx. Originally this was a C++ STL application
that was built using ant/VS2003. Log4cxx was statically linked into the
project. This has been running without problems for over a year.

I have recently upgraded studio to 2008 (version 9), and am having problems
with my Release build. The problem is that when my PatternLayout has params
set, an unhandled exception caused by an Access Violation is thrown. This is
unrecoverable and the application exits. The same code executes without
throwing this exception in the Debug build. I have commented out the param
setting code and the next line causes the problem.

Whilst the logger works fine in the Debug build, there is a problem on
application shutdown: a Run-time check failure #0 as a value of ESP was not
properly saved across a function call is reported. This then causes Access
Violations until the program exits. This may be unrelated.

I have used the original code that we checked out of trunk (an early 0.10.0
version) and the latest version found on the website. I have been using APR
1.2.12 and APR-UTIL 1.2.12. I have build both using ant to build everything
(in a ms visual studio command prompt), and using ant to generate the
project files, then VS 2008 to build the libraries. The same problem is
present in all of these builds.

I have built and linked Log4cxx to my application as a dll and statically,
both times using the Multithreaded Dll compiler option (the same as my
application). The same behaviour is present: release builds crashing on
startup, debug on exit. When building log4cxx, I have been building apr and
apr-util with the same compiler options as log4cxx.

Has anyone seen this problem before? Any ideas?

Laurie Mercer.

View raw message