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

[ML Kit Bug] Text Recognition Crash with Abort() Called #40

Closed
HenryHins opened this issue Jun 19, 2019 · 7 comments
Closed

[ML Kit Bug] Text Recognition Crash with Abort() Called #40

HenryHins opened this issue Jun 19, 2019 · 7 comments
Assignees
Labels

Comments

@HenryHins
Copy link

This should be fixed 675a2e5#diff-06b93ae9f3a30417bb2b7188c05a82c5
Feel free to reopen if the issue persists.

Not sure if it is the same issue, but I've been seeing a very similar crash. Please advise.

The crash reports come from iPhone 6s, 7, 7 Plus, 8, 8 Plus, and X. They're all on iOS 12. On average with free RAM of 103.36 MB. 0% in background. 0% jailbroken.

Podfile.lock:

  - Firebase/MLVision (5.20.2):
    - Firebase/CoreOnly
    - FirebaseMLVision (= 0.15.0)
  - Firebase/MLVisionTextModel (5.20.2):
    - Firebase/CoreOnly
    - FirebaseMLVisionTextModel (= 0.15.0)

Device:

Model: iPhone X
Orientation: Face Up
RAM free: 85.31 MB
Disk free: 47.43 GB

Version: 12.3.1 (16F203)
Orientation: Portrait
Jailbroken: No

Keys:

crash_info_entry_0:    abort() called

Stack Trace:

Crashed: Thread firebase/quickstart-ios#1
SIGABRT ABORT 0x000000018b3d60dc
Crashed: Thread
0  libsystem_kernel.dylib         0x18b3d60dc __pthread_kill + 8
1  libsystem_pthread.dylib        0x18b4539b0 pthread_kill$VARIANT$armv81 + 296
2  libsystem_c.dylib              0x18b32fea8 abort + 140
3  MyApp                           0x10537d498 PythonGilHolderLookup::Register(long long (*)()) + 4344779928
4  MyApp                           0x10537ef48 (anonymous namespace)::ThreadLivenessWatcher(void*) + 4344786760
5  libsystem_pthread.dylib        0x18b4582c0 _pthread_body + 128
6  libsystem_pthread.dylib        0x18b458220 _pthread_start + 44
7  libsystem_pthread.dylib        0x18b45bcdc thread_start + 4
com.apple.main-thread

com.apple.main-thread
0  libsystem_kernel.dylib         0x18b3cb0f4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x18b3ca5a0 mach_msg + 72
2  CoreFoundation                 0x18b7caa10 __CFRunLoopServiceMachPort + 236
3  CoreFoundation                 0x18b7c5920 __CFRunLoopRun + 1360
4  CoreFoundation                 0x18b7c50b0 CFRunLoopRunSpecific + 436
5  GraphicsServices               0x18d9c579c GSEventRunModal + 104
6  UIKitCore                      0x1b8031978 UIApplicationMain + 212
7  MyApp                           0x1047e92dc main (MyAppnizeScanViewController.swift:18)
8  libdyld.dylib                  0x18b28a8e0 start + 4
com.apple.uikit.eventfetch-thread

com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0x18b3cb0f4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x18b3ca5a0 mach_msg + 72
2  CoreFoundation                 0x18b7caa10 __CFRunLoopServiceMachPort + 236
3  CoreFoundation                 0x18b7c5920 __CFRunLoopRun + 1360
4  CoreFoundation                 0x18b7c50b0 CFRunLoopRunSpecific + 436
5  Foundation                     0x18c192fac -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300
6  Foundation                     0x18c192e3c -[NSRunLoop(NSRunLoop) runUntilDate:] + 96
7  UIKitCore                      0x1b8117494 -[UIEventFetcher threadMain] + 136
8  Foundation                     0x18c2bf6a4 __NSThread__start__ + 984
9  libsystem_pthread.dylib        0x18b4582c0 _pthread_body + 128
10 libsystem_pthread.dylib        0x18b458220 _pthread_start + 44
11 libsystem_pthread.dylib        0x18b45bcdc thread_start + 4
Thread firebase/quickstart-ios#2

Thread
0  libsystem_kernel.dylib         0x18b3d6b74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18b4591f8 _pthread_wqthread + 532
2  libsystem_pthread.dylib        0x18b45bcd4 start_wqthread + 4
Thread firebase/quickstart-ios#3

Thread
0  libsystem_kernel.dylib         0x18b3d6b74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18b4591f8 _pthread_wqthread + 532
2  libsystem_pthread.dylib        0x18b45bcd4 start_wqthread + 4
com.twitter.crashlytics.ios.MachExceptionServer

com.twitter.crashlytics.ios.MachExceptionServer
0  libsystem_kernel.dylib         0x18b3cb0f4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x18b3ca5a0 mach_msg + 72
2  MyApp                           0x1048af90c CLSMachExceptionServer (CLSMachException.c:180)
3  libsystem_pthread.dylib        0x18b4582c0 _pthread_body + 128
4  libsystem_pthread.dylib        0x18b458220 _pthread_start + 44
5  libsystem_pthread.dylib        0x18b45bcdc thread_start + 4
com.apple.CoreMLBatchProcessingQueue

com.apple.CoreMLBatchProcessingQueue
0  libsystem_kernel.dylib         0x18b3d5ee4 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x18b4554a4 _pthread_cond_wait$VARIANT$armv81 + 628
2  Metal                          0x18d97a668 -[_MTLCommandBuffer waitUntilCompleted] + 80
3  Espresso                       0x199f9fbd0 Espresso::batch_metal::sync_wait() + 100
4  Espresso                       0x199eccbb8 Espresso::abstract_context::compute_batch_sync(void (std::__1::shared_ptr<Espresso::abstract_batch> const&) block_pointer) + 116
5  Espresso                       0x199e722d4 EspressoLight::espresso_plan::execute_sync() + 308
6  Espresso                       0x199e750e4 espresso_plan_execute_sync + 72
7  CoreML                         0x19a2fca74 __53-[MLNeuralNetworkEngine evaluateNoAutoRelease:error:]_block_invoke + 200
8  libdispatch.dylib              0x18b2797d4 _dispatch_client_callout + 16
9  libdispatch.dylib              0x18b25a5fc _dispatch_lane_barrier_sync_invoke_and_complete + 56
10 CoreML                         0x19a2fc84c -[MLNeuralNetworkEngine evaluateNoAutoRelease:error:] + 312
11 CoreML                         0x19a2f9e2c -[MLNeuralNetworkEngine evaluate:error:] + 116
12 CoreML                         0x19a3030d8 __62-[MLNeuralNetworkEngine predictionFromFeatures:options:error:]_block_invoke + 80
13 libdispatch.dylib              0x18b2797d4 _dispatch_client_callout + 16
14 libdispatch.dylib              0x18b25a5fc _dispatch_lane_barrier_sync_invoke_and_complete + 56
15 CoreML                         0x19a302f9c -[MLNeuralNetworkEngine predictionFromFeatures:options:error:] + 284
16 MyApp                           0x1048a9e94 Inceptionv3.prediction(input:) (Inceptionv3.swift:141)
17 MyApp                           0x104861754 closure firebase/quickstart-ios#1 in ScanControllerObject.detectPhoto(image:asset:scanText:scanObject:scanNude:updateObject:) (Inceptionv3.swift:154)
18 RealmSwift                     0x106597f5c Realm.write(_:) (Realm.swift:155)
19 MyApp                           0x10485f048 specialized closure firebase/quickstart-ios#4 in closure firebase/quickstart-ios#1 in ScanControllerObject.scanPhotos(assetArray:) (ScanControllerObject.swift:395)
20 MyApp                           0x104865300 partial apply for specialized  (<compiler-generated>)
21 MyApp                           0x10486e8e8 thunk for @escaping @callee_guaranteed (@guaranteed UIImage?, @guaranteed [AnyHashable : Any]?) -> () (<compiler-generated>)
22 Photos                         0x19a197864 __84-[PHImageManager requestImageForAsset:targetSize:contentMode:options:resultHandler:]_block_invoke_3 + 320
23 Photos                         0x19a18c7fc -[PHCoreImageManager _fetchPreheatableAnySizeImageAsNon5551BytesWithRequest:library:format:bestFormat:preheatItem:optimalSourcePixelSize:sync:fireAndForgetCPLDownload:completionHandler:] + 2060
24 Photos                         0x19a190f8c -[PHCoreImageManager _handleNormalImageRequest:library:deliveryMode:degradedFormat:bestFormat:optimalSourcePixelSize:wantsImageDataOrURL:sync:isFinalStageOfStagedRequest:isResponseToSharedStreamsDownload:] + 2068
25 Photos                         0x19a18f618 -[PHCoreImageManager _processImageRequest:sync:] + 2700
26 Photos                         0x19a1926a4 -[PHImageManager requestSynchronousImageForAsset:targetSize:contentMode:options:completionHandler:] + 520
27 Photos                         0x19a1973ac -[PHImageManager requestImageForAsset:targetSize:contentMode:options:resultHandler:] + 620
28 Photos                         0x19a19a8c4 -[PHCachingImageManager requestImageForAsset:targetSize:contentMode:options:resultHandler:] + 308
29 MyApp                           0x10485dd88 closure firebase/quickstart-ios#1 in ScanControllerObject.scanPhotos(assetArray:) (ScanControllerObject.swift:271)
30 MyApp                           0x10486edac thunk for @escaping @callee_guaranteed (@guaranteed PHAsset, @unowned Int, @unowned UnsafeMutablePointer<ObjCBool>) -> () (<compiler-generated>)
31 CoreFoundation                 0x18b818a40 __NSArrayEnumerate + 412
32 Photos                         0x19a27d384 -[PHFetchResult enumerateObjectsUsingBlock:] + 80
33 MyApp                           0x10485cd30 ScanControllerObject.scanPhotos(assetArray:) (ScanControllerObject.swift:180)
34 MyApp                           0x10485c4d0 closure firebase/quickstart-ios#1 in ScanControllerObject.setupObject() (PhotoLibraryManager.swift:17)
35 MyApp                           0x1048968bc thunk for @escaping @callee_guaranteed (@unowned PHAuthorizationStatus) -> () (<compiler-generated>)
36 Photos                         0x19a1b4450 __39+[PHPhotoLibrary requestAuthorization:]_block_invoke + 80
37 AssetsLibraryServices          0x198f188f0 __79-[PLPrivacy _isPhotosAccessAllowedWithScope:forceHandler:accessAllowedHandler:]_block_invoke_2 + 508
38 AssetsLibraryServices          0x198f000e0 __pl_dispatch_async_block_invoke + 36
39 libdispatch.dylib              0x18b278a38 _dispatch_call_block_and_release + 24
40 libdispatch.dylib              0x18b2797d4 _dispatch_client_callout + 16
41 libdispatch.dylib              0x18b254dec _dispatch_lane_serial_drain$VARIANT$armv81 + 548
42 libdispatch.dylib              0x18b25592c _dispatch_lane_invoke$VARIANT$armv81 + 408
43 libdispatch.dylib              0x18b25de08 _dispatch_workloop_worker_thread + 584
44 libsystem_pthread.dylib        0x18b459114 _pthread_wqthread + 304
45 libsystem_pthread.dylib        0x18b45bcd4 start_wqthread + 4
Thread firebase/quickstart-ios#4

