在某些设备上可获取EXC

在某些设备上可获取EXC

本文介绍了iPad应用程序可在大多数设备上运行,在某些设备上可获取EXC_CRASH(SIGABRT)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我创建了这个很棒的iPad游戏-干净有趣,玩起来很开心,而且设法玩这个游戏的人不止一次喜欢它.但是,在某些情况下,它将不会第二次启动.

I created this awesome iPad game - clean and fun to play, and people that manage to play it more than once love it.In some cases, however, it will not launch for the second time.

我无法调试它,因为它可以在我的iPad,模拟器和我所有朋友的iPad上完美运行.一位客户告诉我,它可以在32GB的iPad上运行,但不能在64GB的iPad上运行-可以吗?

I can't debug it since it works perfect on my iPad, simulator and on all my friend's iPads.One customer told me that it works on 32GB but not on 64GB iPads - could this be it?

任何帮助将不胜感激-这正在降低我的评分(不幸的是,有充分的理由)

Any help would be appreciated - this is sinking my ratings (and for a good reason, unfortunately)

很乐意将促销代码提供给愿意研究此代码的任何人.

Would love to give out promo code to anyone willing to look into this.

谢谢!哈南

在我的AppDelegate"中,如果有帮助:

From My AppDelegate, if helps:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions     {

self.playerName = [[NSUserDefaults standardUserDefaults] objectForKey:@"player_name"];
if(self.playerName == nil){
    self.playerName = @"nono";

    self.pref_currentPuzzleNumberHintsString = @"";
    self.pref_currentPuzzleFinishedSolutionString = @"";
    self.pref_currentPlayerMarksString = @"";
    self.pref_marksCompleteString = @"";
    self.pref_currentPuzzleId = -1;

    self.pref_gameInProgress = NO;
    self.pref_soundOn = YES;
    self.pref_buttonsOnLeft = NO;
    self.pref_gameTimerValue = 0;
    self.pref_gameSize = 0;

    NSNumber *pref_gameInProgress_temp = [NSNumber numberWithInt:0];
    NSNumber *pref_soundOn_temp = [NSNumber numberWithInt:1];
    NSNumber *pref_buttonsOnLeft_temp = [NSNumber numberWithInt:0];
    NSNumber *pref_gameNumber_temp = [NSNumber numberWithInt:self.pref_currentPuzzleId];
    NSNumber *pref_gameSize_temp = [NSNumber numberWithInt:self.pref_gameSize];
    NSNumber *pref_gameTimer_temp = [NSNumber numberWithInt:self.pref_gameTimerValue];


    NSUserDefaults *standardUserDefaults = [NSUserDefaults standardUserDefaults];

    [standardUserDefaults setObject:self.pref_currentPuzzleFinishedSolutionString forKey:@"game_string"];
    [standardUserDefaults setObject:self.pref_currentPuzzleNumberHintsString forKey:@"hint_string"];
    [standardUserDefaults setObject:self.pref_currentPlayerMarksString forKey:@"solution_string"];
    [standardUserDefaults setObject:self.pref_marksCompleteString forKey:@"marks_complete_string"];

    [standardUserDefaults setObject:pref_gameNumber_temp forKey:@"game_id"];
    [standardUserDefaults setObject:pref_gameSize_temp forKey:@"game_size"];
    [standardUserDefaults setObject:pref_gameTimer_temp forKey:@"game_timer_value"];

    [standardUserDefaults setObject:pref_gameInProgress_temp forKey:@"game_in_progress"];
    [standardUserDefaults setObject:pref_soundOn_temp forKey:@"sound_on"];
    [standardUserDefaults setObject:pref_buttonsOnLeft_temp forKey:@"buttons_on_left"];

    [standardUserDefaults setObject:self.playerName forKey:@"player_name"];

    [[NSUserDefaults standardUserDefaults] synchronize];

    [pref_gameInProgress_temp release];
    [pref_gameSize_temp release];
    [pref_soundOn_temp release];
    [pref_gameTimer_temp release];
    [pref_gameNumber_temp release];
    [pref_buttonsOnLeft_temp release];

}else {
    self.pref_currentPlayerMarksString = [[NSUserDefaults standardUserDefaults] objectForKey:@"game_string"];
    self.pref_currentPuzzleNumberHintsString = [[NSUserDefaults standardUserDefaults] objectForKey:@"hint_string"];
    self.pref_currentPuzzleFinishedSolutionString = [[NSUserDefaults standardUserDefaults] objectForKey:@"solution_string"];
    self.pref_marksCompleteString = [[NSUserDefaults standardUserDefaults] objectForKey:@"marks_complete_string"];

    self.pref_currentPuzzleId = [[[NSUserDefaults standardUserDefaults] objectForKey:@"game_id"]intValue];

    self.pref_gameSize = [[[NSUserDefaults standardUserDefaults] objectForKey:@"game_size"]intValue];
    self.pref_gameTimerValue = [[[NSUserDefaults standardUserDefaults] objectForKey:@"game_timer_value"]intValue];

    int pref_gameInProgress_temp = [[[NSUserDefaults standardUserDefaults] objectForKey:@"game_in_progress"]intValue];
    self.pref_gameInProgress = (pref_gameInProgress_temp == 1);

    int pref_soundOn_temp = [[[NSUserDefaults standardUserDefaults] objectForKey:@"sound_on"]intValue];
    self.pref_soundOn = (pref_soundOn_temp == 1);

    int pref_buttonsOnLeft_temp = [[[NSUserDefaults standardUserDefaults] objectForKey:@"buttons_on_left"]intValue];
    self.pref_buttonsOnLeft = (pref_buttonsOnLeft_temp == 1);
    //NSLog(@"Saved game: %@",self.pref_currentPlayerMarksString);
}


// Add the view controller's view to the window and display.
[window addSubview:viewController.view];
[window makeKeyAndVisible];

return YES;
}

