Bug 35116 - ModelIO.MDLObject.GetBoundingBox always crashes
Summary: ModelIO.MDLObject.GetBoundingBox always crashes
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.TVOS.dll ()
Version: XI 9.3 (xcode 7.1 previews)
Hardware: PC Mac OS
: --- blocker
Target Milestone: C6SR1
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-10-20 18:27 UTC by Frank A. Krueger
Modified: 2015-10-29 03:22 UTC (History)
4 users (show)

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


Attachments
Project that repros the bug (14.30 KB, application/zip)
2015-10-20 18:27 UTC, Frank A. Krueger
Details


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:
VERIFIED FIXED

Description Frank A. Krueger 2015-10-20 18:27:47 UTC
Created attachment 13468 [details]
Project that repros the bug

Whenever I call ModelIO.MDLObject.GetBoundingBox, the app crashes. As in, this code:

	var obj = MDLObject.FromNode (SCNNode.FromGeometry (SCNBox.Create (1, 1, 1, 0)));
	var bb = obj.GetBoundingBox (0);


Repro project attached.


MonoTouch: Could not install sigaction override, unexpected sigaction implementation.
2015-10-20 15:23:11.705 MDLBBBug[95367:25717738] Xamarin.TVOS: Socket error while connecting to IDE on 127.0.0.1:60742: Connection refused
2015-10-20 15:23:12.273 MDLBBBug[95367:25717726] critical: Stacktrace:

2015-10-20 15:23:12.273 MDLBBBug[95367:25717726] critical:   at <unknown> <0xffffffff>
2015-10-20 15:23:12.275 MDLBBBug[95367:25717726] critical:   at (wrapper managed-to-native) ObjCRuntime.Messaging.MDLAxisAlignedBoundingBox_objc_msgSend_stret_Double (ModelIO.MDLAxisAlignedBoundingBox&,intptr,intptr,double) <IL 0x0002a, 0xffffffff>
2015-10-20 15:23:12.277 MDLBBBug[95367:25717726] critical:   at ModelIO.MDLObject.GetBoundingBox (double) [0x00064] in /Users/builder/data/lanes/2128/155d35b9/source/maccore/src/build/tvos/tvos/ModelIO/MDLObject.g.cs:103
2015-10-20 15:23:12.277 MDLBBBug[95367:25717726] critical:   at MDLBBBug.AppDelegate.FinishedLaunching (UIKit.UIApplication,Foundation.NSDictionary) [0x00033] in /Users/fak/Dropbox/Projects/MDLBBBug/MDLBBBug/AppDelegate.cs:26
2015-10-20 15:23:12.277 MDLBBBug[95367:25717726] critical:   at (wrapper runtime-invoke) <Module>.runtime_invoke_bool__this___object_object (object,intptr,intptr,intptr) <IL 0x00070, 0xffffffff>
2015-10-20 15:23:12.277 MDLBBBug[95367:25717726] critical:   at <unknown> <0xffffffff>
2015-10-20 15:23:12.277 MDLBBBug[95367:25717726] critical:   at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <IL 0x000ad, 0xffffffff>
2015-10-20 15:23:12.278 MDLBBBug[95367:25717726] critical:   at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Users/builder/data/lanes/2128/155d35b9/source/maccore/src/UIKit/UIApplication.cs:74
2015-10-20 15:23:12.279 MDLBBBug[95367:25717726] critical:   at UIKit.UIApplication.Main (string[],string,string) [0x0001c] in /Users/builder/data/lanes/2128/155d35b9/source/maccore/src/UIKit/UIApplication.cs:57
2015-10-20 15:23:12.279 MDLBBBug[95367:25717726] critical:   at MDLBBBug.Application.Main (string[]) [0x00008] in /Users/fak/Dropbox/Projects/MDLBBBug/MDLBBBug/Main.cs:12
2015-10-20 15:23:12.279 MDLBBBug[95367:25717726] critical:   at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00058, 0xffffffff>
2015-10-20 15:23:12.279 MDLBBBug[95367:25717726] critical: 
Native stacktrace:

2015-10-20 15:23:12.287 MDLBBBug[95367:25717726] critical: 	0   libmonosgen-2.0.dylib               0x00000001122dce3d mono_handle_native_sigsegv + 253
2015-10-20 15:23:12.287 MDLBBBug[95367:25717726] critical: 	1   libmonosgen-2.0.dylib               0x0000000112243ac3 mono_sigsegv_signal_handler + 131
2015-10-20 15:23:12.288 MDLBBBug[95367:25717726] critical: 	2   libsystem_platform.dylib            0x0000000113a6bf1a _sigtramp + 26
2015-10-20 15:23:12.288 MDLBBBug[95367:25717726] critical: 	3   ???                                 0x000000010c9d8338 0x0 + 4506616632
2015-10-20 15:23:12.288 MDLBBBug[95367:25717726] critical: 	4   ModelIO                             0x000000010ff1ff46 copyIndicesToBuffer32 + 14578
2015-10-20 15:23:12.288 MDLBBBug[95367:25717726] critical: 	5   ???                                 0x0000000123df514a 0x0 + 4896805194
2015-10-20 15:23:12.288 MDLBBBug[95367:25717726] critical: 	6   libmonosgen-2.0.dylib               0x00000001122461a7 mono_jit_runtime_invoke + 1703
2015-10-20 15:23:12.288 MDLBBBug[95367:25717726] critical: 	7   libmonosgen-2.0.dylib               0x00000001123ebcbe mono_runtime_invoke + 110
2015-10-20 15:23:12.288 MDLBBBug[95367:25717726] critical: 	8   MDLBBBug                            0x000000010c8b805a xamarin_invoke_trampoline + 5098
2015-10-20 15:23:12.288 MDLBBBug[95367:25717726] critical: 	9   MDLBBBug                            0x000000010c8bd731 xamarin_arch_trampoline + 193
2015-10-20 15:23:12.289 MDLBBBug[95367:25717726] critical: 	10  MDLBBBug                            0x000000010c8bd5ca xamarin_x86_64_common_trampoline + 110
2015-10-20 15:23:12.289 MDLBBBug[95367:25717726] critical: 	11  UIKit                               0x000000010de18e05 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 272
2015-10-20 15:23:12.289 MDLBBBug[95367:25717726] critical: 	12  UIKit                               0x000000010de19fab -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3415
2015-10-20 15:23:12.289 MDLBBBug[95367:25717726] critical: 	13  UIKit                               0x000000010de208a3 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1750
2015-10-20 15:23:12.289 MDLBBBug[95367:25717726] critical: 	14  UIKit                               0x000000010de1da83 -[UIApplication workspaceDidEndTransaction:] + 188
2015-10-20 15:23:12.289 MDLBBBug[95367:25717726] critical: 	15  FrontBoardServices                  0x00000001145c7784 -[FBSSerialQueue _performNext] + 192
2015-10-20 15:23:12.289 MDLBBBug[95367:25717726] critical: 	16  FrontBoardServices                  0x00000001145c7af2 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
2015-10-20 15:23:12.289 MDLBBBug[95367:25717726] critical: 	17  CoreFoundation                      0x0000000112721181 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
2015-10-20 15:23:12.289 MDLBBBug[95367:25717726] critical: 	18  CoreFoundation                      0x00000001127170ac __CFRunLoopDoSources0 + 556
2015-10-20 15:23:12.290 MDLBBBug[95367:25717726] critical: 	19  CoreFoundation                      0x0000000112716563 __CFRunLoopRun + 867
2015-10-20 15:23:12.290 MDLBBBug[95367:25717726] critical: 	20  CoreFoundation                      0x0000000112715f78 CFRunLoopRunSpecific + 488
2015-10-20 15:23:12.290 MDLBBBug[95367:25717726] critical: 	21  UIKit                               0x000000010de1d3d5 -[UIApplication _run] + 402
2015-10-20 15:23:12.290 MDLBBBug[95367:25717726] critical: 	22  UIKit                               0x000000010de221ed UIApplicationMain + 171
2015-10-20 15:23:12.290 MDLBBBug[95367:25717726] critical: 	23  ???                                 0x0000000123decbbc 0x0 + 4896771004
2015-10-20 15:23:12.290 MDLBBBug[95367:25717726] critical: 	24  ???                                 0x0000000123deca19 0x0 + 4896770585
2015-10-20 15:23:12.290 MDLBBBug[95367:25717726] critical: 
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=== Xamarin Studio ===

