Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 04-30-2010, 11:41 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 141
Falcon80 is on a distinguished road
Default App crashes immediately after splash screen for OS 3.1.3

I just got an email from Apple that my app crashes immediately (hangs in the black screen) after the splash screen is shown when tested on iPhone 3G running iPhone OS 3.1.3 and Mac OS X 10.6.2. As I was using an older SDK whick allows me to test only till OS 3.1.2, I did not realize such a problem. I just downloaded SDK 3.2 and it does indeed crash on OS 3.1.3. Funny thing is that now it even crashes on 3.0 to 3.1.2 which was previously fine. I quite clueless on how to debug as there is no crash logs.

Would appreciate any assistance on this issue. Thanks.

Last edited by Falcon80; 05-01-2010 at 03:09 AM.
Falcon80 is offline   Reply With Quote
Old 04-30-2010, 11:46 PM   #2 (permalink)
Knows SQL
 
iisword's Avatar
 
Join Date: Oct 2009
Location: Somewhere the streets are on fire, the sewers are flooded, and the cats are high on catnip
Posts: 529
iisword is on a distinguished road
Default

Quote:
Originally Posted by Falcon80 View Post
I just got an email from Apple that my app crashes immediately after the splash screen is shown when tested on iPhone 3G running iPhone OS 3.1.3 and Mac OS X 10.6.2. As I was using an older SDK whick allows me to test only till OS 3.1.2, I did not realize such a problem. I just downloaded SDK 3.2 and it does indeed crash on OS 3.1.3. Funny thing is that now it even crashes on 3.0 to 3.1.2 which was previously fine. I quite clueless on how to debug as there is no crash logs.

Would appreciate any assistance on this issue. Thanks.
Anything being loaded while splash screen comes up?
__________________
iisword is offline   Reply With Quote
Old 04-30-2010, 11:51 PM   #3 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 141
Falcon80 is on a distinguished road
Default

Quote:
Originally Posted by iisword View Post
Anything being loaded while splash screen comes up?
Yes, I am trying to load a tableview. I tried to do a print statement right at the beginning of the applicationDidFinishLaunching function but it wasn't displayed. Does that mean it crashes even before my tableviewcontroller gets initialized?
Falcon80 is offline   Reply With Quote
Old 04-30-2010, 11:55 PM   #4 (permalink)
Knows SQL
 
iisword's Avatar
 
Join Date: Oct 2009
Location: Somewhere the streets are on fire, the sewers are flooded, and the cats are high on catnip
Posts: 529
iisword is on a distinguished road
Default

Quote:
Originally Posted by Falcon80 View Post
Yes, I am trying to load a tableview. I tried to do a print statement right at the beginning of the applicationDidFinishLaunching function but it wasn't displayed. Does that mean it crashes even before my tableviewcontroller gets initialized?
Try something for me...try to load the tableview without the splash view...tell me if it crashed or not. this will either tell me A)the problem is in the actually way the splash view is loaded or B)the problem is something within the delegate.
__________________
iisword is offline   Reply With Quote
Old 05-01-2010, 12:07 AM   #5 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 141
Falcon80 is on a distinguished road
Default

Quote:
Originally Posted by iisword View Post
Try something for me...try to load the tableview without the splash view...tell me if it crashed or not. this will either tell me A)the problem is in the actually way the splash view is loaded or B)the problem is something within the delegate.
Just tried running the app without the splash view. Same issue. By the way, the splash view is provided by the SDK. I just need to supply the "Default.png" image. It is not created by me.
Falcon80 is offline   Reply With Quote
Old 05-01-2010, 12:11 AM   #6 (permalink)
Knows SQL
 
iisword's Avatar
 
Join Date: Oct 2009
Location: Somewhere the streets are on fire, the sewers are flooded, and the cats are high on catnip
Posts: 529
iisword is on a distinguished road
Default

Quote:
Originally Posted by Falcon80 View Post
Just tried running the app without the splash view. Same issue. By the way, the splash view is provided by the SDK. I just need to supply the "Default.png" image. It is not created by me.
Show me your .m file for the delegate...
__________________
iisword is offline   Reply With Quote
Old 05-01-2010, 12:27 AM   #7 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 141
Falcon80 is on a distinguished road
Default

Code:
#import "MyAppDelegate.h"
#import "ListViewController.h"

@implementation MyAppDelegate

@synthesize window;


- (void)applicationDidFinishLaunching:(UIApplication *)application {    
	
    ListViewController *tableViewController = [[ListViewController alloc]
                                             initWithStyle:UITableViewStyleGrouped];
    
    UINavigationController *navController = [[UINavigationController alloc]
                                             initWithRootViewController:tableViewController];
	
	[window addSubview:navController.view];

    [window makeKeyAndVisible];
}


- (void)dealloc {

    [window release];
    [super dealloc];
}


@end

Thanks.
Falcon80 is offline   Reply With Quote
Old 05-01-2010, 02:56 AM   #8 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 141
Falcon80 is on a distinguished road
Default

With no crash report, I am quite helpless here. Have tried to set breakpoints at several locations but seems like the codes are never executed.
Falcon80 is offline   Reply With Quote
Old 05-01-2010, 03:04 AM   #9 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 56
aloew is on a distinguished road
Default

I had several problems with the debugger in the past not activating break points.

I solved the problem by setting a break point on the first instruction of main() and skipped the first breakpoint. All other breakpoints worked from now on...
__________________
TexturePacker - the best sprite sheet maker
PhysicsEditor - editor for box2d and chipmunk collision shapes
aloew is offline   Reply With Quote
Old 05-01-2010, 03:09 AM   #10 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 141
Falcon80 is on a distinguished road
Default

