compaqdrew

Occasional crash: "operation is already enqueued on queue"

Discussion created by compaqdrew on Jun 3, 2011
Latest reply on Jul 18, 2011 by cmahlke
I'm getting the following crash occasionally.  It is difficult to reproduce.

2011-06-04 01:18:48.369 semaps[38788:7f07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSOperationQueue addOperation:]: operation is already enqueued on a queue'
*** Call stack at first throw:
(
 0   CoreFoundation                      0x01cc7be9 __exceptionPreprocess + 185
 1   libobjc.A.dylib                     0x01e1c5c2 objc_exception_throw + 47
 2   CoreFoundation                      0x01c80628 +[NSException raise:format:arguments:] + 136
 3   CoreFoundation                      0x01c8059a +[NSException raise:format:] + 58
 4   Foundation                          0x00ef7288 __addOperations + 1169
 5   semaps                              0x000a088d -[AGSGraphicsLayer ags_drawGraphicsForParams:] + 531
 6   semaps                              0x000a178a -[AGSGraphicsLayer exportMapImage:] + 258
 7   semaps                              0x000d8f70 -[AGSDynamicLayerView draw:] + 1143
 8   semaps                              0x000d89d9 -[AGSDynamicLayerView mapZoomed:] + 40
 9   Foundation                          0x00ee69a6 __NSThreadPerformPerform + 251
 10  CoreFoundation                      0x01ca901f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
 11  CoreFoundation                      0x01c0728b __CFRunLoopDoSources0 + 571
 12  CoreFoundation                      0x01c06786 __CFRunLoopRun + 470
 13  CoreFoundation                      0x01c06240 CFRunLoopRunSpecific + 208
 14  CoreFoundation                      0x01c06161 CFRunLoopRunInMode + 97
 15  Foundation                          0x00f08175 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 295
 16  semaps                              0x000c9312 -[WorkerThreadUnit workerThreadMainRoutine] + 166
 17  Foundation                          0x00ed1d4c -[NSThread main] + 81
 18  Foundation                          0x00ed1cd8 __NSThread__main__ + 1387
 19  libSystem.B.dylib                   0x939a57fd _pthread_start + 345
 20  libSystem.B.dylib                   0x939a5682 thread_start + 34
)
terminate called after throwing an instance of 'NSException'

Outcomes