プログラムが単語のリストを調べ、6 文字の単語を選択し、その単語の文字から単語のリストを取得する読み込み画面を作成しました。
問題は、すべての初期化の後、シーンを変更しようとすると、エラーが吐き出されることです。
Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSMutableArray replaceObjectAtIndex:withObject:]: index 4294967295 beyond bounds for empty array'
runWithSceneと同様にreplaceSceneをpushSceneに変更してみましたが、いずれもエラーを吐き出してゲームシーンに進みません。
スタックは次のとおりです。
2011-09-28 20:28:57.890 WordSearchPuzzleManiaIPhone[3524:207] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSMutableArray replaceObjectAtIndex:withObject:]: index 4294967295 beyond bounds for empty array'
*** Call stack at first throw:
(
0 CoreFoundation 0x014f75a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0164b313 objc_exception_throw + 44
2 CoreFoundation 0x014f0626 -[__NSArrayM replaceObjectAtIndex:withObject:] + 326
3 WordSearchPuzzleManiaIPhone 0x00028cc4 -[CCDirector replaceScene:] + 308
4 WordSearchPuzzleManiaIPhone 0x000d6a9f -[LoadingScene powerSetForArray] + 4031
5 WordSearchPuzzleManiaIPhone 0x000d58da -[LoadingScene init] + 842
6 WordSearchPuzzleManiaIPhone 0x000406d1 +[CCNode node] + 81
7 WordSearchPuzzleManiaIPhone 0x000d554d +[LoadingScene scene] + 93
8 WordSearchPuzzleManiaIPhone 0x000c1faf -[AppDelegate applicationDidFinishLaunching:] + 1583
9 UIKit 0x00749ce2 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1252
10 UIKit 0x0074bd88 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439
11 UIKit 0x00756617 -[UIApplication handleEvent:withNewEvent:] + 1533
12 UIKit 0x0074eabf -[UIApplication sendEvent:] + 71
13 UIKit 0x00753f2e _UIApplicationHandleEvent + 7576
14 GraphicsServices 0x02012992 PurpleEventCallback + 1550
15 CoreFoundation 0x014d8944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
16 CoreFoundation 0x01438cf7 __CFRunLoopDoSource1 + 215
17 CoreFoundation 0x01435f83 __CFRunLoopRun + 979
18 CoreFoundation 0x01435840 CFRunLoopRunSpecific + 208
19 CoreFoundation 0x01435761 CFRunLoopRunInMode + 97
20 UIKit 0x0074b7d2 -[UIApplication _run] + 623
21 UIKit 0x00757c93 UIApplicationMain + 1160
22 WordSearchPuzzleManiaIPhone 0x000c191f main + 127
23 WordSearchPuzzleManiaIPhone 0x000025a5 start + 53
24 ??? 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
誰かがそれを必要とするなら、ここにファイルがあります: http://www.mediafire.com/?z4ef1zutwb544gt
誰かがこれで私を助けてくれることを願っています。
どうもありがとう!
~かずお
編集:自分で解決しました!LoadingScene シーンの onEnter() を使用しました。:)