ios - Swift Crash libobjc.A.dylib objc_msgSend -
i use crashlytics crashes of app in appstore. users getting crash cannot seem repro on machine (neither few friends tested app through testflight). logs fabric:
thread : crashed: com.apple.main-thread 0 libobjc.a.dylib 0x181d09bdc objc_msgsend + 28 1 foundation 0x18304be20 __nsthreadperformperform + 340 2 corefoundation 0x182640efc __cfrunloop_is_calling_out_to_a_source0_perform_function__ + 24 3 corefoundation 0x182640990 __cfrunloopdosources0 + 540 4 corefoundation 0x18263e690 __cfrunlooprun + 724 5 corefoundation 0x18256d680 cfrunlooprunspecific + 384 6 graphicsservices 0x183a7c088 gseventrunmodal + 180 7 uikit 0x1873e4d90 uiapplicationmain + 204 8 <app name> 0x1000b2f0c main (appdelegate.swift:14) 9 libdispatch.dylib 0x18210e8b8 (missing)
i can't seem understand means , searched other questions can't seem find answer. contacted crashlytics team, , told me following:
it sounds source of crash sort of out of memory crash. causing crashlytics close before finishes writing, resulting in in crash report.
any nice ways debug in order pinpoint source of crash? appreciate help!
edit: added screenshot of threads in crash report crashlytics in case wants info there:
thread : com.apple.nsurlconnectionloader 0 libsystem_kernel.dylib 0x1823354bc mach_msg_trap + 8 1 libsystem_kernel.dylib 0x182335338 mach_msg + 72 2 corefoundation 0x182764ac0 __cfrunloopservicemachport + 196 3 corefoundation 0x1827627c4 __cfrunlooprun + 1032 4 corefoundation 0x182691680 cfrunlooprunspecific + 384 5 cfnetwork 0x182e01434 +[nsurlconnection(loader) _resourceloadloop:] + 412 6 foundation 0x18316fc40 __nsthread__start__ + 1000 7 libsystem_pthread.dylib 0x182417b28 _pthread_body + 156 8 libsystem_pthread.dylib 0x182417a8c _pthread_body + 154 9 libsystem_pthread.dylib 0x182415028 thread_start + 4 thread : avaudiosession notify thread 0 libsystem_kernel.dylib 0x1823354bc mach_msg_trap + 8 1 libsystem_kernel.dylib 0x182335338 mach_msg + 72 2 corefoundation 0x182764ac0 __cfrunloopservicemachport + 196 3 corefoundation 0x1827627c4 __cfrunlooprun + 1032 4 corefoundation 0x182691680 cfrunlooprunspecific + 384 5 libavfaudio.dylib 0x188959834 genericrunloopthread::entry(void*) + 164 6 libavfaudio.dylib 0x18892e3a8 capthread::entry(capthread*) + 84 7 libsystem_pthread.dylib 0x182417b28 _pthread_body + 156 8 libsystem_pthread.dylib 0x182417a8c _pthread_body + 154 9 libsystem_pthread.dylib 0x182415028 thread_start + 4
edit 2: using swift code, , way forwarding messages selectors following:
nstimer.scheduledtimerwithtimeinterval(0.02, target: self, selector: selector("updateprogresscircle"), userinfo: nil, repeats: true) func updateprogresscircle() { // }
problem can't repro crash locally. users facing that. call selectors in similar fashion.
an objc_msgsend
crash happens when try forward message selector (using old objective-c forward messaging). can produced target-action, notifications, protocol declarations, timers, perform selectors or other function involves passing in function's selector syntax: i.e: "dosomethingwiththis:"
.
i can see crash logs have swift components in app (at least appdelegate). swift components, unlike obj-c components, aren't compatible obj-c forward messaging system out of box.
my gut feeling have swift object in code conforms protocol, added target/notification observer or somehow expecting 1 of functions called forward messaging. suggest go through classes , see if case. once find culprit can fix error appending @objc function expecting message.
i.e: if function, in swift class called (and is, say, registered notification):
func yourfunction() { //your code }
call it:
@objc func yourfunction() { //your code }
it's long shot hope helps!
Comments
Post a Comment