ランダムな場所でEXC_BAD_ACCESSを取得しています。すでにNSZombieEnabled = YESを使用しようとしましたが、何も起こりません。 私はxcodeを使用しています。4.既に試したこと:Scribbleを有効にし、Guard Edgesを有効にし、Guard Mallocを有効にしてください(シミュレータでのみ動作します、非常に遅いです!)、Memory Loggingなど... EXC_BAD_ACCESS - NSZombieはNSEnableAutoReleasePool = NOの修正をキャッチします
誰かが私に欠陥を見つけようとする別の方法を提案できますか?私はオプションが不足しています。事前に
おかげで、
- 新情報
内側:(空)applicationDidFinishLaunching:ASMInterrupt = [NSTimer scheduledTimerWithTimeInterval:1(のUIApplication *)アプリケーション
私はタイマーを作成/ 60.0ターゲット:セルフセレクタ:@セレクタ(interrupiSSao :) userInfo:nil repeats:YES];
新しいスレッド:[NSThread detachNewThreadSelector:@selector(myBackgroundMethod:)toTarget:self withObject:nil];
タイマーは、myBackgroundMethodが実行されるまでループします。
//Beginning of the function
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
EAGLContext *context = [[EAGLContext alloc] initWithAPI: kEAGLRenderingAPIOpenGLES1 sharegroup: [[glView context] sharegroup]];
[EAGLContext setCurrentContext:context];
... //いくつかのテクスチャ/音/音楽・ロード、次のように:
NSBundle *bundle = [NSBundle mainBundle];
sndMove = [[SoundFx alloc] initWithSound:[bundle pathForResource:@"tetMov" ofType:@"wav"]];
txParallax[0] = [[Texture2D alloc] initWithImageFile:@"parallax_tst" ofType : @"png" inMode:TEX_RGBA];
NSStringの* tmpSom = [[NSBundle mainBundle] pathForResource私が使用
インサイドmyBackgroundMethod :@ "ThorTitle" ofType:@ "mp3"]; musMenu = [[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:tmpSom]エラー:NULL]保持];
...//and at the end:
[EAGLContext setCurrentContext:nil];
[context release];
[pool release];
これだけのアプリの最初に起こります。
だから、シーケンス上のゲームでゲームオーバーと新しいゲーム 3)後 2)を再生 1)長い時間、それは直接そのスレッドに関係していない可能性があります、:の後に、エラーが常に発生します。私は自動解放の問題を探すことを試みたが、すべてがと割り当てられた。initWith
静的解析の結果には、3つの「デッドストア」、読み取られなかった値だけが表示されています。まだ運がありません。 – hbStark