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] On Device Text Recognition Crash #39

Closed
enriquemgz opened this issue Jul 2, 2019 · 6 comments
Closed

[ML Kit Bug] On Device Text Recognition Crash #39

enriquemgz opened this issue Jul 2, 2019 · 6 comments
Assignees

Comments

@enriquemgz
Copy link

Every time I take a photo or select and image from assets (hardcoded the image) and try to find text inside with the onDeviceTextRecognizer, the app crashes.
It works fine on debug mode but in release always crashes.

I followed from here:
https://github.com/firebase/quickstart-ios/blob/master/mlvision/MLVisionExampleObjc/ViewController.m

Any advice appreciated.

Podfile.lock:

 - Firebase/Analytics (6.3.0):
    - Firebase/Core
  - Firebase/Core (6.3.0):
    - Firebase/CoreOnly
    - FirebaseAnalytics (= 6.0.2)
  - Firebase/CoreOnly (6.3.0):
    - FirebaseCore (= 6.0.3)
  - Firebase/MLVision (6.3.0):
    - Firebase/CoreOnly
    - FirebaseMLVision (~> 0.16.0)
  - Firebase/MLVisionAutoML (6.3.0):
    - Firebase/CoreOnly
    - FirebaseMLVisionAutoML (~> 0.16.0)
  - Firebase/MLVisionTextModel (6.3.0):
    - Firebase/CoreOnly
    - FirebaseMLVisionTextModel (~> 0.16.0)

Device

# Date: 2019-07-02T04:34:00Z
# OS Version: 12.1.4 (16D57)
# Device: iPhone X
# RAM Free: 1.8%
# Disk Free: 47.5%
crash_info_entry_1 
abort() called

crash_info_entry_2
MiSuburbano(27929,0x106ddab80) malloc: *** error for object 0x10b347840: pointer being freed was not allocated

Stack trace

