here is my problem:
I have a fully working app which runs quite perfect on my iPhone 4S running iOS 5.1.1.
Now Apple rejected my app because they found that the app crashed upon launch on iPhone 4 running iOS 5.1.1. What do I have to do to compile for the iPhone 4? I can't really test it because I only have an iPhone 4S to my disposal. I already did some tweaking in the project settings and added armv6. What else do I have to do?
I symbolicated the crashreport I got from apple as you can see below.
However, the problem remains the same. I can not figure out why my app does not run on an iPhone 4. I found one piece of code that is mentioned as #6 of the last exceptions.
It is located in ViewController.m. This is my code at the specified line:
self.player =[[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:url]];
Last Exception Backtrace:
0 CoreFoundation 0x3742088f __exceptionPreprocess + 163
1 libobjc.A.dylib 0x35125259 objc_exception_throw + 33
2 CoreFoundation 0x37420789 +[NSException raise:format:] + 1
3 CoreFoundation 0x374207ab +[NSException raise:format:] + 35
4 Foundation 0x37c0805f -[NSURL(NSURL) initFileURLWithPath:] + 79
5 Foundation 0x37c07ffb +[NSURL(NSURL) fileURLWithPath:] + 43
6 Podman 0x00021feb -[ViewController viewDidLoad] (ViewController.m:43)
7 UIKit 0x3112dc8b -[UIViewController view] + 167
8 UIKit 0x3112c461 -[UIWindow addRootViewControllerViewIfPossible] + 45
9 UIKit 0x3111ee87 -[UIWindow _setHidden:forced:] + 295
10 UIKit 0x3118f7d5 -[UIWindow makeKeyAndVisible] + 25
11 UIKit 0x3112ce6d -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1633
12 UIKit 0x311267dd -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 409
13 UIKit 0x310f4ac3 -[UIApplication handleEvent:withNewEvent:] + 1011
14 UIKit 0x310f4567 -[UIApplication sendEvent:] + 55
15 UIKit 0x310f3f3b _UIApplicationHandleEvent + 5827
16 GraphicsServices 0x33b3622b PurpleEventCallback + 883
17 CoreFoundation 0x373f4523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 39
18 CoreFoundation 0x373f44c5 __CFRunLoopDoSource1 + 141
19 CoreFoundation 0x373f3313 __CFRunLoopRun + 1371
20 CoreFoundation 0x373764a5 CFRunLoopRunSpecific + 301
21 CoreFoundation 0x3737636d CFRunLoopRunInMode + 105
22 UIKit 0x3112586b -[UIApplication _run] + 551
23 UIKit 0x31122cd5 UIApplicationMain + 1081
24 Podman 0x00021e7b main (main.m:16)
25 Podman 0x00021e30 start + 40
Related
Good morning,
I have released a new app on the AppStore. It worked fine on simulator, in different devices (both iPhone 4 and iPhone 5) and also worked using testflight.
Today, my app has been approved and it is in the AppStore. The problem is that it works perfectly on iphone 4 but not on iPhone 5.
The log is:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x333363e2 __exceptionPreprocess + 158
1 libobjc.A.dylib 0x3b03195e objc_exception_throw + 26
2 UIKit 0x354d161c +[UIStoryboard storyboardWithName:bundle:] + 436
3 Torero 0x00054008 -[AppDelegate application:didFinishLaunchingWithOptions:] (AppDelegate.m:27)
4 UIKit 0x351a5a9c -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 248
5 UIKit 0x351a5620 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1164
6 UIKit 0x3519d82e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 694
7 UIKit 0x35145d1a -[UIApplication handleEvent:withNewEvent:] + 1006
8 UIKit 0x351457a8 -[UIApplication sendEvent:] + 68
9 UIKit 0x351451ea _UIApplicationHandleEvent + 6194
10 GraphicsServices 0x36e5d5f2 _PurpleEventCallback + 586
11 GraphicsServices 0x36e5d222 PurpleEventCallback + 30
12 CoreFoundation 0x3330b3e2 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30
13 CoreFoundation 0x3330b386 __CFRunLoopDoSource1 + 134
14 CoreFoundation 0x3330a20a __CFRunLoopRun + 1378
15 CoreFoundation 0x3327d238 CFRunLoopRunSpecific + 352
16 CoreFoundation 0x3327d0c4 CFRunLoopRunInMode + 100
17 UIKit 0x3519c468 -[UIApplication _run] + 664
18 UIKit 0x351992b4 UIApplicationMain + 1116
19 Torero 0x00053e8e main (main.m:16)
20 Torero 0x00053e44 0x52000 + 7748
I think that the problem is in the selector of storyboard in application:didFinishLaunchingWithOptions so I have copied my old iphone 5 storyboard in a new one, changed name and uploaded a new version of my app.
Do you think it will work? Do you think should I do anything else?
Thank you very much
Works on simulator but not on device? Check capitalization of your file names. File names on device are case-sensitive, on simulator they are not.
I have an App that works perfectly on Debug (device and simulator) but once I archive it for AdHoc it just crashes.
Even with the Distribution provision files selected y clic play and works fine.
Now if I make an .ipa through AdHoc... it loads and crashes... 1seg... not even open.
I guess maybe something is wrong, but how on earth I can find the bug if there's any? I don't have any log message and it's a big big App.
Any idea?
Thanks.
By the way, this is what I get:
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x38af35d0 objc_msgSend + 16
1 CoreFoundation 0x39a0d4e8 CFURLCopyScheme + 144
2 CoreGraphics 0x318e6e28 CGDataProviderCreateWithURL + 44
3 CoreGraphics 0x318ffc5c CGPDFDocumentCreateWithURL + 4
4 READERSoft 0x000e10f0 CGPDFDocumentCreateX (CGPDFDocument.m:42)
5 READERSoft 0x000aeab4 -[ContentViewController viewDidLoad] (ContentViewController.m:56)
6 UIKit 0x332ce544 -[UIViewController loadViewIfRequired] + 360
7 UIKit 0x3330ed2c -[UIWindow addRootViewControllerViewIfPossible] + 60
8 UIKit 0x3330aac8 -[UIWindow _setHidden:forced:] + 360
9 UIKit 0x3334c19c -[UIWindow makeKeyAndVisible] + 56
10 READERSoft 0x000b618a -[AppDelegate application:didFinishLaunchingWithOptions:] (AppDelegate.m:44)
11 UIKit 0x3330fa74 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 248
12 UIKit 0x3330f5f8 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1164
13 UIKit 0x33307806 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 694
14 UIKit 0x332afcea -[UIApplication handleEvent:withNewEvent:] + 1006
15 UIKit 0x332af778 -[UIApplication sendEvent:] + 68
16 UIKit 0x332af1ba _UIApplicationHandleEvent + 6194
17 GraphicsServices 0x39b435f4 _PurpleEventCallback + 588
18 GraphicsServices 0x39b43222 PurpleEventCallback + 30
19 CoreFoundation 0x39a743e4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
20 CoreFoundation 0x39a74386 __CFRunLoopDoSource1 + 134
21 CoreFoundation 0x39a7320a __CFRunLoopRun + 1378
22 CoreFoundation 0x399e6238 CFRunLoopRunSpecific + 352
23 CoreFoundation 0x399e60c4 CFRunLoopRunInMode + 100
24 UIKit 0x33306440 -[UIApplication _run] + 664
25 UIKit 0x3330328c UIApplicationMain + 1116
26 READERSoft 0x000b5f5a main (main.m:9)
27 READERSoft 0x000ae89c start + 36
I have a Problem with my App. It is working perfectly on my iPhone 3GS, but now where I tried to test it on an iPhone 4, it is crashing while the Splashscreen is visible.
Here's the log:
2011-07-06 16:01:05.611 Apptest [294:607] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </var/mobile/Applications/0C371068-7E74-4C54-997C-80E3B0929411/Apptest.app> (loaded)' with name 'MainWindow''
*** Call stack at first throw:
(
0 CoreFoundation 0x311ec64f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x3494dc5d objc_exception_throw + 24
2 CoreFoundation 0x311ec491 +[NSException raise:format:arguments:] + 68
3 CoreFoundation 0x311ec4cb +[NSException raise:format:] + 34
4 UIKit 0x368c9a53 -[UINib instantiateWithOwner:options:] + 1110
5 UIKit 0x368cae09 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 92
6 UIKit 0x366f54cd -[UIApplication _loadMainNibFile] + 96
7 UIKit 0x366efb09 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 180
8 UIKit 0x366c47d7 -[UIApplication handleEvent:withNewEvent:] + 1114
9 UIKit 0x366c4215 -[UIApplication sendEvent:] + 44
10 UIKit 0x366c3c53 _UIApplicationHandleEvent + 5090
11 GraphicsServices 0x36398e77 PurpleEventCallback + 666
12 CoreFoundation 0x311c3a97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
13 CoreFoundation 0x311c583f __CFRunLoopDoSource1 + 166
14 CoreFoundation 0x311c660d __CFRunLoopRun + 520
15 CoreFoundation 0x31156ec3 CFRunLoopRunSpecific + 230
16 CoreFoundation 0x31156dcb CFRunLoopRunInMode + 58
17 UIKit 0x366eed49 -[UIApplication _run] + 372
18 UIKit 0x366ec807 UIApplicationMain + 670
19 Apptest 0x00002a0b main + 82
20 Apptest 0x000029b4 start + 40
)
terminate called after throwing an instance of 'NSException'
I hope you can help me. Thanks in advance.
Does the MainWindow.xib actually exist in your project?
You may have deleted it by accident. It may still work on the 3GS even if you deleted it from your project as it may well still be in the bundle on the 3GS.
I normally clean my projects and reset the simulator/uninstall the app from my device if I get inconsistencies like this.
I developed a univarsal application,(iPhone, iPad). But later I tried to make them sepret, so i copied my folder in another directory and then linked my iPhone's control file with iPad's XIBs, and delegated them with Outlets, (my controll file remained in the iPhone folder, i just link them in iPad), after it i removed iPhone XIBs from this folder.
Now my project is working properly, BUT only if I execute the iPhone version first(even from that different directory), and then execute my iPad version, coz it share's the build file of iPhone.
But when I try to execute it Initially (after deleting prior installed version from simulator), it doesn't work, as it terminate after throwing following exception.
2011-04-23 10:56:01.831 Tuscany[1837:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'
*** Call stack at first throw:
(
0 CoreFoundation 0x01683be9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x014785c2 objc_exception_throw + 47
2 CoreFoundation 0x0163c628 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x0163c59a +[NSException raise:format:] + 58
4 Foundation 0x000d6b12 -[NSURL(NSURL) initFileURLWithPath:] + 90
5 Foundation 0x000d6aa0 +[NSURL(NSURL) fileURLWithPath:] + 72
6 Tuscany 0x0003572c -[SplashScreenViewController readyPlayer] + 77
7 Tuscany 0x00035a62 -[SplashScreenViewController viewDidLoad] + 296
8 UIKit 0x003e865e -[UIViewController view] + 179
9 UIKit 0x0035e026 -[UIWindow addRootViewControllerViewIfPossible] + 51
10 UIKit 0x0035d511 -[UIWindow _setHidden:forced:] + 303
11 UIKit 0x0035d301 -[UIWindow _orderFrontWithoutMakingKey] + 50
12 UIKit 0x0a2ac110 -[UIWindowAccessibility(SafeCategory) _orderFrontWithoutMakingKey] + 56
13 UIKit 0x0035bfb5 -[UIWindow makeKeyAndVisible] + 39
14 Tuscany 0x00003205 -[AppDelegate_iPad application:didFinishLaunchingWithOptions:] + 1472
15 UIKit 0x0033b1fa -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
16 UIKit 0x0033d55e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439
17 UIKit 0x00347db2 -[UIApplication handleEvent:withNewEvent:] + 1533
18 UIKit 0x00340202 -[UIApplication sendEvent:] + 71
19 UIKit 0x00345732 _UIApplicationHandleEvent + 7576
20 GraphicsServices 0x01ce3a36 PurpleEventCallback + 1550
21 CoreFoundation 0x01665064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
22 CoreFoundation 0x015c56f7 __CFRunLoopDoSource1 + 215
23 CoreFoundation 0x015c2983 __CFRunLoopRun + 979
24 CoreFoundation 0x015c2240 CFRunLoopRunSpecific + 208
25 CoreFoundation 0x015c2161 CFRunLoopRunInMode + 97
26 UIKit 0x0033cfa8 -[UIApplication _run] + 636
27 UIKit 0x0034942e UIApplicationMain + 1160
28 Tuscany 0x00002b30 main + 102
29 Tuscany 0x00002ac1 start + 53
)
terminate called after throwing an instance of 'NSException'
here to mention i have worked hard with the line i'm establishing connection, and as i told same code run properly when I execute iPhone version first and then the iPad.
so please guied me with this,
thank you
What it says.
In the readyPlayer method you are trying to give a nil value to the fileUrlWithPath method.
You need to check why the path is nil.
I have a problem with my iPhone app, I have a crash log from a tester that i ran through symbolicatecrash but I'm still not sure what could be causing it. The crash only happens on one tester's device and I am unable to reproduce it on my device.
Hardware Model: iPhone2,1
OS Version: iPhone OS 4.0.1 (8A306)
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x534f5031
Crashed Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000286c objc_msgSend + 16
1 UIKit 0x000765c6 -[UINavigationItem _updateViewsForBarSizeChangeIfNecessary] + 30
2 UIKit 0x000a26c8 -[UINavigationBar _popNavigationItemWithTransition:] + 212
3 UIKit 0x000a25d0 -[UINavigationBar popNavigationItemAnimated:] + 76
4 UIKit 0x000a2492 -[UINavigationBar _handleMouseUpAtPoint:] + 390
5 UIKit 0x000a22f2 -[UINavigationBar touchesEnded:withEvent:] + 54
6 UIKit 0x000614e6 -[UIWindow _sendTouchesForEvent:] + 362
7 UIKit 0x00060e60 -[UIWindow sendEvent:] + 256
8 UIKit 0x0005cb54 -[UIApplication sendEvent:] + 292
9 UIKit 0x0005c500 _UIApplicationHandleEvent + 5016
10 GraphicsServices 0x00004140 PurpleEventCallback + 660
11 CoreFoundation 0x00071aa4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 20
12 CoreFoundation 0x00073848 __CFRunLoopDoSource1 + 160
13 CoreFoundation 0x00074626 __CFRunLoopRun + 514
14 CoreFoundation 0x0001d8e4 CFRunLoopRunSpecific + 224
15 CoreFoundation 0x0001d7ec CFRunLoopRunInMode + 52
16 GraphicsServices 0x000036e8 GSEventRunModal + 108
17 GraphicsServices 0x00003794 GSEventRun + 56
18 UIKit 0x000062a0 -[UIApplication _run] + 396
19 UIKit 0x00004e10 UIApplicationMain + 664
20 app 0x0000240c main (main.m:14)
21 app 0x000023a8 start + 44
The crash happens from taking a photo, going to new view, manipulating photo, saving it, sending it, returning to the previous view and then trying to go back to the view before that.
Make sure you're properly retaining and releasing your nib objects as outlined here.