You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/11/24 22:38:39 UTC

[GitHub] [cordova-plugin-camera] AndrWeisR opened a new issue #530: iOS: "UI API called on a background thread" and plugin is VERY slow to initialise

AndrWeisR opened a new issue #530: iOS: "UI API called on a background thread" and plugin is VERY slow to initialise
URL: https://github.com/apache/cordova-plugin-camera/issues/530
 
 
   # Bug Report
   
   ## Problem
   I'm using the plugin on iOS (Xcode 11) to pick an image from the gallery, in an Ionic 4 app. The first time the plugin runs, it is very, very slow (many seconds of delay) to open the image browser, and then also very slow to return a selected image. In Xcode, you see errors such as below when the plugin runs.
   
   ```
   Main Thread Checker: UI API called on a background thread: -[UIImagePickerController init]
   PID: 15188, TID: 1093309, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
   Backtrace:
   4   My Claim                            0x00000001026c1d98 +[CDVCameraPicker createFromPictureOptions:] + 112
   5   My Claim                            0x00000001026bbeb4 -[CDVCamera showCameraPicker:withOptions:] + 108
   6   My Claim                            0x00000001026bb370 __25-[CDVCamera takePicture:]_block_invoke + 1052
   7   libdispatch.dylib                   0x0000000103cd57fc _dispatch_call_block_and_release + 24
   8   libdispatch.dylib                   0x0000000103cd6bd8 _dispatch_client_callout + 16
   9   libdispatch.dylib                   0x0000000103cd92d4 _dispatch_queue_override_invoke + 872
   10  libdispatch.dylib                   0x0000000103ce8160 _dispatch_root_queue_drain + 376
   11  libdispatch.dylib                   0x0000000103ce8a88 _dispatch_worker_thread2 + 156
   12  libsystem_pthread.dylib             0x00000001adcb2f48 _pthread_wqthread + 212
   13  libsystem_pthread.dylib             0x00000001adcb5ad4 start_wqthread + 8
   
   ```
   
   The second time the plugin runs, it is all fast, as expected.
   
   See maybe this StackOverflow issue: https://stackoverflow.com/questions/58038810/xcode-10-main-thread-checker-cordova-camera-plugin
   
   ### What is expected to happen?
   Plugin should be much quicker when it runs the first time.
   
   
   ### What does actually happen?
   Plugin is very slow the 1st time it is used.
   
   
   ## Information
   
   
   
   
   ### Command or Code
   ```
   
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   
   
   ### Version information
   Plugin version 
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [X] I searched for existing GitHub issues
   - [X] I updated all Cordova tooling to most recent version
   - [X] I included all the necessary information above
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org