Version 5.10 (build 913)
Installation UUID: e51e2705-c52a-4ae8-aa07-c481d6ab8a7a
Runtime:
	Mono 4.2.1 (explicit/804ddbc)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010060

=== Xamarin.Profiler ===

Version: 0.22.0.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 7.1 (9077)
Build 7B85

=== Xamarin.iOS ===

Version: 9.3.0.243 (Enterprise Edition)
Hash: 155d35b
Branch: master
Build date: 2015-09-30 18:26:52-0400

=== Xamarin.Android ===

Version: 6.0.0.8 (Enterprise Edition)
Android SDK: /Users/fak/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)

SDK Tools Version: 23.0.5
SDK Platform Tools Version: 21
SDK Build Tools Version: 20

Java SDK: /usr
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

=== Xamarin Android Player ===

Version: 0.3.7
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.4.0.79 (Enterprise Edition)

=== Build Information ===

Release ID: 510000913
Git revision: d437b9453df0bd08103df76b60a2bb95c3a864a6
Build date: 2015-09-30 16:56:55-04
Xamarin addins: 2c839fd62864efbeb8d02091e4ba3dfde24a099a
Build lane: monodevelop-lion-xcode7.1

=== Operating System ===

Mac OS X 10.10.5
Darwin lepton.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-10-21 10:39:27 UTC
Fixed.

maccore/master: 8554025e8ab200eb78520a61507e39a07fb109b8
Comment 2 Rolf Bjarne Kvinge [MSFT] 2015-10-21 10:41:26 UTC
QA: the fix contains a unit test.
Comment 4 Shruti 2015-10-27 05:38:08 UTC
*****************************************************************
Reproduce Status:
*****************************************************************
I am not able to open attached project here. So I have created an iOS Project and implemented code to the FinishedLaunching method :
 var obj = MDLObject.FromNode (SCNNode.FromGeometry (SCNBox.Create (1, 1, 1,
0)));
    var bb = obj.GetBoundingBox (0); 
and able to reproduce this issue on Alpha monotouch-9.2.0.84_b5396c29ec2b327de2dd542c8d57fd7312368ba7 and monotouch-9.3.1.59. Got fatal error while launching app on device.
Screencast: http://www.screencast.com/t/0bi5ZOOerNO

*****************************************************************
Verify Status:
*****************************************************************
This issue is working fine on Master monotouch-9.3.0.187_934de547e78475710efdf7491e247e842f704238 . Application is getting launch successfully on device.
Screencast: http://www.screencast.com/t/wAX34O52zC
Environment Info: https://gist.github.com/shrutis360/7a063b92fc6b8911f5e3

I will close this issue when we will get fix of this issue in C6 builds
Comment 6 Shruti 2015-10-29 03:22:00 UTC
I have checked this issue with latest C6 XI monotouch-9.2.1.21_9ce9e8b98427671bb17a5c5ba2263f15b28216bc and able to deploy and launch the application on devcie successfully using following code snippet:
    var obj = MDLObject.FromNode (SCNNode.FromGeometry (SCNBox.Create (1, 1, 1,
0)));
    var bb = obj.GetBoundingBox (0);
Screencast: http://www.screencast.com/t/UKh8ldz8KeV
Environment Info: https://gist.github.com/shrutis360/b8069c5000991d057e65

Hence, Closing this issue.