Skip to content

Core animation warnings about transactions #2275

@skurfer

Description

@skurfer

I’ve seen this in the Console for months and finally looked into it.

CoreAnimation: warning, deleted thread with uncommitted CATransaction

It’s because running actions and scanning the catalog happen on background threads. I found three specific places to fix, but I’m sure there are others:

  1. -[QSInterfaceController showArray:withDirectObject:] calls setSearchMode, which updates the UI. (I think there are other things in there besides setSearchMode we should worry about though.)
  2. -[QSSearchObjectView hideResultsView:]
  3. -[QSLibrarian scanCatalogIgnoringIndexes:] manipulates the progress for a task which, via KVO, eventually causes the UI to get updated. I’m not sure how to fix this one. The thing doing the observing appears to be on the same thread as the catalog scan, which shouldn’t necessarily be the case. Maybe there’s some way to make sure the objects observing “progress” are always on the main thread? Fixing this will probably also fix Crash related to the QSTask cleanup #2261.
  4. -[QSTask updateTaskView] is run asynchronously. I think I got rid of a warning by making it synchronous.

Just making a note of these for now, since a pull request would have conflicts (and I’m not sure how to fix 3 anyway.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions