My log4cxx.properties looks like this one:
log4j.rootLogger=DEBUG, stdout, R, D
log4j.logger.test.a.b.c=WARN
log4j.logger.filelogger=WARN, R
log4j.additivity.filelogger=FALSE
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5l - %m%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=ObjectCounterFilter.log
#log4j.appender.R.MaxFileSize=5MB
log4j.appender.R.MaxFileSize=500KB
log4j.appender.R.MaxBackupIndex=5
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p - %m%n
log4j.appender.D=org.apache.log4j.OutputDebugStringAppender
log4j.appender.D.layout=org.apache.log4j.PatternLayout
log4j.appender.D.layout.ConversionPattern=%d [%t] %-5p - %m%n
I tried to use your code and I got crash again. Did you try it in
release? Wait for a while and crash will occur. I don't mix a debug dll
with a release exe.
Peter
Cory Riddell wrote:
What does your log4cxx.properties file look like?
You say you used the same settings building the dll and the exe. Does
this mean that you are certain you aren't mixing a debug dll with a
release exe?
Cory
Peter Gejgus wrote:
My question is the same as the Paul's question at
http://www.dreamcubes.com/blog/?itemid=43. But I see no meaningful
answer there.
Cory Riddell wrote:
Peter Gejgus wrote:
I have log4cxx 0.10.0. I use it as a release dll in my project
compiled under VS2005. When my project is built in debug, log4cxx has
no problem. But when I built my project as release, I got a following
issue:
"A buffer overrun has occurred in foo.exe which has corrupted the
program's internal state. Press Break to debug the program or Continue
to terminate the program."
So, if you press break and enter the debugger, can you see that the
buffer overrun is in log4cxx code?
My first suspicion would be that you have an uninitialized variable
somewhere in your program. For some reason, VS initializes variables in
a debug build and not at all in a release build.
cory