Thread
0  libsystem_kernel.dylib         0x18b3d6b74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18b4591f8 _pthread_wqthread + 532
2  libsystem_pthread.dylib        0x18b45bcd4 start_wqthread + 4
Thread firebase/quickstart-ios#5

Thread
0  libsystem_kernel.dylib         0x18b3d6b74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18b4591f8 _pthread_wqthread + 532
2  libsystem_pthread.dylib        0x18b45bcd4 start_wqthread + 4
Thread firebase/quickstart-ios#6

Thread
0  libsystem_pthread.dylib        0x18b45bcd0 start_wqthread + 190
Thread firebase/quickstart-ios#7

Thread
0  libsystem_kernel.dylib         0x18b3d7fd8 poll + 8
1  MyApp                           0x10537f04c (anonymous namespace)::ExitTimeoutWatcher(void*) + 4344787020
2  libsystem_pthread.dylib        0x18b4582c0 _pthread_body + 128
3  libsystem_pthread.dylib        0x18b458220 _pthread_start + 44
4  libsystem_pthread.dylib        0x18b45bcdc thread_start + 4
RLMRealm notification listener

RLMRealm notification listener
0  libsystem_kernel.dylib         0x18b3d78f4 kevent + 8
1  Realm                          0x1060e3588 realm::_impl::ExternalCommitHelper::listen() (external_commit_helper.cpp:217)
2  Realm                          0x1060e40d4 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >(void*) (tuple:170)
3  libsystem_pthread.dylib        0x18b4582c0 _pthread_body + 128
4  libsystem_pthread.dylib        0x18b458220 _pthread_start + 44
5  libsystem_pthread.dylib        0x18b45bcdc thread_start + 4
com.apple.NSURLConnectionLoader

