log4cxx / memory leaks / mfc / visual studio 2005

Discussion in 'C++' started by asterixgallier, Nov 17, 2006.

  1. Hello

    i'm having problems with log4cxx when using inside an MFC application
    build with visual studio 2005. The Application starts and works
    normaly, but while exiting, inside the DEBUG window of Visual Studio,
    there are printed a lot of Memory Leaks errors:

    Detected memory leaks!
    Dumping objects ->
    {1323} normal block at 0x00BB6F20, 4 bytes long.
    ....
    {1107} normal block at 0x00BD4098, 32 bytes long.
    Data: <l o g 4 c x x > 6C 00 6F 00 67 00 34 00 63 00 78 00 78 00 20
    00
    ....
    repeat 319 times
    ....
    Object dump complete.

    If the Application runs in Release configuration, no memory leaks
    occurs.


    I tried the compiled log4cxx.dll in several combinations:
    log4cxx version 0.9.7, from SVN, version 0.10.0
    using VC6.0, VC8.0, with has.wchar_t true/false and logchar utf-8/wchar
    ....

    But i never reached a working application with no memory leaks.

    Have got anyone an idea where this defect exists and how it can be
    solved?

    With regards
    Asterix
    asterixgallier, Nov 17, 2006
    #1
    1. Advertising

  2. On 17 Nov 2006 10:04:36 -0800, "asterixgallier" wrote:
    >i'm having problems with log4cxx when using inside an MFC application
    >build with visual studio 2005. The Application starts and works
    >normaly, but while exiting, inside the DEBUG window of Visual Studio,
    >there are printed a lot of Memory Leaks errors:


    I'd start with
    http://dir.gmane.org/gmane.comp.apache.logging.log4cxx.user
    and search for 'leak'.
    Roland Pibinger, Nov 17, 2006
    #2
    1. Advertising

  3. Roland Pibinger schrieb:

    > On 17 Nov 2006 10:04:36 -0800, "asterixgallier" wrote:
    > >i'm having problems with log4cxx when using inside an MFC application
    > >build with visual studio 2005. The Application starts and works
    > >normaly, but while exiting, inside the DEBUG window of Visual Studio,
    > >there are printed a lot of Memory Leaks errors:

    >
    > I'd start with
    > http://dir.gmane.org/gmane.comp.apache.logging.log4cxx.user
    > and search for 'leak'.


    Ok thank you for your answer. The soltuion seems to be, to use alwasy
    the release build of log4cxx.
    (http://article.gmane.org/gmane.comp.apache.logging.log4cxx.user/535/)

    But if i set the release library of log4xx in the Debug Build of my
    MFC-Application, the applications fails while loading. A messagebox
    appears telling me:

    Runtime Error!
    Program: .....

    R6034
    An application has made an attempt to load the C runtime library
    incorrectly.
    Please contact the application's support team for more information

    I suggest this happens because the log4cxx involves to load the release
    versions of the msvcx80.dlls and the application tries to load the
    debug versions. And both could not be loaded at the same time. Is my
    assumption right? Is there a solution?

    Bye
    Asterix
    asterixgallier, Nov 17, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. wh
    Replies:
    2
    Views:
    509
    Cowboy \(Gregory A. Beamer\)
    Jan 16, 2004
  2. ad
    Replies:
    5
    Views:
    1,567
  3. rockdale
    Replies:
    1
    Views:
    600
    Juan T. Llibre
    Aug 23, 2006
  4. Replies:
    1
    Views:
    465
  5. XJ
    Replies:
    8
    Views:
    1,753
Loading...

Share This Page