Bug 9592 - RedLaser App crashes (SIGABRT error), upon calling PresentViewController(overlayController.ParentPicker, true)
Summary: RedLaser App crashes (SIGABRT error), upon calling PresentViewController(over...
Status: RESOLVED UPSTREAM
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 6.1.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-01-15 19:43 UTC by Has
Modified: 2013-01-16 06:06 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED UPSTREAM

Description Has 2013-01-15 19:43:11 UTC
I am Using the RedLaser sample code provided on MonoTouch binding on GitHub, to create a barcode scanning app. 
The app works fine on the Simulator but when I deploy to a real device, it crashes upon attempting to turn ON the camera and present the overlayController.ParentPicker. 

I can see that all have proper values, and the app starts fine and it goes to the scan screen fine, but it lasts 1 sec before crashing. 

The stack trace is below, and I am using MonoTouch 6.0.8, MonoDevelop 3.0.6, XCode 4.5.2, and RedLaser 3.4.0
I am deploying to an iPhone Device that is 3GS and running iOS 6.0

Any help would be highly appreciated. 
Thanks


if (overlayController == null)
			{
				overlayController = new BarcodeScanModalController { ModalTransitionStyle = UIModalTransitionStyle.FlipHorizontal};
			}

			if (overlayController.ParentPicker == null)
			{
				BarcodePickerController picker = new BarcodePickerController ();
				picker.Overlay = overlayController;
				picker.Delegate = new BarcodePickerDelegate (this);
				picker.Orientation = UIImageOrientation.Up;
			}
			
			overlayController.ParentPicker.ScanUPCE = true;
			overlayController.ParentPicker.ScanEAN8 = false;// enableEAN8Switch.On;
			overlayController.ParentPicker.ScanEAN13 = false;// enableEAN13Switch.On;
			overlayController.ParentPicker.ScanCODE128 = false;//enableCode128Switch.On;
			overlayController.ParentPicker.ScanCODE39 = false;// enableCode39Switch.On;
			overlayController.ParentPicker.ScanITF = false;//enableITFSwitch.On;			
			overlayController.ParentPicker.ScanDATAMATRIX = false;
			UIApplication.SharedApplication.StatusBarHidden = true;

			overlayController.Done += delegate {
				DismissModalViewControllerAnimated (true);
			};

                        //#################################################################
                        // THIS IS THE LINE WHERE IT IS CRASHING 
			this.PresentModalViewController (overlayController.ParentPicker, true);
                        //#################################################################





libc++abi.dylib: terminate called throwing an exception

Native stacktrace:

	0   LeopardDeliveryiOS                  0x00358f31 _ZNSt11_Deque_baseImSaImEE15_M_create_nodesEPPmS3_ + 3048508
	1   LeopardDeliveryiOS                  0x0038b699 _ZNSt11_Deque_baseImSaImEE15_M_create_nodesEPPmS3_ + 3255204
	2   libsystem_c.dylib                   0x323bae93 _sigtramp + 42
	3   libsystem_c.dylib                   0x323b1123 pthread_kill + 58
	4   libsystem_c.dylib                   0x323ed973 abort + 94
	5   libc++abi.dylib                     0x36684d4f <redacted> + 74
	6   libc++abi.dylib                     0x36681ff9 <redacted> + 24
	7   libobjc.A.dylib                     0x3aef4a8f <redacted> + 170
	8   libc++abi.dylib                     0x3668207b <redacted> + 78
	9   libc++abi.dylib                     0x36682114 <redacted> + 19
	10  libc++abi.dylib                     0x36683513 __cxa_throw + 122
	11  LeopardDeliveryiOS                  0x0001899b _ZNSt6vectorIN5zxing5PointESaIS1_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS1_S3_EERKS1_ + 2246
	12  LeopardDeliveryiOS                  0x00018bb9 _ZNSt6vectorIN5zxing5PointESaIS1_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS1_S3_EERKS1_ + 2788
	13  LeopardDeliveryiOS                  0x00015859 _ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE16_M_insert_uniqueERKS2_ + 13444
	14  LeopardDeliveryiOS                  0x000458e5 _ZNSt6vectorIN5zxing3RefINS0_6qrcode13FinderPatternEEESaIS4_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS4_S6_EERKS4_ + 6608
	15  LeopardDeliveryiOS                  0x0004db33 _ZNSt6vectorIPN5zxing6qrcode3ECBESaIS3_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS3_S5_EERKS3_ + 842
	16  LeopardDeliveryiOS                  0x00053f19 _ZNSt8_Rb_treeINSt3tr110shared_ptrI15NLBarcodeResultEES3_St9_IdentityIS3_E23CompareNLBarcodeResultsSaIS3_EE9_M_insertEPSt18_Rb_tree_node_baseSA_RKS3_ + 12852
	17  LeopardDeliveryiOS                  0x000144c1 _ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE16_M_insert_uniqueERKS2_ + 8428
	18  LeopardDeliveryiOS                  0x0005aea3 FindBarcodesInUIImage + 4138
	19  LeopardDeliveryiOS                  0x00051931 _ZNSt8_Rb_treeINSt3tr110shared_ptrI15NLBarcodeResultEES3_St9_IdentityIS3_E23CompareNLBarcodeResultsSaIS3_EE9_M_insertEPSt18_Rb_tree_node_baseSA_RKS3_ + 3148
	20  libdispatch.dylib                   0x321db11f <redacted> + 10
	21  libdispatch.dylib                   0x321da99b <redacted> + 146
	22  libdispatch.dylib                   0x321da895 <redacted> + 36
	23  libdispatch.dylib                   0x321e9215 <redacted> + 192
	24  libdispatch.dylib                   0x321e93b9 <redacted> + 84
	25  libsystem_c.dylib                   0x32388a11 <redacted> + 360
	26  libsystem_c.dylib                   0x323888a4 start_wqthread + 8

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================
Comment 1 Has 2013-01-15 23:54:32 UTC
I have put the project where the issue is happening on Dropbox in case you need it to re-produce the issue. 

http://dl.dropbox.com/u/2531161/Leopard.Delivery.iOS.zip

I found that the issue is happening between ViewDidLoad() and ViewWillApear(). I cannot reach ViewWillAppear().
Comment 2 Rolf Bjarne Kvinge [MSFT] 2013-01-16 06:06:54 UTC
This seems to be an issue with the underlying RedLaser library when it's scanning QR codes.

If you disable QR code scanning (you have to do "overlayController.ParentPicker.ScanQRCODE = false;", it looks like it's enabled by default), scanning works fine.