com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x18b3cb0f4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x18b3ca5a0 mach_msg + 72
2  CoreFoundation                 0x18b7caa10 __CFRunLoopServiceMachPort + 236
3  CoreFoundation                 0x18b7c5920 __CFRunLoopRun + 1360
4  CoreFoundation                 0x18b7c50b0 CFRunLoopRunSpecific + 436
5  CFNetwork                      0x18bdde74c -[__CoreSchedulingSetRunnable runForever] + 216
6  Foundation                     0x18c2bf6a4 __NSThread__start__ + 984
7  libsystem_pthread.dylib        0x18b4582c0 _pthread_body + 128
8  libsystem_pthread.dylib        0x18b458220 _pthread_start + 44
9  libsystem_pthread.dylib        0x18b45bcdc thread_start + 4
Thread firebase/quickstart-ios#8

Thread
0  libsystem_kernel.dylib         0x18b3d6b74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18b459138 _pthread_wqthread + 340
2  libsystem_pthread.dylib        0x18b45bcd4 start_wqthread + 4
Thread firebase/quickstart-ios#9

Thread
0  libsystem_kernel.dylib         0x18b3d6b74 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18b4591f8 _pthread_wqthread + 532
2  libsystem_pthread.dylib        0x18b45bcd4 start_wqthread + 4
@HenryHins HenryHins changed the title [Ml Kit Bug] Text Recognition Crash with Abort() Called [ML Kit Bug] Text Recognition Crash with Abort() Called Jun 19, 2019
@ulukaya
Copy link
Collaborator

ulukaya commented Jun 19, 2019

Is this different than https://github.com/firebase/quickstart-ios/issues/733?

Possible duplicate

@ulukaya ulukaya closed this as completed Jun 19, 2019
@HenryHins
Copy link
Author

Crashes in firebase/quickstart-ios#733 didn't called Abort() before crashing, but RecognizeRawDataWithBoxAndAssistAndDetections instead.

@morganchen12 morganchen12 reopened this Jun 20, 2019
@morganchen12
Copy link

Can you try to reproduce this crash on Firebase 6 as well?

@HenryHins
Copy link
Author

HenryHins commented Jul 18, 2019

Please reopen the issue. The problem still exists in Firebase 6.

Firebase 6 stack trace:

Crashed: Thread
0  libsystem_kernel.dylib         0x1edaa20dc __pthread_kill + 8
1  libsystem_pthread.dylib        0x1edb1f9b0 pthread_kill$VARIANT$armv81 + 296
2  libsystem_c.dylib              0x1ed9fbea8 abort + 140
3  MyApp                           0x103480098 PythonGilHolderLookup::Register(long long (*)()) + 4351770776
4  MyApp                           0x103481b48 (anonymous namespace)::ThreadLivenessWatcher(void*) + 4351777608
5  libsystem_pthread.dylib        0x1edb242c0 _pthread_body + 128
6  libsystem_pthread.dylib        0x1edb24220 _pthread_start + 44
7  libsystem_pthread.dylib        0x1edb27cdc thread_start + 4

@morganchen12 morganchen12 reopened this Jul 18, 2019
@ulukaya ulukaya transferred this issue from firebase/quickstart-ios Jun 30, 2020
@ulukaya ulukaya transferred this issue from another repository Jun 30, 2020
@sheepmaster
Copy link
Collaborator

The immediate crash is coming from PythonGilHolderLookup::Register, which is not ML Kit (not sure what it is).

@sheepmaster
Copy link
Collaborator

Oh wait, that's an internal class

@sheepmaster sheepmaster reopened this Jun 30, 2020
@calren calren added the ios label Jul 20, 2020
@bcdj
Copy link
Collaborator

bcdj commented Oct 16, 2020

FirebaseML's on-device text recognition is deprecated. Please migrate to the new standalone ML Kit (https://developers.google.com/ml-kit/guides) to see if the issue still exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants