Re: [Log4cplus-devel] DailyRollingFileAppender crashes with Ctrl-C
Logging Framework for C++
Brought to you by:
wilx
|
From: vvv j. <vv...@ya...> - 2012-05-30 16:56:06
|
Hi Václav Zeman
Thanks.
I got similar error as the Program crash on exit with the DailyRollingFileAppender - ID: 3471329. The callstack is also same. Regret for not providing the same callstack as I have problem with the machine.
The call stack is
tostring_internal(std::basic_string<char,std::char_traits<char>,std::allocator<char> > & outstr="", const wchar_t * src=0x017fa110, unsigned int size=31, std::locale loc={...}) Line 225 + 0x30 bytes C++
log4cplus::helpers::tostring(const std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > & src="c:/temp/Eve/transaction.680.log", std::locale loc={...}) Line 264 + 0x65 bytes C++
log4cplus::FileAppender::open(int mode=18) Line 352 + 0x3c bytes C++
log4cplus::DailyRollingFileAppender::rollover() Line 709 C++
log4cplus::DailyRollingFileAppender::close() Line 635 C++
log4cplus::spi::LoggerImpl::closeNestedAppenders() Line 85 + 0x2a bytes C++
log4cplus::Logger::closeNestedAppenders() Line 215 + 0x17 bytes C++
log4cplus::Hierarchy::shutdown() Line 238 C++
log4cplus::Hierarchy::~Hierarchy() Line 80 C++
`log4cplus::Logger::getDefaultHierarchy'::`2'::`dynamic atexit destructor for 'defaultHierarchy''() + 0x28 bytes C++
Please let me know if I need to provide the exact call stack or if the bug cannot be reproduced with simple testcase when using DailyRollingFileAppender object.
Thanks and Regards
J.Viswanath
________________________________
From: Václav Zeman <vha...@gm...>
To: vvv jjj <vv...@ya...>
Cc: "log...@li..." <log...@li...>
Sent: Wednesday, 30 May 2012 12:49 AM
Subject: Re: [Log4cplus-devel] DailyRollingFileAppender crashes with Ctrl-C
On 29 May 2012 18:17, vvv jjj wrote:
> Hi Václav Zeman
>
> Thanks for the quick response.
>
> The static linking issue which I mentioned is the one for the bug below
> Program crash on exit with the DailyRollingFileAppender - ID: 3471329
> I was asking if the bug is the same one which is causing the crash in my
> program.
If you are using static C and C++ run time libraries then it could be
the same reason. Unfortunately, linking statically to C and C++ run
time libraries cannot be supported. As the bug says, it is unsolvable
then. Use log4cplus with C and C++ DLL run time libraries.
>
> Regarding reproducing the bug, the tests does not directly produce the bug.
> But it can be easily produced by updating fileappender test with
> FileAppender changed to DailyRollingFileAppender.
>
> As per my understanding the problem is occurring when the application is
> exiting without calling Logger::Shutdown. I observed that the problem was
> occurring when I'm stopping the application with Control C, Logger::Shutdown
> is not invoked and some Rollback close is causing the crash.
>
> Please let me know if there is anything wrong with my understand. Also let
> me know is it valid to exit the application without calling Logger::Shutdown
> when using DailyRollingFileAppender.
Please try to reproduce the bug under Visual Studio debugger and
provide me with call stacks of all threads.
>> application is showing memory corruption message box.When I disable the
>> support of DailyRollingFileAppender it is working fine. I think that there
>> is some memory corruption when using DailyRollingFileAppender in
>> application
>> which is closed using Ctrl-C.
>>
>> The details of log4cplus are:
>> log4cplus:
>> 1.0.4.1-RC2 version
>> build system that you are building log4cplus with Visual Studio
>> solution
>> Visual Studio – project configuration (Debug_Unicode)
>> target OS Windows XP and CPU Intel
>>
>> log4cplus client application:
>> shared library log4cplus
>> library file you are linking your application with –
>> log4cplusUSD.lib,
>> liblog4cplus.dll.a, etc., on Windows
>> your application is using Unicode/wchar_t
>>
>> Also I have seen that DailyRollingFileAppender has some issue with static
>> linking. Is that issue fixed or is it related to the problem which I'm
>> facing?
> I have not seen any issues with static linking. What problems do you see?
>
>>
>> Please let me know if anything is not clear or need any other details.
>>
>> Thanks and Regards
>> J.Viswanath
> Thank you for the problem report. Is this reproducible with any of the
> tests in tests/ directory? If not, could you provide a self contained
> test case?
--
VZ |