Log in or register to post comments

{HELP} UnityAppController applicationDidBecomeActive

November 19, 2014 - 8:47am #1

Hi,

Can anyone help me, i am stuck with this error in main.mm. I am using  Unity Extension 3.0.9 / Unity 4.5.5 and Xcode 6.1

On the line 29 in main.mm Thread 1: signal SIGABRT

 

#import <UIKit/UIKit.h>

#include <time.h>
#include "RegisterClasses.h"
#include "RegisterMonoModules.h"

// Hack to work around iOS SDK 4.3 linker problem
// we need at least one __TEXT, __const section entry in main application .o files
// to get this section emitted at right time and so avoid LC_ENCRYPTION_INFO size miscalculation
static const int constsection = 0;

void UnityInitTrampoline();

// WARNING: this MUST be c decl (NSString ctor will be called after +load, so we cant really change its value)
const char* AppControllerClassName = "UnityAppController";


int main(int argc, char* argv[])
{
	NSAutoreleasePool* pool = [NSAutoreleasePool new];

	UnityInitTrampoline();
	if(!UnityParseCommandLine(argc, argv))
		return -1;

	RegisterMonoModules();
	NSLog(@"-> registered mono modules %p\n", &constsection);

	UIApplicationMain(argc, argv, nil, [NSString stringWithUTF8String:AppControllerClassName]);

	[pool release];
	return 0;
}


#if TARGET_IPHONE_SIMULATOR
extern "C" clock_t clock$UNIX2003(void) { return clock(); }
#endif // TARGET_IPHONE_SIMULATOR

 

2014-11-19 18:13:27.173 demo1[4391:60b] -> registered mono modules 0x183de90
-> applicationDidFinishLaunching()
Mono path[0] = '/var/mobile/Applications/7DCE72BF-1D0A-432E-A9F3-5D8D73242DF8/demo1.app/Data/Managed'
Mono config path = '/var/mobile/Applications/7DCE72BF-1D0A-432E-A9F3-5D8D73242DF8/demo1.app/Data/Managed'
-> applicationDidBecomeActive()
2014-11-19 18:13:27.911 demo1[4391:60b] -[__NSCFArray UTF8String]: unrecognized selector sent to instance 0x14e85420
2014-11-19 18:13:28.344 demo1[4391:60b] Uncaught exception: NSInvalidArgumentException: -[__NSCFArray UTF8String]: unrecognized selector sent to instance 0x14e85420
(
	0   CoreFoundation                      0x2dae8f9b <redacted> + 154
	1   libobjc.A.dylib                     0x38363ccf objc_exception_throw + 38
	2   CoreFoundation                      0x2daec917 <redacted> + 202
	3   CoreFoundation                      0x2daeb203 <redacted> + 706
	4   CoreFoundation                      0x2da3a768 _CF_forwarding_prep_0 + 24
	5   demo1                               0x00b07f24 -[UnityAppController applicationDidBecomeActive:] + 348
	6   UIKit                               0x303846bb <redacted> + 374
	7   UIKit                               0x3036f6e1 <redacted> + 1088
	8   UIKit                               0x3030b6e9 <redacted> + 3540
	9   UIKit                               0x3030a851 <redacted> + 72
	10  UIKit                               0x3036eca9 <redacted> + 616
	11  GraphicsServices                    0x32977aed <redacted> + 608
	12  GraphicsServices                    0x329776d7 <redacted> + 34
	13  CoreFoundation                      0x2dab3a67 <redacted> + 34
	14  CoreFoundation                      0x2dab3a03 <redacted> + 346
	15  CoreFoundation                      0x2dab21d7 <redacted> + 1398
	16  CoreFoundation                      0x2da1cebf CFRunLoopRunSpecific + 522
	17  CoreFoundation                      0x2da1cca3 CFRunLoopRunInMode + 106
	18  UIKit                               0x3036ded1 <redacted> + 760
	19  UIKit                               0x3036914d UIApplicationMain + 1136
	20  demo1                               0x0003aa2c main + 288
	21  demo1                               0x0003a908 start + 40
)
2014-11-19 18:13:28.348 demo1[4391:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFArray UTF8String]: unrecognized selector sent to instance 0x14e85420'
*** First throw call stack:
(0x2dae8f83 0x38363ccf 0x2daec917 0x2daeb203 0x2da3a768 0xb07f24 0x303846bb 0x3036f6e1 0x3030b6e9 0x3030a851 0x3036eca9 0x32977aed 0x329776d7 0x2dab3a67 0x2dab3a03 0x2dab21d7 0x2da1cebf 0x2da1cca3 0x3036ded1 0x3036914d 0x3aa2c 0x3a908)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

{HELP} UnityAppController applicationDidBecomeActive

December 30, 2014 - 12:10am #6

Hello All,

I have recenly upload my AR created with Vuforia on Apple iOS sotre and it's rejected. The isuue is when the app is installing in device which has has not installed the  app and launch the app , app is crashed. This happens only first time. After that it's working fine.

I got an crash log from apple whchi can be found here : https://www.dropbox.com/s/ir46v288wz1nr2h/watchapp_2014-12-29-162454_UXiPad-Air-2-G.crash?dl=0

Thanks

Yashesh

 

{HELP} UnityAppController applicationDidBecomeActive

December 11, 2014 - 12:22pm #5
Hi, DA Europa
 
Good to know that it fix your problem.

{HELP} UnityAppController applicationDidBecomeActive

November 28, 2014 - 7:24am #4

I am also having this same problem

 

EDITED:

Axfley i think you did the same as me, i also but the string inside an array, i have now formated it like so

<key>UIInterfaceOrientation</key

<string>UIInterfaceOrinentationPortrait</string>

 

This solved my problem :)

{HELP} UnityAppController applicationDidBecomeActive

November 21, 2014 - 5:06am #3
Hi, Peter
 
Big thanks for your reply. Your post help me solve my error. There was only my mistake, because of me bad english language knowledge.
 
I translate wrong this post 
 
and in my Info.plist i put UIInterfaceOrientationPortrait string in array, that was my problem. 
 
It looks like that:
 
<key>UIInterfaceOrientation</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
 
Correct way was this:
 
<key>UIInterfaceOrientation</key>
<string>UIInterfaceOrientationPortrait</string>
 
Thank you for help.
 
Best regards,
Deniss

{HELP} UnityAppController applicationDidBecomeActive

November 19, 2014 - 6:47pm #2

Hi,

The line 29 is just because it crashed on the main thread.

The exception there is:

2014-11-19 18:13:27.911 demo1[4391:60b] -[__NSCFArray UTF8String]: unrecognized selector sent to instance 0x14e85420
2014-11-19 18:13:28.344 demo1[4391:60b] Uncaught exception: NSInvalidArgumentException: -[__NSCFArray UTF8String]: unrecognized selector sent to instance 0x14e85420
 

Which means it is expecting a string but it was passed a URL.

My mega guess is in your QCARInit or QCARSetOrientation earlier (in application didFinishLaunchingWithOptions:?) it's been passed incorrectly an array instead of the expected string.

You can verify this by turning on break on all exceptions and then you'll see which variable it is accessing:

  • Tap on breakpoint tab (7th tab in Xcode 6  which is |> )
  • Press + button and add exception breakpoint
  • By default it will be for all exceptions.
  • Re-run the app.

Good luck!

Peter

Log in or register to post comments