Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXC_BAD_ACCESS KERN_INVALID_ADDRESS (LMLogger.m lines 209 and 230) #8

Closed
u2606 opened this issue Jun 6, 2017 · 4 comments
Closed

Comments

@u2606
Copy link

u2606 commented Jun 6, 2017

We're using Logmatic through CocoaPods, version 1.0.2, in our Swift 3.1 app. Crashlytics by Fabric has reported several crashes traced to Logmatic. Two stack traces are pasted below:


LMLogger.m line 209
-[LMLogger _requestWithLogs:]

Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x00000000d409beb8

Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x18cfc8150 objc_msgSend + 16
1  Foundation                     0x18f0ccec0 _writeJSONValue + 96
2  Foundation                     0x18f0cf444 ___writeJSONArray_block_invoke + 144
3  CoreFoundation                 0x18e441e24 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 132
4  CoreFoundation                 0x18e441cb8 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 208
5  Foundation                     0x18f0cec24 _writeJSONArray + 292
6  Foundation                     0x18f0cd080 _writeJSONValue + 544
7  Foundation                     0x18f0cce18 -[_NSJSONWriter dataWithRootObject:options:error:] + 140
8  Foundation                     0x18f0cde20 +[NSJSONSerialization dataWithJSONObject:options:error:] + 348
9  Logmatic                       0x100af828c -[LMLogger _requestWithLogs:] (LMLogger.m:209)
10 Logmatic                       0x100af7f1c -[LMLogger _sendLogs:] (LMLogger.m:185)
11 Logmatic                       0x100af7d64 -[LMLogger _sendPendingLogsAndSync] (LMLogger.m:178)
12 Foundation                     0x18f047760 __NSFireTimer + 88
13 CoreFoundation                 0x18e501a9c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
14 CoreFoundation                 0x18e5017a0 __CFRunLoopDoTimer + 856
15 CoreFoundation                 0x18e501060 __CFRunLoopDoTimers + 244
16 CoreFoundation                 0x18e4fec84 __CFRunLoopRun + 1484
17 CoreFoundation                 0x18e42ed94 CFRunLoopRunSpecific + 424
18 GraphicsServices               0x18fe98074 GSEventRunModal + 100
19 UIKit                          0x1946e7130 UIApplicationMain + 208
20 <App Name Redacted>            0x1000f39c0 main (AppDelegate.swift:23)
21 libdyld.dylib                  0x18d43d59c start + 4

LMLogger.m line 230
-[LMLogger _requestSucceededWithTask:]

Crashed: NSOperationQueue 0x17403f5c0 :: NSOperation 0x171048fd0 (QOS: DEFAULT)
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000bdf16bec8

Crashed: NSOperationQueue 0x17403f5c0 :: NSOperation 0x171048fd0 (QOS: DEFAULT)
0  libobjc.A.dylib                0x18a2b17f4 objc_object::release() + 8
1  CoreFoundation                 0x18b712a70 -[__NSArrayI dealloc] + 84
2  Logmatic                       0x100b0c444 -[LMLogger _requestSucceededWithTask:] (LMLogger.m:230)
3  Logmatic                       0x100b0c09c __22-[LMLogger _sendLogs:]_block_invoke (LMLogger.m:190)
4  Embrace                        0x101109d6c __swizzledDataTaskWithRequest_block_invoke + 424
5  CFNetwork                      0x18be3c1fc __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 32
6  CFNetwork                      0x18be53ef8 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 148
7  Foundation                     0x18c301804 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
8  Foundation                     0x18c246760 -[NSBlockOperation main] + 96
9  Foundation                     0x18c236b18 -[__NSOperationInternal _start:] + 612
10 Foundation                     0x18c303ba0 __NSOQSchedule_f + 228
11 libdispatch.dylib              0x18a6ea9a0 _dispatch_client_callout + 16
12 libdispatch.dylib              0x18a6f8ad4 _dispatch_queue_serial_drain + 928
13 libdispatch.dylib              0x18a6ee2cc _dispatch_queue_invoke + 884
14 libdispatch.dylib              0x18a6faa50 _dispatch_root_queue_drain + 540
15 libdispatch.dylib              0x18a6fa7d0 _dispatch_worker_thread3 + 124
16 libsystem_pthread.dylib        0x18a8f31d0 _pthread_wqthread + 1096
17 libsystem_pthread.dylib        0x18a8f2d7c start_wqthread + 4

Crash Insights

Heads Up!
Heap corruption

The stack trace indicates that heap corruption may have caused your app to crash. Memory corruption can occur pretty easily from freeing a dangling pointer, a thread race, or bad pointer arithmetic. The important thing to keep in mind is that the resulting crash may happen long after the initial corruption. As a result, the stack trace for this crash might not provide any clues to the location of the bug in your code. However, you can still fix memory issues with tools from Apple. For speedy resolution of memory corruption issues, we recommend regularly auditing your app with Xcode’s memory debugging facilities: Visual Memory Debugger, Zombies Instrument, Address Sanitizer, Thread Sanitizer and malloc diagnostics.

@ncltg
Copy link

ncltg commented Jul 10, 2017

Same here, any idea on how to fix that ?

@jhanzo
Copy link

jhanzo commented Jun 18, 2018

Any update on this issue ? 😕

@lowki93
Copy link

lowki93 commented Jun 18, 2018

it's happened sometimes :(

@u2606 u2606 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants