logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <gwi...@e4cube.com>
Subject STL memory allocation under MSVC 6.0
Date Thu, 03 Jun 2004 07:11:58 GMT
Hi,

I have compiled version 0.9.7 as a DLL with MSVC 6.0 
(debug and release) without error.

When running the 'MyApp' example from the introduction, under 
debug the 
compiler is reporting memory leaks.and the release version 
causes a user 
breakpoint to occur. (memory leaks are also reported with the 
trivial example).

The issue seems to relate to STL memory allocation in 
Log4cxx.dll versus
the exe.

The reference '0x00d92d58' reference is to 'com.foo.bar' 
which links it to 
the statement :

LoggerPtr Bar::logger = Logger::getLogger(_T("com.foo.bar"));

Has anyone had experience using the DLL version and knows how 
to overcome this?

The following is the call stack when the user breakpoint 
occurs.

NTDLL! 77f813b1()
NTDLL! 77fb6972()
NTDLL! 77fb5bbe()
NTDLL! 77fa6afc()
NTDLL! 77fccc55()
MSVCRT! 78001e00()
operator delete(void * 0x00d92d58) line 6 + 10 bytes
std::basic_string<char,std::char_traits<char>,std::allocator<c
har> >::_Tidy
(std::basic_string<char,std::char_traits<char>,std::allocator<
char> > * const 0x0012fad0 {0x77f81f55 "U‹ìƒìSVWUü‹]
‹E÷@"}, unsigned char 1) line 591 + 6 bytes
std::basic_string<char,std::char_traits<char>,std::allocator<c
har> 
>::~basic_string<char,std::char_traits<char>,std::allocator<ch
ar> >
(std::basic_string<char,std::char_traits<char>,std::allocator<
char> > * const 0x0012fad0 {0x77f81f55 "U‹ìƒìSVWUü‹]
‹E÷@"}) line 59 + 7 bytes
std::pair<std::basic_string<char,std::char_traits<char>,std::a
llocator<char> > 
const ,log4cxx::helpers::ObjectPtrT<log4cxx::Logger> 
>::~pair<std::basic_string<char,std::char_traits<char>,std::al
locator<char> > const ,log4cxx::helpers::ObjectPtrT<l3c0c53d3
() + 62 bytes
std::pair<std::basic_string<char,std::char_traits<char>,std::a
llocator<char> > 
const ,log4cxx::helpers::ObjectPtrT<log4cxx::Logger> 
>::`scalar deleting destructor'(unsigned int 0) + 15 bytes
std::_Destroy
(std::pair<std::basic_string<char,std::char_traits<char>,std::
allocator<char> > 
const ,log4cxx::helpers::ObjectPtrT<log4cxx::Logger> > * 
0x00339b7c) line 38 + 13 bytes
std::_Tree<std::basic_string<char,std::char_traits<char>,std::
allocator<char> 
>,std::pair<std::basic_string<char,std::char_traits<char>,std:
:allocator<char> > 
const ,log4cxx::helpers::ObjectPtrT<log4cxx::Logger> 
>,std::map<std::basic_string<char,s938e7c51(...) line 585 + 
16 bytes
std::_Tree<std::basic_string<char,std::char_traits<char>,std::
allocator<char> 
>,std::pair<std::basic_string<char,std::char_traits<char>,std:
:allocator<char> > 
const ,log4cxx::helpers::ObjectPtrT<log4cxx::Logger> 
>,std::map<std::basic_string<char,saf9cd561(...) line 448
std::_Tree<std::basic_string<char,std::char_traits<char>,std::
allocator<char> 
>,std::pair<std::basic_string<char,std::char_traits<char>,std:
:allocator<char> > 
const ,log4cxx::helpers::ObjectPtrT<log4cxx::Logger> 
>,std::map<std::basic_string<char,saf9cd561(...) line 446
std::_Tree<std::basic_string<char,std::char_traits<char>,std::
allocator<char> 
>,std::pair<std::basic_string<char,std::char_traits<char>,std:
:allocator<char> > 
const ,log4cxx::helpers::ObjectPtrT<log4cxx::Logger> 
>,std::map<std::basic_string<char,s82e39558(...) line 369
std::_Tree<std::basic_string<char,std::char_traits<char>,std::
allocator<char> 
>,std::pair<std::basic_string<char,std::char_traits<char>,std:
:allocator<char> > 
const ,log4cxx::helpers::ObjectPtrT<log4cxx::Logger> 
>,std::map<std::basic_string<char,s5a3bb71c() line 175
std::map<std::basic_string<char,std::char_traits<char>,std::al
locator<char> 
>,log4cxx::helpers::ObjectPtrT<log4cxx::Logger>,std::less<std:
:basic_string<char,std::char_traits<char>,std::allocator<char>
 > >,std::allocator<log4cxx::helpers::ObjectPtr4ab48de5() + 
15 bytes
log4cxx::Hierarchy::~Hierarchy() line 56 + 71 bytes
log4cxx::Hierarchy::`vbase destructor'() + 18 bytes
log4cxx::Hierarchy::`vector deleting destructor'(unsigned int 
1) + 90 bytes
log4cxx::helpers::ObjectImpl::releaseRef() line 96 + 53 bytes
log4cxx::helpers::ObjectPtrT<log4cxx::spi::LoggerRepository>::
~ObjectPtrT<log4cxx::spi::LoggerRepository>() line 87
log4cxx::spi::DefaultRepositorySelector::~DefaultRepositorySel
ector() + 18 bytes
log4cxx::spi::DefaultRepositorySelector::`vbase destructor'() 
+ 18 bytes
log4cxx::spi::DefaultRepositorySelector::`vector deleting 
destructor'(unsigned int 1) + 87 bytes
log4cxx::helpers::ObjectImpl::releaseRef() line 96 + 53 bytes
log4cxx::helpers::ObjectPtrT<log4cxx::spi::RepositorySelector>
::~ObjectPtrT<log4cxx::spi::RepositorySelector>() line 87
$E74() + 42 bytes
LOG4CXX! _CRT_INIT@12 + 139 bytes
LOG4CXX! _DllMainCRTStartup@12 + 117 bytes
NTDLL! 77f830e7()
NTDLL! 77f8ee02()
KERNEL32! 7c580ed2()
TRIVIAL! 00406bd0()
KERNNEL32! 7c581af6()

Thanks,

Gwilym
Mime
View raw message