I'm a beginner in SpriteKit world and now I'm doing animation through SKWarpGeometryGrid. When I have a large number of
sourcePositions/destinationPositions it fulls my buffer and I have the next crash: validateIndexBuffer:131: failed assertion `indexBufferOffset(0) + (indexCount(4704) * 2) must be <= indexBuffer length.'
Sprite Kit app crashes when run on real device and plugged into computer
This answer was helpful and there is no crash now, but the animation stopped working and the image disappears from screen now and then.
What does debugger says:
2018-06-07 14:27:27.102269+0300 LiveGram[15259:5348410] Execution of the command buffer was aborted due to an error during execution. Discarded (victim of GPU error/recovery) (IOAF code 5) 2018-06-07 14:27:27.102352+0300 LiveGram[15259:5348410] Execution of the command buffer was aborted due to an error during execution. Caused GPU Hang Error (IOAF code 3) 2018-06-07 14:27:27.102389+0300 LiveGram[15259:5348410] Execution of the command buffer was aborted due to an error during execution. Discarded (victim of GPU error/recovery) (IOAF code 5) 2018-06-07 14:27:27.156201+0300 LiveGram[15259:5348410] Execution of the command buffer was aborted due to an error during execution. Discarded (victim of GPU error/recovery) (IOAF code 5) 2018-06-07 14:27:27.156278+0300 LiveGram[15259:5348410] Execution of the command buffer was aborted due to an error during execution. Caused GPU Hang Error (IOAF code 3) 2018-06-07 14:27:27.156311+0300 LiveGram[15259:5348410] Execution of the command buffer was aborted due to an error during execution. Discarded (victim of GPU error/recovery) (IOAF code 5) 2018-06-07 14:27:27.158508+0300 LiveGram[15259:5348408] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (IOAF code 4) 2018-06-07 14:27:27.158586+0300 LiveGram[15259:5348408] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (IOAF code 4) 2018-06-07 14:27:27.158613+0300 LiveGram[15259:5348408] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (IOAF code 4)
Does anybody know what I'm doing wrong and how may I fix it?