efremidze / Haptica

Easy Haptic Feedback Generator 📳
MIT License
759 stars 43 forks source link

Random crashes, exception UIFeedbackHapticOnlyEngine _deactivate #16

Closed raviatri closed 4 years ago

raviatri commented 4 years ago

I am using Haptica in my app I recently release a new version of my app on 16 July after that repeating crashes are reported on Xcode organiser. Below are the exception details:-

ERROR: -[_UIFeedbackHapticOnlyEngine _deactivate] called more times than the feedback engine was activated

Fatal Exception: NSInternalInconsistencyException 0 CoreFoundation 0x1f7bc927c exceptionPreprocess 1 libobjc.A.dylib 0x1f6da39f8 objc_exception_throw 2 CoreFoundation 0x1f7ae2988 +[_CFXNotificationTokenRegistration keyCallbacks] 3 Foundation 0x1f85a6188 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] 4 UIKitCore 0x224055628 -[_UIFeedbackEngine _deactivate] 5 UIKitCore 0x22403e58c -[UIFeedbackGenerator __deactivateWithStyle:] 6 libdispatch.dylib 0x1f7608a38 _dispatch_call_block_and_release 7 libdispatch.dylib 0x1f76097d4 _dispatch_client_callout 8 libdispatch.dylib 0x1f75b7004 _dispatch_main_queue_callback_4CF$VARIANT$mp 9 CoreFoundation 0x1f7b5ac1c _CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCHQUEUE 10 CoreFoundation 0x1f7b55b54 CFRunLoopRun 11 CoreFoundation 0x1f7b550b0 CFRunLoopRunSpecific 12 GraphicsServices 0x1f9d5579c GSEventRunModal 13 UIKitCore 0x2244cf978 UIApplicationMain 14 Qpay 0x102253268 main + 16 (GeneratePasscodeInteractor.swift:16) 15 libdyld.dylib 0x1f761a8e0 start

Haptica version:- 3.0.0 Thanks

raviatri commented 4 years ago

Got the solution one of haptic call method is calling in background thread. So I called it to main thread and problem resolved.