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 12-02-2011, 10:46 AM   #1 (permalink)
Registered Member
 
Join Date: Nov 2011
Posts: 2
geo_cc is on a distinguished road
Default iPhone app crashes on startup

My app uses an sqlite database managed with core-data. These are the errors I found in the debug files. On the simulator it works just fine, no problems at all. Made the app in Xcode 4.2 iOS 5 and tried it on an iPhone 4 4.2.1.

Code:
Incident Identifier: 65E195D6-C583-4CA2-8017-1AEC56FAFBD4
    CrashReporter Key:   4ebf8de224465a40c94ea40cffb742f345888ef0
    Hardware Model:      iPhone3,1
    Process:         Jobs [158]
    Path:            /Applications/Jobs.app/Jobs
    Identifier:      Jobs
    Version:         ??? (???)
    Code Type:       ARM (Native)
    Parent Process:  punchd [1]    
    Date/Time:       2011-12-01 13:53:22.288 +0000
    OS Version:      iPhone OS 4.2.1 (8C148)
    Report Version:  104    
    Exception Type:  EXC_CRASH (SIGABRT)
    Exception Codes: 0x00000000, 0x00000000
    Crashed Thread:  0    
    Thread 0 Crashed:   
    4   Jobs                            0x00002c74 0x1000 + 7284
    5   Jobs                            0x00002a0a 0x1000 + 6666
    6   Jobs                            0x00003012 0x1000 + 8210   
    36  Jobs                            0x0000283c 0x1000 + 6204
    37  Jobs                            0x000027f4 0x1000 + 6132
Error 4 leads to this line of code:

__persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
    if (![__persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:options error:&error])
    {        NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
        abort(); //this one to be exact
    }    
Error 5 leads to this line of code:

- (NSManagedObjectContext *)managedObjectContext
{    if (__managedObjectContext != nil)
    {        return __managedObjectContext;    }    
    NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; //this line with error;
    if (coordinator != nil)
    {        __managedObjectContext = [[NSManagedObjectContext alloc] init];
        [__managedObjectContext setPersistentStoreCoordinator:coordinator];    }
    return __managedObjectContext;}
These were in the app delegate. Now the 6th error is from the main view, in the ViewDidLoad:

 if (managedObjectContext == nil) 
    { 
        managedObjectContext = [(MyAppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext]; //this line;
        NSLog(@" %@",  managedObjectContext);}
geo_cc is offline   Reply With Quote
Old 12-02-2011, 12:59 PM   #2 (permalink)
Registered Member
 
Join Date: Dec 2010
Location: Seattle, WA
Posts: 408
RickSDK is on a distinguished road
Default

was it a fresh install of the app on the iPhone 4 4.2.1? Or was it running a previous version and started crashing when you updated it?

just asking because if you change your database schema the app will crash unless you completely delete the old version and reinstall a new version.
__________________
Check out my apps

RickSDK 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: 400
16 members and 384 guests
7twenty7, AppsBlogger, Clouds, David-T, dedeys78, Duncan C, e2applets, EvilElf, HemiMG, heshiming, iekei, LunarMoon, Murphy, sacha1996, Sami Gh, teebee74
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,127
Posts: 402,914
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

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