"For each member of" block on iOS problem

m456arcus

  • Posts: 37
The "for each member of" block crashes my game on an iPod Touch, but not in Flash. Why is this? Is there a workaround? Using this block is really the only way I can do what I want to do, so is there a way I can make it work on iOS? I'm trying to tell all the blocks to recycle and spawn new ones. If I use a boolean, it recycles all the blocks, but the new ones instantly recycle, and then the sext, and so on, freezing/crashing the game. Messaging all the blocks only affects the ones on the board at the time the message is sent, which is what I want. I also have no idea what this Xcode log means, hopefully it can help:

2012-02-11 23:11:29.982 AppScaffold[5051:707] -[__NSArrayM removeEventListener:atObject:forType:]: unrecognized selector sent to instance 0x337ea0
2012-02-11 23:11:29.989 AppScaffold[5051:707] Error: -[__NSArrayM removeEventListener:atObject:forType:]: unrecognized selector sent to instance 0x337ea0
2012-02-11 23:11:29.996 AppScaffold[5051:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM removeEventListener:atObject:forType:]: unrecognized selector sent to instance 0x337ea0'
*** First throw call stack:
(0x33c928bf 0x307861e5 0x33c95acb 0x33c94945 0x33bef680 0xe224 0x3c00 0x149dc 0x190a8 0xc184 0x41688 0x16b08 0x6eec 0x33bf1803 0x18cf0 0xe904 0x4940 0x13ff4 0x18ffc 0xc4ec 0x3f58c 0x40428 0x40884 0x33c95814 0x33bf07e1 0x7e100 0x6fe94 0x33bf122b 0x33c2dae9 0x72b1c 0x73130 0x805a8 0x35377423 0x35377379 0x31f0cf93 0x37212891 0x33c5bf43 0x33c66553 0x33c664f5 0x33c65343 0x33be84dd 0x33be83a5 0x3835afcd 0x3164b743 0x2c60 0x2c08)
terminate called throwing an exception(gdb)


Or there's this:

2012-02-11 23:08:48.954 AppScaffold[5007:707] Error: *** Collection <__NSCFSet: 0x35a570> was mutated while being enumerated.
2012-02-11 23:08:48.963 AppScaffold[5007:707] *** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <__NSCFSet: 0x35a570> was mutated while being enumerated.'
*** First throw call stack:
(0x33c928bf 0x307861e5 0x33c923e3 0x33c15a91 0x9464 0x13fe4 0x18fec 0xc4dc 0x3f57c 0x40418 0x40874 0x33c95814 0x33bf07e1 0x7e0f0 0x6fe84 0x33bf122b 0x33c2dae9 0x72b0c 0x73120 0x80598 0x35377423 0x35377379 0x31f0cf93 0x37212891 0x33c5bf43 0x33c66553 0x33c664f5 0x33c65343 0x33be84dd 0x33be83a5 0x3835afcd 0x3164b743 0x2c08 0x2bb0)
terminate called throwing an exception(gdb)

« Last Edit: February 11, 2012, 08:24:05 pm by m456arcus »