BarcodeScanner icon indicating copy to clipboard operation
BarcodeScanner copied to clipboard

iOS App stops responding after three to five successful barcode readings

Open dristea opened this issue 11 years ago • 2 comments

I just implemented BarcodeScanner with Cordova - iOS 4.2.0

  1. I am getting many deprecation warnings.
  2. Several output warnings regarding the AVCaptureVideoPreviewLayer.

Is there a quick fix for this? Should I downgrade cordova?

  1. Deprecation Warnings below: /Users/daniellristea/Documents/iOS Apps/scanner/platforms/ios/BarCodeReader/Plugins/com.phonegap.plugins.barcodescanner/CDVBarcodeScanner.mm:178:28: 'toSuccessCallbackString:' is deprecated: Deprecated in Cordova 3.6. Use the CDVCommandDelegate method sendPluginResult:callbackId instead. This will be removed in 4.0.0 /Users/daniellristea/Documents/iOS Apps/scanner/platforms/ios/CordovaLib/Classes/CDVPluginResult.h:67:1: 'toSuccessCallbackString:' has been explicitly marked deprecated here /Users/daniellristea/Documents/iOS Apps/scanner/platforms/ios/BarCodeReader/Plugins/com.phonegap.plugins.barcodescanner/CDVBarcodeScanner.mm:180:15: 'writeJavascript:' is deprecated: Deprecated in Cordova 3.6. Use the CDVCommandDelegate equivalent of evalJs:. This will be removed in 4.0.0 /Users/daniellristea/Documents/iOS Apps/scanner/platforms/ios/BarCodeReader/Plugins/com.phonegap.plugins.barcodescanner/CDVBarcodeScanner.mm:191:28: 'toErrorCallbackString:' is deprecated: Deprecated in Cordova 3.6. Use the CDVCommandDelegate method sendPluginResult:callbackId instead. This will be removed in 4.0.0 /Users/daniellristea/Documents/iOS Apps/scanner/platforms/ios/BarCodeReader/Plugins/com.phonegap.plugins.barcodescanner/CDVBarcodeScanner.mm:193:11: 'writeJavascript:' is deprecated: Deprecated in Cordova 3.6. Use the CDVCommandDelegate equivalent of evalJs:. This will be removed in 4.0.0 /Users/daniellristea/Documents/iOS Apps/scanner/platforms/ios/BarCodeReader/Plugins/com.phonegap.plugins.barcodescanner/CDVBarcodeScanner.mm:271:6: 'presentModalViewController:animated:' is deprecated: first deprecated in iOS 6.0 /Users/daniellristea/Documents/iOS Apps/scanner/platforms/ios/BarCodeReader/Plugins/com.phonegap.plugins.barcodescanner/CDVBarcodeScanner.mm:280:32: 'dismissModalViewControllerAnimated:' is deprecated: first deprecated in iOS 6.0 /Users/daniellristea/Documents/iOS Apps/scanner/platforms/ios/BarCodeReader/Plugins/com.phonegap.plugins.barcodescanner/CDVBarcodeScanner.mm:674:23: 'isOrientationSupported' is deprecated: first deprecated in iOS 6.0 /Users/daniellristea/Documents/iOS Apps/scanner/platforms/ios/BarCodeReader/Plugins/com.phonegap.plugins.barcodescanner/CDVBarcodeScanner.mm:675:23: 'setOrientation:' is deprecated: first deprecated in iOS 6.0 /Users/daniellristea/Documents/iOS Apps/scanner/platforms/ios/BarCodeReader/Plugins/com.phonegap.plugins.barcodescanner/CDVBarcodeScanner.mm:687:33: 'orientation' is deprecated: first deprecated in iOS 6.0 /Users/daniellristea/Documents/iOS Apps/scanner/platforms/ios/BarCodeReader/Plugins/com.phonegap.plugins.barcodescanner/CDVBarcodeScanner.mm:897:33: 'orientation' is deprecated: first deprecated in iOS 6.0 /Users/daniellristea/Documents/iOS Apps/scanner/platforms/ios/BarCodeReader/Plugins/com.phonegap.plugins.barcodescanner/CDVBarcodeScanner.mm:548:121: Implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' /Users/daniellristea/Documents/iOS Apps/scanner/platforms/ios/BarCodeReader/Plugins/com.phonegap.plugins.barcodescanner/CDVBarcodeScanner.mm:590:38: Implicit conversion loses integer precision: 'unsigned long' to 'int'
  2. Full Output including errors:

2015-01-24 22:42:21.253 BarCodeReader[219:60b] Apache Cordova native platform version 3.7.0 is starting. 2015-01-24 22:42:21.258 BarCodeReader[219:60b] Multi-tasking -> Device: YES, App: YES 2015-01-24 22:42:21.265 BarCodeReader[219:60b] Unlimited access to network resources 2015-01-24 22:42:21.281 BarCodeReader[219:60b] Fix applied for database locations?: YES 2015-01-24 22:42:21.283 BarCodeReader[219:60b]

Started backup to iCloud! Please be careful. Your application might be rejected by Apple if you store too much data. For more information please read "iOS Data Storage Guidelines" at: https://developer.apple.com/icloud/documentation/data-storage/ To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file 2015-01-24 22:42:22.066 BarCodeReader[219:60b] Resetting plugins due to page load. 2015-01-24 22:42:22.610 BarCodeReader[219:60b] Finished load of: file:///var/mobile/Applications/99FBB0C7-F03B-408E-9C7E-78DEEF7FC304/BarCodeReader.app/www/index.html 2015-01-24 22:42:42.362 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x14660d20> isOrientationSupported] is deprecated. Please use AVCaptureConnection's -isVideoOrientationSupported 2015-01-24 22:42:42.364 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x14660d20> setOrientation:] is deprecated. Please use AVCaptureConnection's -setVideoOrientation: 2015-01-24 22:42:42.374 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x14660d20> setOrientation:] is deprecated. Please use AVCaptureConnection's -setVideoOrientation: 2015-01-24 22:42:45.977 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x145ebb00> isOrientationSupported] is deprecated. Please use AVCaptureConnection's -isVideoOrientationSupported 2015-01-24 22:42:45.978 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x145ebb00> setOrientation:] is deprecated. Please use AVCaptureConnection's -setVideoOrientation: 2015-01-24 22:42:45.989 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x145ebb00> setOrientation:] is deprecated. Please use AVCaptureConnection's -setVideoOrientation: 2015-01-24 22:42:52.204 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x145fa020> isOrientationSupported] is deprecated. Please use AVCaptureConnection's -isVideoOrientationSupported 2015-01-24 22:42:52.207 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x145fa020> setOrientation:] is deprecated. Please use AVCaptureConnection's -setVideoOrientation: 2015-01-24 22:42:52.217 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x145fa020> setOrientation:] is deprecated. Please use AVCaptureConnection's -setVideoOrientation: 2015-01-24 22:42:59.493 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x1463b370> isOrientationSupported] is deprecated. Please use AVCaptureConnection's -isVideoOrientationSupported 2015-01-24 22:42:59.496 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x1463b370> setOrientation:] is deprecated. Please use AVCaptureConnection's -setVideoOrientation: 2015-01-24 22:42:59.507 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x1463b370> setOrientation:] is deprecated. Please use AVCaptureConnection's -setVideoOrientation: 2015-01-24 22:43:02.764 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x1453ef10> isOrientationSupported] is deprecated. Please use AVCaptureConnection's -isVideoOrientationSupported 2015-01-24 22:43:02.766 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x1453ef10> setOrientation:] is deprecated. Please use AVCaptureConnection's -setVideoOrientation: 2015-01-24 22:43:02.776 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x1453ef10> setOrientation:] is deprecated. Please use AVCaptureConnection's -setVideoOrientation: 2015-01-24 22:43:07.735 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x19808850> isOrientationSupported] is deprecated. Please use AVCaptureConnection's -isVideoOrientationSupported 2015-01-24 22:43:07.736 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x19808850> setOrientation:] is deprecated. Please use AVCaptureConnection's -setVideoOrientation: 2015-01-24 22:43:07.748 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x19808850> setOrientation:] is deprecated. Please use AVCaptureConnection's -setVideoOrientation: 2015-01-24 22:43:29.659 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x1af89400> isOrientationSupported] is deprecated. Please use AVCaptureConnection's -isVideoOrientationSupported 2015-01-24 22:43:29.660 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x1af89400> setOrientation:] is deprecated. Please use AVCaptureConnection's -setVideoOrientation: 2015-01-24 22:43:29.668 BarCodeReader[219:60b] WARNING: -[<AVCaptureVideoPreviewLayer: 0x1af89400> setOrientation:] is deprecated. Please use AVCaptureConnection's -setVideoOrientation:

dristea avatar Jan 25 '15 13:01 dristea

Did you manage to find a solution to this? Although it isn't affecting my app but I'm a little worried about it.

xavianaxw avatar Jun 03 '15 03:06 xavianaxw

Its affecting our app too. Not exactly the same error but this one:

2015-11-13 09:09:03.540 TradeCore[1108:60b] Warning: Attempt to present <CDVbcsViewController: 0x15eb3d00> on <MainViewController: 0x15d59150> while a presentation is in progress!
2015-11-13 09:09:23.959 TradeCore[1108:60b] Warning: Attempt to present <CDVbcsViewController: 0x15ec8700> on <MainViewController: 0x15d59150> whose view is not in the window hierarchy!
2015-11-13 09:09:39.410 TradeCore[1108:60b] Warning: Attempt to dismiss from view controller <MainViewController: 0x15d59150> while a presentation or dismiss is in progress!
2015-11-13 09:09:39.411 TradeCore[1108:60b] Warning: Attempt to dismiss from view controller <MainViewController: 0x15d59150> while a presentation or dismiss is in progress!
2015-11-13 09:09:46.170 TradeCore[1108:60b] Received memory warning.
2015-11-13 09:09:46.270 TradeCore[1108:60b] Warning: Attempt to present <CDVbcsViewController: 0x15ec8cc0> on <MainViewController: 0x15d59150> while a presentation is in progress!
2015-11-13 09:09:55.297 TradeCore[1108:60b] Received memory warning.
2015-11-13 09:09:55.364 TradeCore[1108:60b] Warning: Attempt to present <CDVbcsViewController: 0x15deca00> on <MainViewController: 0x15d59150> whose view is not in the window hierarchy!
2015-11-13 09:11:04.008 TradeCore[1108:60b] Received memory warning.
2015-11-13 09:11:05.023 TradeCore[1108:60b] Received memory warning.
2015-11-13 09:11:05.115 TradeCore[1108:60b] Warning: Attempt to present <CDVbcsViewController: 0x15dc1b70> on <MainViewController: 0x15d59150> whose view is not in the window hierarchy!
2015-11-13 09:12:10.274 TradeCore[1108:60b] Warning: Attempt to present <CDVbcsViewController: 0x15e88a00> on <MainViewController: 0x15d59150> while a presentation is in progress!
2015-11-13 09:12:21.331 TradeCore[1108:60b] Warning: Attempt to dismiss from view controller <MainViewController: 0x15d59150> while a presentation or dismiss is in progress!
2015-11-13 09:12:21.332 TradeCore[1108:60b] Warning: Attempt to dismiss from view controller <MainViewController: 0x15d59150> while a presentation or dismiss is in progress!
2015-11-13 09:12:21.334 TradeCore[1108:60b] Warning: Attempt to dismiss from view controller <MainViewController: 0x15d59150> while a presentation or dismiss is in progress!
2015-11-13 09:13:03.808 TradeCore[1108:60b] Warning: Attempt to present <CDVbcsViewController: 0x15d19ef0> on <MainViewController: 0x15d59150> while a presentation is in progress!
2015-11-13 09:14:21.124 TradeCore[1108:60b] Warning: Attempt to present <CDVbcsViewController: 0x15ede9c0> on <MainViewController: 0x15d59150> whose view is not in the window hierarchy!

When opening camera, the image just freezes. The only thing to solve it is to switch to front-camera, which then returns a catch error, then back to rear camera, which scans the code, but the result is not, since it was returned by switching to front in the first place.

lordgreg avatar Nov 13 '15 08:11 lordgreg