NSProgressIndicator built-in animation raises CA_ASSERT_MAIN_THREAD_TRANSACTIONS

395 Views Asked by At

This looks like a bug in either NSProgressIndicator or Xcode 9 to me:

  • Run Xcode 9 Beta 1 or Beta 4, in macOS 10.12.6.
  • File > New Project, macOS, Cocoa app, Objective-C or Swift, ARC or not, no storyboards, latest (10.13) SDK.
  • In the app target's environment, set CA_ASSERT_MAIN_THREAD_TRANSACTIONS=1.
  • In app delegate, add a IBOutlet progressIndicator.
  • In the nib, add a NSProgressIndicator to the window, connect to that outlet. Leave the checkbox Indeterminate switched on.
  • In -applicationDidFinishLaunching, call -startAnimation: on progressIndicator.
  • Build and run.

Expected Result:

Progress indicator should happily show indeterminate progress, because I did everything on the main thread.

Actual Result:

App crashes, citing CA_ASSERT_MAIN_THREAD_TRANSACTIONS, when -startAnimation: is called.

You can see this in a tiny demo project.

Did I do anything wrong? Is my Expected Result incorrect?

P.S. I asked this on Apple's Developer Forums, but still awaiting moderator approval after 2 working days, so I deleted it and came here instead :(

Update: Still lacking an explanation, I filed Apple Bug 33593575.

1

There are 1 best solutions below

0
Quinn Taylor On

This was a bug in NSProgressIndicator. Your bug report (thank you for filing!) was marked as a duplicate of an earlier bug, which was already resolved in macOS 10.13.