cocoa - Unexpected outstanding background CATransaction

Viewed 1139

I am developing a macOS application using cocoa.

I have a NSScrollView instance called scrollView and a custom view instance called customView, and I use

[scrollView setDocumentView:customView];

in my AppDelegate's applicationDidFinishLaunching: method.

But when I run this application, and use my track pad to scroll, the application crushes, the Xcode turns to the threads part and displays "libsystem_kernel.dylib`__pthread_kill:" and the instruction that fails is jae.

The console displays "Unexpected outstanding background CATransaction".

But!!! When I click the scroller of the NSScrollView and drags it, the application doesn't crush.

It is so strange and I have no way to solve it.

1 Answers

I've had a similar issue. I had an outline view and as soon as I started to scroll, the app crashed with the "Unexpected outstanding background CATransaction" message.

All of the outline view's modifications were done on the Main Thread. I did however have a TableView where I used bindings and some of the KVO updates were done on a background thread.

As soon as I fixed these updates, the outline view didn't crash anymore, too.

Related