Skip to content

Commit 6c6f6f9

Browse files
committed
Increased a not-so-magic delay which is trying to prevent rare crashes when SSYOperationQueue is ending an execution commanded by AppleScript. Very mysterious. See code comments.
1 parent 0492ed5 commit 6c6f6f9

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

SSYOperationQueue.m

+8-4
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,17 @@ - (void)observeValueForKeyPath:(NSString*)keyPath
230230
/* On 2020-03-31, macOS 10.15.4, when repetedly running the
231231
Safari/run.sh test AppleScript, I found that sometimes
232232
there would be a crash EXC_BAD_ACCESS at the call to
233-
-resumeresumeExecutionWithResult:, below. I cannot figure
233+
-resumeExecutionWithResult:, below. I cannot figure
234234
out why, except for maybe in the documentation of that
235235
method, the yellow "Important" box says something about not
236236
not sending this message too quickly. I don't quite
237-
understand it, but since adding the following sleep,
238-
it has not crashed. */
239-
sleep(1);
237+
understand it, but since adding the following sleep(1),
238+
it has not crashed.
239+
240+
Sorry, on 20200601, again while running the Safari/run.sh test
241+
AppleScript, it crashed again. So I increased the sleep time
242+
to 2. */
243+
sleep(2);
240244
[scriptCommand resumeExecutionWithResult:[self scriptResult]] ;
241245
[self setScriptCommand:nil] ;
242246
}

0 commit comments

Comments
 (0)