Quote:
Originally Posted by aloew View Post
I had several problems with the debugger in the past not activating break points.

I solved the problem by setting a break point on the first instruction of main() and skipped the first breakpoint. All other breakpoints worked from now on...
I placed a breakpoint here in the main function.

int retVal = UIApplicationMain(argc, argv, nil, nil);

Apparently, after I tried to step into it, the app hangs.

When I mentioned the app "crash" in the first post, I am actually referring to it showing a black screen straight after the splash screen is shown and hangs there. (App did not exit).
Falcon80 is offline   Reply With Quote
Old 05-01-2010, 03:14 AM   #11 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 56
aloew is on a distinguished road
Default

What happens if you press "pause execution"?
Where is the app standing?
__________________
TexturePacker - the best sprite sheet maker
PhysicsEditor - editor for box2d and chipmunk collision shapes
aloew is offline   Reply With Quote
Old 05-01-2010, 03:26 AM   #12 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 141
Falcon80 is on a distinguished road
Default

Quote:
Originally Posted by aloew View Post
What happens if you press "pause execution"?
Where is the app standing?

I think UIApplicationMain.. Where should I check for its current line of execution.

For your info, I was working fine with I am building this iPhone SDK 3.1.2. Only after the upgrading so as to test OS 3.1.3, all these happen. Is there anything I need to configure for the upgrade. What I did was just simply install the SDK 3.2.
Falcon80 is offline   Reply With Quote
Old 05-01-2010, 03:37 AM   #13 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 56
aloew is on a distinguished road
Default

In the debugger you can see the call stack. Like

0 mach_msg_trap
1 mach_msg
2 CFRunLoopRunSpecific
3 ...
...
6 main

Can you post it please?

I upgraded my app to 3.2 without any problems.

I'll be away for some hours.... Sorry - you'll have to wait for my answer.
__________________
TexturePacker - the best sprite sheet maker
PhysicsEditor - editor for box2d and chipmunk collision shapes
aloew is offline   Reply With Quote
Old 05-01-2010, 03:50 AM   #14 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 141
Falcon80 is on a distinguished road
Default

As requested.

Falcon80 is offline   Reply With Quote
Old 05-01-2010, 03:56 AM   #15 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 141
Falcon80 is on a distinguished road
Default

Quote:
Originally Posted by aloew View Post

I upgraded my app to 3.2 without any problems.
My other two apps are also fine.
Falcon80 is offline   Reply With Quote
Old 05-01-2010, 10:30 AM   #16 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 56
aloew is on a distinguished road
Default

Hm.
Seems the app started and is up fine - only loading/starting the view failed...
Perhaps you should check your nibs and plists...
__________________
TexturePacker - the best sprite sheet maker
PhysicsEditor - editor for box2d and chipmunk collision shapes
aloew is offline   Reply With Quote
Old 05-01-2010, 10:45 AM   #17 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 141
Falcon80 is on a distinguished road
Default

Quote:
Originally Posted by aloew View Post
Hm.
Seems the app started and is up fine - only loading/starting the view failed...
Perhaps you should check your nibs and plists...
I do not have nibs in my project. Can enlighten me what is there to check for plist?
Falcon80 is offline   Reply With Quote
Old 05-01-2010, 10:53 AM   #18 (permalink)
Knows SQL
 
iisword's Avatar
 
Join Date: Oct 2009
Location: Somewhere the streets are on fire, the sewers are flooded, and the cats are high on catnip
Posts: 529
iisword is on a distinguished road
Default

Quote:
Originally Posted by Falcon80 View Post
I do not have nibs in my project. Can enlighten me what is there to check for plist?
Where is your data for the table being loaded from?
__________________
iisword is offline   Reply With Quote
Old 05-01-2010, 10:58 AM   #19 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 141
Falcon80 is on a distinguished road
Default

Quote:
Originally Posted by iisword View Post
Where is your data for the table being loaded from?
From an NSMutableArray which I populated in the viewDidLoad function of my tableviewcontroller. Just some static data.
Falcon80 is offline   Reply With Quote
Old 05-01-2010, 12:07 PM   #20 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 141
Falcon80 is on a distinguished road
Default

Hi guys,

I finally solved the problem..

As I am not using any NIB (used to have it but I deleted it away because in the end I setup all the views configuration programmatically), I need to explicitly state where is my Application Delegate in the main.m file.

So instead of

int retVal = UIApplicationMain(argc, argv, nil, nil);

I need to replace with

int retVal = UIApplicationMain( argc, argv,
@"UIApplication",
@"MyAppDelegate");

Also in your applicationdelegate, you need to initialize your window with the following statement.

window = [[UIWindow alloc]
initWithFrame:[[UIScreen mainScreen] bounds]];

I hope this thread will help someone in the future and not make the same foolish mistake that I did.

Thanks a lot for those who have helped me along the way to figure out this problem.
Falcon80 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 331
21 members and 310 guests
Abidullah, baja_yu, cgokey, Domele, Duncan C, Fstuff, gbenna, givensur, guusleijsten, HowEver, iphonedevshani, jbro, JoeRCruso, mdpauley, n00b, newDev, seokwon lee, SLIC, stanny, Steven.C, WheyLabs
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,648
Threads: 94,113
Posts: 402,877
Top Poster: BrianSlick (7,990)
Welcome to our newest member, brandon6031
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:38 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0