Crash when using log4plus::RollingFileAppender

My compilnation envrionment is macOS12.6, and with libc++abi

And my program structure has two parts which using log4plus, the first part is libcutt-sdk.dylib. In this dynamic library, log4cplus is using to output log for this library. The second part is the main program, log4cplus is used to output the whole program log.

When I am trying to execute the unix program, it is always crashed in log4cplus::RollingFileAppender::RollFileAppender.
The context is below:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>log4cplus::SharedAppenderPtr appender(new log4cplus::RollingFileAppender(VDI_log_dir_path.toStdString(), LOG_FILE_MAX_SIZE, 1, true, true));
log4cplus::SharedAppenderPtr appender1(new log4cplus::RollingFileAppender(VDI_AUTOTEST_log_dir_path.toStdString(), LOG_FILE_MAX_SIZE, 1, true, true));
</code>
<code>log4cplus::SharedAppenderPtr appender(new log4cplus::RollingFileAppender(VDI_log_dir_path.toStdString(), LOG_FILE_MAX_SIZE, 1, true, true)); log4cplus::SharedAppenderPtr appender1(new log4cplus::RollingFileAppender(VDI_AUTOTEST_log_dir_path.toStdString(), LOG_FILE_MAX_SIZE, 1, true, true)); </code>
log4cplus::SharedAppenderPtr appender(new log4cplus::RollingFileAppender(VDI_log_dir_path.toStdString(), LOG_FILE_MAX_SIZE, 1, true, true));
log4cplus::SharedAppenderPtr appender1(new log4cplus::RollingFileAppender(VDI_AUTOTEST_log_dir_path.toStdString(), LOG_FILE_MAX_SIZE, 1, true, true));

And the debug info is:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>uSmartView_VDI_Client(32644,0x101738600) malloc: Incorrect checksum for freed object 0x108630828: probably modified after being freed.
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
* frame #0: 0x00007ff80f438fce libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x00007ff80f46f1ff libsystem_pthread.dylib`pthread_kill + 263
frame #2: 0x00007ff80f3bad14 libsystem_c.dylib`abort + 123
frame #3: 0x00007ff80f297357 libsystem_malloc.dylib`malloc_vreport + 551
frame #4: 0x00007ff80f2ab308 libsystem_malloc.dylib`malloc_zone_error + 178
frame #5: 0x00007ff80f28c50c libsystem_malloc.dylib`tiny_malloc_from_free_list + 1820
frame #6: 0x00007ff80f28b8ad libsystem_malloc.dylib`tiny_malloc_should_clear + 255
frame #7: 0x00007ff80f28a7d2 libsystem_malloc.dylib`szone_malloc_should_clear + 66
frame #8: 0x00007ff80f2a5abb libsystem_malloc.dylib`_malloc_zone_malloc + 125
frame #9: 0x00007ff80f42c95a libc++abi.dylib`operator new(unsigned long) + 26
frame #10: 0x00000001003b4e36 uSmartView_VDI_Client`void log4cplus::internal::split_into_components<log4cplus::internal::(anonymous namespace)::path_sep_comp, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, log4cplus::internal::(anonymous namespace)::path_sep_comp) + 646
frame #11: 0x00000001003b44e5 uSmartView_VDI_Client`log4cplus::internal::split_path(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, unsigned long&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 85
frame #12: 0x00000001003b5107 uSmartView_VDI_Client`log4cplus::internal::make_dirs(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 71
frame #13: 0x00000001003b9007 uSmartView_VDI_Client`log4cplus::FileAppenderBase::open(unsigned int) + 39
frame #14: 0x00000001003b87b6 uSmartView_VDI_Client`log4cplus::FileAppenderBase::init() + 310
frame #15: 0x00000001003b9a5a uSmartView_VDI_Client`log4cplus::RollingFileAppender::RollingFileAppender(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, long, int, bool, bool) + 138
frame #16: 0x00000001000ffd47 uSmartView_VDI_Client`init_log_system() at qtlogger.cpp:248:51
frame #17: 0x00000001000bc6aa uSmartView_VDI_Client`Application::run(this=0x0000000109012600, argc=3, argv=0x00007ff7bfeff4e0) at application.cpp:7544:15
frame #18: 0x000000010004ae2c uSmartView_VDI_Client`main(argc=3, argv=0x00007ff7bfeff4e0) at main.cpp:36:10
frame #19: 0x00000001016bd52e dyld`start + 462
</code>
<code>uSmartView_VDI_Client(32644,0x101738600) malloc: Incorrect checksum for freed object 0x108630828: probably modified after being freed. * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT * frame #0: 0x00007ff80f438fce libsystem_kernel.dylib`__pthread_kill + 10 frame #1: 0x00007ff80f46f1ff libsystem_pthread.dylib`pthread_kill + 263 frame #2: 0x00007ff80f3bad14 libsystem_c.dylib`abort + 123 frame #3: 0x00007ff80f297357 libsystem_malloc.dylib`malloc_vreport + 551 frame #4: 0x00007ff80f2ab308 libsystem_malloc.dylib`malloc_zone_error + 178 frame #5: 0x00007ff80f28c50c libsystem_malloc.dylib`tiny_malloc_from_free_list + 1820 frame #6: 0x00007ff80f28b8ad libsystem_malloc.dylib`tiny_malloc_should_clear + 255 frame #7: 0x00007ff80f28a7d2 libsystem_malloc.dylib`szone_malloc_should_clear + 66 frame #8: 0x00007ff80f2a5abb libsystem_malloc.dylib`_malloc_zone_malloc + 125 frame #9: 0x00007ff80f42c95a libc++abi.dylib`operator new(unsigned long) + 26 frame #10: 0x00000001003b4e36 uSmartView_VDI_Client`void log4cplus::internal::split_into_components<log4cplus::internal::(anonymous namespace)::path_sep_comp, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, log4cplus::internal::(anonymous namespace)::path_sep_comp) + 646 frame #11: 0x00000001003b44e5 uSmartView_VDI_Client`log4cplus::internal::split_path(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, unsigned long&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 85 frame #12: 0x00000001003b5107 uSmartView_VDI_Client`log4cplus::internal::make_dirs(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 71 frame #13: 0x00000001003b9007 uSmartView_VDI_Client`log4cplus::FileAppenderBase::open(unsigned int) + 39 frame #14: 0x00000001003b87b6 uSmartView_VDI_Client`log4cplus::FileAppenderBase::init() + 310 frame #15: 0x00000001003b9a5a uSmartView_VDI_Client`log4cplus::RollingFileAppender::RollingFileAppender(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, long, int, bool, bool) + 138 frame #16: 0x00000001000ffd47 uSmartView_VDI_Client`init_log_system() at qtlogger.cpp:248:51 frame #17: 0x00000001000bc6aa uSmartView_VDI_Client`Application::run(this=0x0000000109012600, argc=3, argv=0x00007ff7bfeff4e0) at application.cpp:7544:15 frame #18: 0x000000010004ae2c uSmartView_VDI_Client`main(argc=3, argv=0x00007ff7bfeff4e0) at main.cpp:36:10 frame #19: 0x00000001016bd52e dyld`start + 462 </code>
uSmartView_VDI_Client(32644,0x101738600) malloc: Incorrect checksum for freed object 0x108630828: probably modified after being freed.

* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007ff80f438fce libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007ff80f46f1ff libsystem_pthread.dylib`pthread_kill + 263
    frame #2: 0x00007ff80f3bad14 libsystem_c.dylib`abort + 123
    frame #3: 0x00007ff80f297357 libsystem_malloc.dylib`malloc_vreport + 551
    frame #4: 0x00007ff80f2ab308 libsystem_malloc.dylib`malloc_zone_error + 178
    frame #5: 0x00007ff80f28c50c libsystem_malloc.dylib`tiny_malloc_from_free_list + 1820
    frame #6: 0x00007ff80f28b8ad libsystem_malloc.dylib`tiny_malloc_should_clear + 255
    frame #7: 0x00007ff80f28a7d2 libsystem_malloc.dylib`szone_malloc_should_clear + 66
    frame #8: 0x00007ff80f2a5abb libsystem_malloc.dylib`_malloc_zone_malloc + 125
    frame #9: 0x00007ff80f42c95a libc++abi.dylib`operator new(unsigned long) + 26
    frame #10: 0x00000001003b4e36 uSmartView_VDI_Client`void log4cplus::internal::split_into_components<log4cplus::internal::(anonymous namespace)::path_sep_comp, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, log4cplus::internal::(anonymous namespace)::path_sep_comp) + 646
    frame #11: 0x00000001003b44e5 uSmartView_VDI_Client`log4cplus::internal::split_path(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, unsigned long&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 85
    frame #12: 0x00000001003b5107 uSmartView_VDI_Client`log4cplus::internal::make_dirs(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 71
    frame #13: 0x00000001003b9007 uSmartView_VDI_Client`log4cplus::FileAppenderBase::open(unsigned int) + 39
    frame #14: 0x00000001003b87b6 uSmartView_VDI_Client`log4cplus::FileAppenderBase::init() + 310
    frame #15: 0x00000001003b9a5a uSmartView_VDI_Client`log4cplus::RollingFileAppender::RollingFileAppender(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, long, int, bool, bool) + 138
    frame #16: 0x00000001000ffd47 uSmartView_VDI_Client`init_log_system() at qtlogger.cpp:248:51
    frame #17: 0x00000001000bc6aa uSmartView_VDI_Client`Application::run(this=0x0000000109012600, argc=3, argv=0x00007ff7bfeff4e0) at application.cpp:7544:15
    frame #18: 0x000000010004ae2c uSmartView_VDI_Client`main(argc=3, argv=0x00007ff7bfeff4e0) at main.cpp:36:10
    frame #19: 0x00000001016bd52e dyld`start + 462

It seems that there is something wrong with the memory malloc, I have debugged for many times, it crashed in different places, but all relate to the log system.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật