Welcome to our ‘Bug of the Week’ special. We highlight bugs in Apple’s systems affecting developers that are of special importance or just unbelievably bad. Here is the first one:
This basically amounts to the fact that the -[NSWindow beginSheet:completionHandler:] API can present the wrong sheet, not the one you are passing in, but another sheet that was previously presented, which is quite insane. The issue is solved in 10.13 but still present in the most recent updates to prior releases.
Debugging this issue was a nightmare around here and cost us several days because the result is so unbelievable and we were searching for possibilities of our code being broken instead of ‘beginSheet’ just showing the wrong sheet.
So, if you are trying to end sheets presented with -[NSWindow beginSheet:completionHandler:] with +[NSApp endSheet:] instead of the new method -[NSWindow endSheet:] your users on older systems might be in for a surprise. Best search all of your codebases for ‘NSApp endSheet’ to be sure.
Got a showstopper bug to share or found something breaking in unbelievable ways in Apple’s systems? Comment below and we might select your entry for the next ‘Bug of the Week’ feature!