#0. Crashed: com.apple.main-thread
0  libsystem_kernel.dylib         0x213f7f104 __pthread_kill + 8
1  libsystem_pthread.dylib        0x213fff948 pthread_kill$VARIANT$armv81 + 296
2  libsystem_c.dylib              0x213ed6d78 abort + 140
3  libsystem_malloc.dylib         0x213fd3768 _malloc_put + 570
4  libsystem_malloc.dylib         0x213fd3924 malloc_report + 64
5  libsystem_malloc.dylib         0x213fc62d4 free + 376
6  libc++.1.dylib                 0x213583d28 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__grow_by_and_replace(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, char const*) + 248
7  libc++.1.dylib                 0x213583208 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::assign(char const*, unsigned long) + 108
8  libc++.1.dylib                 0x213583188 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator=(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 56
9  MiSuburbano                    0x101d506e4 GMVx_farmhash::Fingerprint128(char const*, unsigned long) + 4760932
10 MiSuburbano                    0x102031698 GMVx_farmhash::Fingerprint128(char const*, unsigned long) + 7779608
11 MiSuburbano                    0x101940d8c GMVx_farmhash::Fingerprint128(char const*, unsigned long) + 502796
12 MiSuburbano                    0x101940b00 GMVx_farmhash::Fingerprint128(char const*, unsigned long) + 502144
13 MiSuburbano                    0x1018c8180 +[GMVDetector detectorForClassNamed:options:] + 8192
14 MiSuburbano                    0x1018c8044 +[GMVDetector detectorOfType:options:] + 7876
15 MiSuburbano                    0x101423298 -[FIRVisionTextRecognizer initWithApp:logger:options:type:detector:cloudVisionService:] + 8847848
16 MiSuburbano                    0x101422ca8 +[FIRVisionTextRecognizer textRecognizerForApp:logger:options:type:detector:cloudVisionService:] + 8846328
17 MiSuburbano                    0x101422b48 +[FIRVisionTextRecognizer textRecognizerForApp:logger:options:type:] + 8845976
18 MiSuburbano                    0x1014228b0 +[FIRVisionTextRecognizer onDeviceTextRecognizerForApp:logger:] + 8845312
19 MiSuburbano                    0x1014128a8 -[FIRVision onDeviceTextRecognizer] + 8779768
20 MiSuburbano                    0x100f6c260 -[VisionImagePresenter firebaseImage:response:] + 34 (VisionImagePresenter.m:34)
21 MiSuburbano                    0x100f4184c -[YourBalanceViewController firebaseImage] + 184 (YourBalanceViewController.m:184)
22 UIKitCore                      0x240f4d990 -[UIImagePickerController _imagePickerDidCompleteWithInfo:] + 128
23 PhotoLibrary                   0x227766148 PLNotifyImagePickerOfImageAvailability
24 CameraUI                       0x23202ad84 initPLNotifyImagePickerOfImageAvailability
25 CameraUI                       0x23202a728 -[CAMImagePickerCameraViewController _handleCapturedImagePickerPhotoWithCropOverlayOutput:]
26 AssetsLibraryServices          0x221dcb78c __pl_dispatch_sync_block_invoke + 36
27 libdispatch.dylib              0x213e22484 _dispatch_client_callout + 16
28 libdispatch.dylib              0x213e0281c _dispatch_async_and_wait_invoke + 92
29 libdispatch.dylib              0x213e22484 _dispatch_client_callout + 16
30 libdispatch.dylib              0x213e01b34 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 1012
31 CoreFoundation                 0x214379ce4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
32 CoreFoundation                 0x214374bac __CFRunLoopRun + 1964
33 CoreFoundation                 0x2143740e0 CFRunLoopRunSpecific + 436
34 GraphicsServices               0x2165ed584 GSEventRunModal + 100
35 UIKitCore                      0x2415c4c00 UIApplicationMain + 212
36 MiSuburbano                    0x101135190 main + 33 (main.mm:33)
37 libdyld.dylib                  0x213e32bb4 start + 4

--

#0. Crashed: com.apple.main-thread
0  libsystem_kernel.dylib         0x213f7f104 __pthread_kill + 8
1  libsystem_pthread.dylib        0x213fff948 pthread_kill$VARIANT$armv81 + 296
2  libsystem_c.dylib              0x213ed6d78 abort + 140
3  libsystem_malloc.dylib         0x213fd3768 _malloc_put + 570
4  libsystem_malloc.dylib         0x213fd3924 malloc_report + 64
5  libsystem_malloc.dylib         0x213fc62d4 free + 376
6  libc++.1.dylib                 0x213583d28 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__grow_by_and_replace(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, char const*) + 248
7  libc++.1.dylib                 0x213583208 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::assign(char const*, unsigned long) + 108
8  libc++.1.dylib                 0x213583188 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator=(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 56
9  MiSuburbano                    0x101d506e4 GMVx_farmhash::Fingerprint128(char const*, unsigned long) + 4760932
10 MiSuburbano                    0x102031698 GMVx_farmhash::Fingerprint128(char const*, unsigned long) + 7779608
11 MiSuburbano                    0x101940d8c GMVx_farmhash::Fingerprint128(char const*, unsigned long) + 502796
12 MiSuburbano                    0x101940b00 GMVx_farmhash::Fingerprint128(char const*, unsigned long) + 502144
13 MiSuburbano                    0x1018c8180 +[GMVDetector detectorForClassNamed:options:] + 8192
14 MiSuburbano                    0x1018c8044 +[GMVDetector detectorOfType:options:] + 7876
15 MiSuburbano                    0x101423298 -[FIRVisionTextRecognizer initWithApp:logger:options:type:detector:cloudVisionService:] + 8847848
16 MiSuburbano                    0x101422ca8 +[FIRVisionTextRecognizer textRecognizerForApp:logger:options:type:detector:cloudVisionService:] + 8846328
17 MiSuburbano                    0x101422b48 +[FIRVisionTextRecognizer textRecognizerForApp:logger:options:type:] + 8845976
18 MiSuburbano                    0x1014228b0 +[FIRVisionTextRecognizer onDeviceTextRecognizerForApp:logger:] + 8845312
19 MiSuburbano                    0x1014128a8 -[FIRVision onDeviceTextRecognizer] + 8779768
20 MiSuburbano                    0x100f6c260 -[VisionImagePresenter firebaseImage:response:] + 34 (VisionImagePresenter.m:34)
21 MiSuburbano                    0x100f4184c -[YourBalanceViewController firebaseImage] + 184 (YourBalanceViewController.m:184)
22 UIKitCore                      0x240f4d990 -[UIImagePickerController _imagePickerDidCompleteWithInfo:] + 128
23 PhotoLibrary                   0x227766148 PLNotifyImagePickerOfImageAvailability
24 CameraUI                       0x23202ad84 initPLNotifyImagePickerOfImageAvailability
25 CameraUI                       0x23202a728 -[CAMImagePickerCameraViewController _handleCapturedImagePickerPhotoWithCropOverlayOutput:]
26 AssetsLibraryServices          0x221dcb78c __pl_dispatch_sync_block_invoke + 36
27 libdispatch.dylib              0x213e22484 _dispatch_client_callout + 16
28 libdispatch.dylib              0x213e0281c _dispatch_async_and_wait_invoke + 92
29 libdispatch.dylib              0x213e22484 _dispatch_client_callout + 16
30 libdispatch.dylib              0x213e01b34 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 1012
31 CoreFoundation                 0x214379ce4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
32 CoreFoundation                 0x214374bac __CFRunLoopRun + 1964
33 CoreFoundation                 0x2143740e0 CFRunLoopRunSpecific + 436
34 GraphicsServices               0x2165ed584 GSEventRunModal + 100
35 UIKitCore                      0x2415c4c00 UIApplicationMain + 212
36 MiSuburbano                    0x101135190 main + 33 (main.mm:33)
37 libdyld.dylib                  0x213e32bb4 start + 4

firebase/quickstart-ios#1. Thread
0  libsystem_kernel.dylib         0x213f7fb9c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x2140051c0 _pthread_wqthread + 540
2  libsystem_pthread.dylib        0x214007cec start_wqthread + 4

firebase/quickstart-ios#2. Thread
0  libsystem_kernel.dylib         0x213f7fb9c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x214005100 _pthread_wqthread + 348
2  libsystem_pthread.dylib        0x214007cec start_wqthread + 4

firebase/quickstart-ios#3. com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0x213f73ea4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x213f7337c mach_msg + 72
2  CoreFoundation                 0x214379ad8 __CFRunLoopServiceMachPort + 236
3  CoreFoundation                 0x214374974 __CFRunLoopRun + 1396
4  CoreFoundation                 0x2143740e0 CFRunLoopRunSpecific + 436
5  Foundation                     0x214d6a494 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300
6  Foundation                     0x214d6a340 -[NSRunLoop(NSRunLoop) runUntilDate:] + 148
7  UIKitCore                      0x2416b50c4 -[UIEventFetcher threadMain] + 136
8  Foundation                     0x214e9d23c __NSThread__start__ + 1040
9  libsystem_pthread.dylib        0x21400425c _pthread_body + 128
10 libsystem_pthread.dylib        0x2140041bc _pthread_start + 48
11 libsystem_pthread.dylib        0x214007cf4 thread_start + 4

firebase/quickstart-ios#4. CCTLogWriter
0  libsystem_kernel.dylib         0x213f81948 write + 8
1  CoreFoundation                 0x21433b520 fdWrite + 20
2  CoreFoundation                 0x21433bbd4 fileWrite + 24
3  CoreFoundation                 0x21438b42c CFWriteStreamWrite + 300
4  MiSuburbano                    0x10127a150 GPBRefreshBuffer + 72 (GPBCodedOutputStream.m:72)
5  MiSuburbano                    0x101906390 -[GMVx_CCTLogOutputStream writeLogEvent:] + 262672
6  MiSuburbano                    0x101904e68 -[GMVx_CCTLogWriter writeLogInternal:pseudonymousID:logDirectory:clock:logTransformers:] + 257256
7  MiSuburbano                    0x101904590 __80-[GMVx_CCTLogWriter writeLog:pseudonymousID:logDirectory:clock:logTransformers:]_block_invoke_2 + 254992
8  libdispatch.dylib              0x213e216c8 _dispatch_call_block_and_release + 24
9  libdispatch.dylib              0x213e22484 _dispatch_client_callout + 16
10 libdispatch.dylib              0x213dfcfa0 _dispatch_lane_serial_drain$VARIANT$armv81 + 548
11 libdispatch.dylib              0x213dfdae4 _dispatch_lane_invoke$VARIANT$armv81 + 412
12 libdispatch.dylib              0x213e05f04 _dispatch_workloop_worker_thread + 584
13 libsystem_pthread.dylib        0x2140050dc _pthread_wqthread + 312
14 libsystem_pthread.dylib        0x214007cec start_wqthread + 4

firebase/quickstart-ios#5. com.apple.root.default-qos
0  libsystem_kernel.dylib         0x213f7f9fc __ulock_wait + 8
1  libdispatch.dylib              0x213df0e20 _dispatch_ulock_wait + 56
2  libdispatch.dylib              0x213df0f58 _dispatch_thread_event_wait_slow$VARIANT$armv81 + 48
3  libdispatch.dylib              0x213e029e8 __DISPATCH_WAIT_FOR_QUEUE__ + 328
4  libdispatch.dylib              0x213e025f0 _dispatch_sync_f_slow + 144
5  AssetsLibraryServices          0x221dcb75c pl_dispatch_sync + 68
6  PhotoLibrary                   0x2277993a8 -[PLCropOverlay(PhotoSaving) _backgroundSavePhoto:]
7  AssetsLibraryServices          0x221dcb82c __pl_dispatch_async_block_invoke + 36
8  libdispatch.dylib              0x213e216c8 _dispatch_call_block_and_release + 24
9  libdispatch.dylib              0x213e22484 _dispatch_client_callout + 16
10 libdispatch.dylib              0x213df8a6c _dispatch_queue_override_invoke + 664
11 libdispatch.dylib              0x213e04aec _dispatch_root_queue_drain + 344
12 libdispatch.dylib              0x213e0534c _dispatch_worker_thread2 + 116
13 libsystem_pthread.dylib        0x21400517c _pthread_wqthread + 472
14 libsystem_pthread.dylib        0x214007cec start_wqthread + 4

firebase/quickstart-ios#6. com.twitter.crashlytics.ios.MachExceptionServer
0  libsystem_kernel.dylib         0x213f73ea4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x213f7337c mach_msg + 72
2  MiSuburbano                    0x1012ebd14 CLSMachExceptionServer + 7572580
3  libsystem_pthread.dylib        0x21400425c _pthread_body + 128
4  libsystem_pthread.dylib        0x2140041bc _pthread_start + 48
5  libsystem_pthread.dylib        0x214007cf4 thread_start + 4

firebase/quickstart-ios#7. Thread
0  libsystem_kernel.dylib         0x213f7fb9c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x214005100 _pthread_wqthread + 348
2  libsystem_pthread.dylib        0x214007cec start_wqthread + 4

firebase/quickstart-ios#8. Thread
0  libsystem_kernel.dylib         0x213f7fb9c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x214005100 _pthread_wqthread + 348
2  libsystem_pthread.dylib        0x214007cec start_wqthread + 4

firebase/quickstart-ios#9. GC Finalizer
0  libsystem_kernel.dylib         0x213f7ef0c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x214001410 _pthread_cond_wait$VARIANT$armv81 + 620
2  MiSuburbano                    0x102b7ef7c il2cpp::os::posix::PosixWaitObject::Wait(unsigned int, bool) + 129 (PosixWaitObject.cpp:129)
3  MiSuburbano                    0x102b64f34 FinalizerThread(void*) + 37 (GarbageCollector.cpp:37)
4  MiSuburbano                    0x102b7b31c il2cpp::os::Thread::RunWrapper(void*) + 106 (Thread.cpp:106)
5  MiSuburbano                    0x102b816f8 il2cpp::os::ThreadImpl::ThreadStartWrapper(void*) + 108 (ThreadImpl.cpp:108)
6  libsystem_pthread.dylib        0x21400425c _pthread_body + 128
7  libsystem_pthread.dylib        0x2140041bc _pthread_start + 48
8  libsystem_pthread.dylib        0x214007cf4 thread_start + 4

firebase/quickstart-ios#10. BatchDeleteObjects
0  libsystem_kernel.dylib         0x213f73ee0 semaphore_wait_trap + 8
1  libdispatch.dylib              0x213df0b64 _dispatch_sema4_wait$VARIANT$armv81 + 24
2  libdispatch.dylib              0x213df15d4 _dispatch_semaphore_wait_slow + 128
3  MiSuburbano                    0x10242a114 ThreadedStreamBuffer::HandleReadOverflow(unsigned int&, unsigned int&) + 26 (TimeHelper.h:26)
4  MiSuburbano                    0x102392078 BatchDeleteStep2Threaded(void*) + 243 (ThreadedStreamBuffer.h:243)
5  MiSuburbano                    0x102429784 Thread::RunThreadWrapper(void*) + 44 (Thread.cpp:44)
6  libsystem_pthread.dylib        0x21400425c _pthread_body + 128
7  libsystem_pthread.dylib        0x2140041bc _pthread_start + 48
8  libsystem_pthread.dylib        0x214007cf4 thread_start + 4

firebase/quickstart-ios#11. AsyncReadManager
0  libsystem_kernel.dylib         0x213f73ee0 semaphore_wait_trap + 8
1  libdispatch.dylib              0x213df0b64 _dispatch_sema4_wait$VARIANT$armv81 + 24
2  libdispatch.dylib              0x213df15d4 _dispatch_semaphore_wait_slow + 128
3  MiSuburbano                    0x10244c4c4 AsyncReadManagerThreaded::ThreadEntry() + 29 (Mutex.h:29)
4  MiSuburbano                    0x10244c2e0 AsyncReadManagerThreaded::StaticThreadEntry(void*) + 57 (AsyncReadManagerThreaded.cpp:57)
5  MiSuburbano                    0x102429784 Thread::RunThreadWrapper(void*) + 44 (Thread.cpp:44)
6  libsystem_pthread.dylib        0x21400425c _pthread_body + 128
7  libsystem_pthread.dylib        0x2140041bc _pthread_start + 48
8  libsystem_pthread.dylib        0x214007cf4 thread_start + 4

firebase/quickstart-ios#12. JavaScriptCore bmalloc scavenger
0  libsystem_kernel.dylib         0x213f7ef0c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x214001410 _pthread_cond_wait$VARIANT$armv81 + 620
2  libc++.1.dylib                 0x21354c4d0 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24
3  JavaScriptCore                 0x21b72d648 void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::unique_lock<bmalloc::Mutex>&) + 104
4  JavaScriptCore                 0x21b73173c bmalloc::Scavenger::threadRunLoop() + 176
5  JavaScriptCore                 0x21b730e70 bmalloc::Scavenger::Scavenger(std::__1::lock_guard<bmalloc::Mutex>&) + 10
6  JavaScriptCore                 0x21b73291c std::__1::__thread_specific_ptr<std::__1::__thread_struct>::set_pointer(std::__1::__thread_struct*) + 38
7  libsystem_pthread.dylib        0x21400425c _pthread_body + 128
8  libsystem_pthread.dylib        0x2140041bc _pthread_start + 48
9  libsystem_pthread.dylib        0x214007cf4 thread_start + 4

firebase/quickstart-ios#13. WebThread
0  libsystem_kernel.dylib         0x213f73ea4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x213f7337c mach_msg + 72
2  CoreFoundation                 0x214379ad8 __CFRunLoopServiceMachPort + 236
3  CoreFoundation                 0x214374974 __CFRunLoopRun + 1396
4  CoreFoundation                 0x2143740e0 CFRunLoopRunSpecific + 436
5  WebCore                        0x21d1e53e8 RunWebThread(void*) + 592
6  libsystem_pthread.dylib        0x21400425c _pthread_body + 128
7  libsystem_pthread.dylib        0x2140041bc _pthread_start + 48
8  libsystem_pthread.dylib        0x214007cf4 thread_start + 4

firebase/quickstart-ios#14. com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x213f73ea4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x213f7337c mach_msg + 72
2  CoreFoundation                 0x214379ad8 __CFRunLoopServiceMachPort + 236
3  CoreFoundation                 0x214374974 __CFRunLoopRun + 1396
4  CoreFoundation                 0x2143740e0 CFRunLoopRunSpecific + 436
5  CFNetwork                      0x21499700c -[__CoreSchedulingSetRunnable runForever] + 212
6  Foundation                     0x214e9d23c __NSThread__start__ + 1040
7  libsystem_pthread.dylib        0x21400425c _pthread_body + 128
8  libsystem_pthread.dylib        0x2140041bc _pthread_start + 48
9  libsystem_pthread.dylib        0x214007cf4 thread_start + 4

firebase/quickstart-ios#15. Thread
0  libsystem_kernel.dylib         0x213f73ef8 semaphore_timedwait_trap + 8
1  libdispatch.dylib              0x213df0c4c _dispatch_sema4_timedwait$VARIANT$armv81 + 64
2  libdispatch.dylib              0x213df159c _dispatch_semaphore_wait_slow + 72
3  libdispatch.dylib              0x213e048dc _dispatch_worker_thread + 344
4  libsystem_pthread.dylib        0x21400425c _pthread_body + 128
5  libsystem_pthread.dylib        0x2140041bc _pthread_start + 48
6  libsystem_pthread.dylib        0x214007cf4 thread_start + 4

firebase/quickstart-ios#16. Thread
0  libsystem_kernel.dylib         0x213f73ef8 semaphore_timedwait_trap + 8
1  libdispatch.dylib              0x213df0c4c _dispatch_sema4_timedwait$VARIANT$armv81 + 64
2  libdispatch.dylib              0x213df159c _dispatch_semaphore_wait_slow + 72
3  libdispatch.dylib              0x213e048dc _dispatch_worker_thread + 344
4  libsystem_pthread.dylib        0x21400425c _pthread_body + 128
5  libsystem_pthread.dylib        0x2140041bc _pthread_start + 48
6  libsystem_pthread.dylib        0x214007cf4 thread_start + 4

firebase/quickstart-ios#17. AVAudioSession Notify Thread
0  libsystem_kernel.dylib         0x213f73ea4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x213f7337c mach_msg + 72
2  CoreFoundation                 0x214379ad8 __CFRunLoopServiceMachPort + 236
3  CoreFoundation                 0x214374974 __CFRunLoopRun + 1396
4  CoreFoundation                 0x2143740e0 CFRunLoopRunSpecific + 436
5  AVFAudio                       0x21a38860c GenericRunLoopThread::Entry(void*) + 164
6  AVFAudio                       0x21a3b4768 CAPThread::Entry(CAPThread*) + 88
7  libsystem_pthread.dylib        0x21400425c _pthread_body + 128
8  libsystem_pthread.dylib        0x2140041bc _pthread_start + 48
9  libsystem_pthread.dylib        0x214007cf4 thread_start + 4

@morganchen12
Copy link

I'm unable to reproduce this issue on Firebase 6.4.0. Can you try updating and seeing if the crash is fixed?

@aaprokofyev
Copy link

Tested today on the latest Firebase available (6.5.0). I see with profiler that there is some memory leak, which consumes memory up to 9.88 Gb and then crashes. Tested on iphone 6 iOS10.3.2. Takes about 13 minutes to reproduce. Starting from minute 8 the screen is like slideshow already.

@ulukaya
Copy link
Collaborator

ulukaya commented Aug 1, 2019

Does your profiler show the leak is coming from the Firebase object? Trying to understand how to consume 10Gb from a single image on device text detection. If you were doing live camera, I could've seen images building up.

@aaprokofyev
Copy link

I can't say exactly where the leak is. I'm not in touch with iOS development, so i've just run this sample. See the screenshot attached from the profiler. It is default xCode Instruments.

It is not a single image, I selected 'live' recognition. So processed frames from camera preview 'on fly' during 13 minutes until memory reached critical value.

Screenshot 2019-08-02 at 09 44 50

@aaprokofyev
Copy link

Probably I've selected the wrong thread. So let me know if I need to create another issue.

@ulukaya ulukaya transferred this issue from firebase/quickstart-ios Jun 30, 2020
@ulukaya ulukaya transferred this issue from another repository Jun 30, 2020
@calren
Copy link
Collaborator

calren commented Aug 6, 2020

Hey @enriquemgz, we've made a number of improvements to our samples with the newest ml kit release, and we believe this should be fixed now. If you're still seeing the issue, please do let us know!

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

5 participants