MailCore / mailcore2

MailCore 2 provide a simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP. The API has been redesigned from ground up.
Other
2.59k stars 623 forks source link

[Crash] - Object::release() #1945

Open carlossaldanag opened 2 years ago

carlossaldanag commented 2 years ago

Crash log shows that at some point the system is instructed to release an invalid memory reference:

Screen Shot 2022-06-17 at 12 25 41

Given there's a call to release some memory via MC_SAFE_RELEASE inside the setLastFolder method, this issue could be related to this existing patch: https://github.com/MailCore/mailcore2/issues/1917

Crashed: GroupOperation Internal Queue (QOS: UNSPECIFIED)
0  receipthog                     0x488b38 mailcore::Object::release() + 75 (MCObject.cpp:75)
1  receipthog                     0x4b11b8 mailcore::IMAPAsyncConnection::setLastFolder(mailcore::String*) + 346 (MCIMAPAsyncConnection.cpp:346)
2  receipthog                     0x4b2c44 mailcore::IMAPAsyncSession::sessionForFolder(mailcore::String*, bool) + 293 (MCIMAPAsyncSession.cpp:293)
3  receipthog                     0x4a818c mailcore::IMAPOperation::start() + 110 (MCIMAPOperation.cpp:110)
4  receipthog                     0x38b054 IMAPClient.search(expression:in:for:completionBlock:) + 4371509332 (<compiler-generated>:4371509332)
5  receipthog                     0x38ab7c IMAPClient.searchBanner(banner:headers:in:completionBlock:) + 4371508092 (<compiler-generated>:4371508092)
6  receipthog                     0x197e7c IMAPSearchOperation.start() + 4369464956 (<compiler-generated>:4369464956)
7  receipthog                     0x197edc @objc IMAPSearchOperation.start() + 4369465052 (<compiler-generated>:4369465052)
8  Foundation                     0x4d4e8 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 20
9  Foundation                     0x5acfc __NSOQSchedule_f + 180
10 libdispatch.dylib              0x46048 _dispatch_block_async_invoke2 + 104
11 libdispatch.dylib              0x64094 _dispatch_client_callout + 16
12 libdispatch.dylib              0x3bab8 _dispatch_continuation_pop$VARIANT$armv81 + 432
13 libdispatch.dylib              0x3b1f4 _dispatch_async_redirect_invoke + 580
14 libdispatch.dylib              0x48630 _dispatch_root_queue_drain + 328
15 libdispatch.dylib              0x48dec _dispatch_worker_thread2 + 160
16 libsystem_pthread.dylib        0x1dd4 _pthread_wqthread + 224
17 libsystem_pthread.dylib        0x193c start_wqthread + 8
zhangcx627 commented 9 months ago

Any updates? I have the same issue.