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.61k stars 624 forks source link

[Bug] - Crash at mailcore::IMAPOperationQueueCallback::queueStartRunning() #1888

Open 2h4u opened 4 years ago

2h4u commented 4 years ago

Summary I am experiencing some crashes with the following stack trace:

Crashed: com.apple.main-thread
0  App                          0x1023d3418 non-virtual thunk to mailcore::IMAPOperationQueueCallback::queueStartRunning() + 59 (MCIMAPAsyncConnection.cpp:59)
1  App                          0x1023b1354 mailcore::OperationQueue::startThread() + 257 (MCOperationQueue.cpp:257)
2  App                          0x1023b17e0 mailcore::OperationQueue::stoppedOnMainThread(void*) + 243 (MCOperationQueue.cpp:243)
3  libdispatch.dylib              0x19e6ee484 _dispatch_client_callout + 16
4  libdispatch.dylib              0x19e69b6a0 _dispatch_async_and_wait_invoke + 92
5  libdispatch.dylib              0x19e6ee484 _dispatch_client_callout + 16
6  libdispatch.dylib              0x19e69a9a4 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1068
7  CoreFoundation                 0x19ec44df4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
8  CoreFoundation                 0x19ec3fcbc __CFRunLoopRun + 1964
9  CoreFoundation                 0x19ec3f1f0 CFRunLoopRunSpecific + 436
10 GraphicsServices               0x1a0eb8584 GSEventRunModal + 100
11 UIKitCore                      0x1cbe4ad40 UIApplicationMain + 212
12 App                          0x1020ba330 main + 13 (ViewController.swift:13)
13 libdyld.dylib                  0x19e6febb4 start + 4

In my opinion it looks like that at https://github.com/MailCore/mailcore2/blob/0.6.4/src/async/imap/MCIMAPAsyncConnection.cpp#L59 the pointer of mConnection is not valid anymore (for whatever reason) but of course I could be wrong.

Any ideas how tho fix this issue?

Platform(s)

iOS

Version

v0.6.4