我创造了这款精彩的iPad游戏 - 干净而有趣的游戏,以及那些不止一次玩它的人都喜欢它。 但是,在某些情况下,它不会第二次启动。
我无法调试它,因为它在我的iPad,模拟器和我朋友的所有iPad上运行完美。 一位客户告诉我,它适用于32GB但不适用于64GB iPad - 可能就是这样吗?
任何帮助都会受到赞赏 - 这会降低我的评分(不幸的是,有充分的理由)
愿意向愿意调查此事的人发布促销代码。
谢谢! Hanaan
来自我的AppDelegate,如果有帮助:
- (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;
}
我从客户那里得到的日志有:
-
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
答案 0 :(得分:1)
您需要找到堆栈跟踪的第13帧代表的代码行。
我希望您使用最新版Xcode的“构建和存档”功能。在这种情况下,您只需将崩溃日志拖放到Xcode Organizer即可。这将“表示”崩溃日志,这意味着它将地址转换为类和方法。
一旦你知道导致错误的那一行,它(希望)就可以相对简单地找出问题所在。我的猜测是某些描述的内存损坏 - 你假设你在第一次运行时保存的值不存在或者什么。
答案 1 :(得分:1)
我认为你的某些对象或UI元素正在被释放(取消分配),但你希望它仍然存在:
http://www.iphonedevsdk.com/forum/iphone-sdk-development/51235-crash-log-help.html
答案 2 :(得分:1)
问题是释放无主物......
[pref_gameInProgress_temp release];
[pref_gameSize_temp release];
[pref_soundOn_temp release];
[pref_gameTimer_temp release];
[pref_gameNumber_temp release];
[pref_buttonsOnLeft_temp release];
答案 3 :(得分:0)
我不知道iPad和obj-c开发的具体细节。 但是,这看起来像内存损坏和/或以某种方式悬挂指针。
例如,您可以修改超出其边界的数组。仔细检查所有循环并添加验证边界的调试断言。
另一种可能性是您可能正在使用已删除对象的指针,并且写入/解释此内存具有未定义的效果。通常它只是崩溃。
或者你可能有未初始化的指针。
所有这些都属于我喜欢称之为C / C ++ /等开发应用程序的疯狂的类别。未经检查的缓冲区边界,手动内存释放和无人看守的调用堆栈内存对于现代应用程序开发来说只是一些坚定的想法。