Log in or register to post comments

Hangs and crashes on splash screen when disconnected, works with USB in Xcode

October 19, 2011 - 3:35pm #1

So, my app has a fairly complex model duplicated 3 times attached to 3 different markers (unparented for now). It runs when USB connected to Xcode, but when disconnected, it crashes at splash screen - probably because it is auto-killed by iOS for taking too long. This issue occurs on both iOS 4.3 on iPhone 4 and iOS 5 on iPhone 4S

I am using Unity 3.4.0f5

Not sure if this helps but here are some iOS Unity extension warnings in Xcode.

Here are some warnings AppController.mm in Xcode:

Enumeration values 'kScreenOrientationUnknown', 'autorotation', and 'kScreenOrientationCount' not handled in switch

UIInterfaceOrientation
ConvertToIosScreenOrientation(ScreenOrientation orient)
{
	switch( orient )
	{
		case portrait:				return UIInterfaceOrientationPortrait;
		case portraitUpsideDown:	return UIInterfaceOrientationPortraitUpsideDown;
		// landscape left/right have switched values in device/screen orientation
		// though unity docs are adjusted with device orientation values, so swap here
		case landscapeLeft:			return UIInterfaceOrientationLandscapeRight;
		case landscapeRight:		return UIInterfaceOrientationLandscapeLeft;
	}

	return UIInterfaceOrientationPortrait;
}

Classes/AppController.mm:891:18:{891:18-891:29}: warning: incompatible pointer types passing 'UIView *' to parameter of type 'EAGLView *' [-Wincompatible-pointer-types,3]

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
	UnitySetScreenOrientation(_curOrientation);
	ScreenOrientation prevOrientation = ConvertToUnityScreenOrientation(fromInterfaceOrientation, 0);

	if( OrientationWillChangeSurfaceExtents(prevOrientation, _curOrientation) || _allowOrientationDetection )
	{
		if( _glesContextCreated )
		{
			DestroySurface(&_surface);
			CreateSurface([self view], &_surface);
		}
	}

	UnitySetAllowOrientationDetection(false);
}

Re: Hangs and crashes on splash screen when disconnected, works

October 21, 2011 - 2:59am #5

Hi Ina,

It may be to do with your rotation manipulation at startup, although if that's 'standard' Unity code generation I'd doubt it (try disabling all auto-rotation to see), but another possibility is the app is taking too long to start up?

iOS requires startup to complete within 19 seconds and if it doesn't you'll get a set of log messages thus:

: ImageTargets failed to launch in time
: Forcing crash report of ImageTargets[808]...
: Finished crash reporting.
: Application 'ImageTargets' exited abnormally with signal 9: Killed: 9

Do you see any of these messages in the log?

If so try loading a simpler scene then switching to your complex scene.

Re: Hangs and crashes on splash screen when disconnected, works

October 20, 2011 - 9:24pm #4

Are you using autorotation? QCAR doesn't currently support this.

- Kim

Re: Hangs and crashes on splash screen when disconnected, works

October 20, 2011 - 9:14pm #3

Update: It looks like this is not a complex model issue, as the Android QCAR works but the iOS QCAR does not... Not sure what's wrong or if the above warnings shed any light..

tested to hang/crash on splash screen:
iOS 4.3 on iPhone 4 and iOS 5 on iPhone 4S

but works on Android HTC Flyer.

latest unity, latest xcode

Re: Hangs and crashes on splash screen when disconnected, works

October 19, 2011 - 7:45pm #2

See my response in this thread:

http://ar.qualcomm.at/node/2001049

It shouldn't be necessary to duplicate your model.

- Kim

Log in or register to post comments