我从客户那里得到的日志是这样的:

The log I got from a customer has this:

-

Incident Identifier: 1581089C-C02A-4155-9493-9E42B9AAB37D
CrashReporter Key:   a913e5f82c7112b47b354f04909239bff1b39000
Hardware Model:      iPad1,1
Process:         Nonograms [193]
Path:            /var/mobile/Applications/4F03245E-CFB8-4181-B881-859FDAEE18C7/Nonograms.app/Nonograms
Identifier:      Nonograms
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2010-08-21 16:31:11.002 +0200
OS Version:      iPhone OS 3.2.2 (7B500)
Report Version:  104

SYMBOLIZED:

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread:  0

Thread 0 Crashed:
0   libSystem.B.dylib               0x000790a0 __kill + 8
1   libSystem.B.dylib               0x00079090 kill + 4
2   libSystem.B.dylib               0x00079082 raise + 10
3   libSystem.B.dylib               0x0008d20a abort + 50
4   libstdc++.6.dylib               0x00044a1c __gnu_cxx::__verbose_terminate_handler() + 376
5   libobjc.A.dylib                 0x000057c4 _objc_terminate + 104
6   libstdc++.6.dylib               0x00042dee __cxxabiv1::__terminate(void (*)()) + 46
7   libstdc++.6.dylib               0x00042e42 std::terminate() + 10
8   libstdc++.6.dylib               0x00042f12 __cxa_throw + 78
9   libobjc.A.dylib                 0x000046a4 objc_exception_throw + 64
10  CoreFoundation                  0x00094174 -[NSObject doesNotRecognizeSelector:] + 108
11  CoreFoundation                  0x00093afa ___forwarding___ + 482
12  CoreFoundation                  0x000306c8 _CF_forwarding_prep_0 + 40
13  Nonograms                       0x00003238 0x1000 + 8760
14  UIKit                           0x00003e58 -[UIApplication _performInitializationWithURL:payload:] + 336
15  UIKit                           0x00003b22 -[UIApplication _runWithURL:payload:launchOrientation:] + 394
16  UIKit                           0x0004f8c4 -[UIApplication handleEvent:withNewEvent:] + 1336
17  UIKit                           0x0004f242 -[UIApplication sendEvent:] + 38
18  UIKit                           0x0004ec8c _UIApplicationHandleEvent + 4772
19  GraphicsServices                0x00003b2c PurpleEventCallback + 660
20  CoreFoundation                  0x00022d96 CFRunLoopRunSpecific + 2214
21  CoreFoundation                  0x000224da CFRunLoopRunInMode + 42
22  UIKit                           0x0000340a -[UIApplication _run] + 342
23  UIKit                           0x00001954 UIApplicationMain + 636
24  Nonograms                       0x00002538 0x1000 + 5432
25  Nonograms                       0x00002508 0x1000 + 5384

推荐答案

问题在于释放了未拥有的对象...

The problem was releasing unowned objects...

[pref_gameInProgress_temp release];
[pref_gameSize_temp release];
[pref_soundOn_temp release];
[pref_gameTimer_temp release];
[pref_gameNumber_temp release];
[pref_buttonsOnLeft_temp release];

这篇关于iPad应用程序可在大多数设备上运行,在某些设备上可获取EXC_CRASH(SIGABRT)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 03:02