2015-07-13 59 views
1

剛搬進開放的iOS 9測試版(第3版)和我的應用程序正在崩潰在這條線:SpriteKit崩潰[self removeAllActions];

[self removeAllActions]; // where "self" is an SKNode 

編輯:挖遠一點後,我發現當removeAllActions是完成處理程序中出現問題:

[self runAction: someSKAction completion:^{ 
    [self removeAllActions]; // this will cause the crash 
}]; 

在控制檯中發生的錯誤:

libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: vector 

是其他任何人有這個問題呢?

編輯:我沒有任何版本的iOS7或iOS8的這個問題。我向蘋果提交了一個錯誤報告,報告#21788047

+0

http://stackoverflow.com/questions/21208079/spritekit-crashing-with-stdout-of-range-vector-issue – sangony

+0

@sangony感謝您的鏈接;我會研究一下。我的行爲與加載我的紋理或任何形式的+(SKAction *)animateWithTextures:(NSArray *)紋理無關。就像在其他線程中建議的那樣,我會在我的數組周圍設置日誌並查找無對象 – user2821647

回答

0

此問題已在iOS 9 Beta 4中得到解決。更新後,我運行了一些測試,一切似乎都順利進行。

1

我有這個問題,它發生的原因是actionsSKNode陣列的併發訪問。

我擺脫了它通過使用semaphore。這不是理想的解決方案,但至少它會停止崩潰。