0

Starting with macOS Ventura (or maybe with the latest Xcode version), I'm getting log messages in my Mac app:

+[CATransaction synchronize] called within transaction

whenever the app displays an NSSavePanel (or subclass). For instance:

    NSOpenPanel* panel = [NSOpenPanel openPanel];
    panel.prompt = @"Import";
    panel.canChooseDirectories = NO;
    panel.allowsMultipleSelection = YES;
    panel.message = @"Choose chromatogram files to import into the selected folder.";
    panel.allowedFileTypes = @[@"com.appliedbiosystems.abif.fsa", @"com.appliedbiosystems.abif.hid"];
    [panel beginSheetModalForWindow:self.parentWindow completionHandler:^(NSInteger result){
        if (result == NSModalResponseOK) {
            [self addSamplesFromFiles:[panel.URLs valueForKeyPath:@"@unionOfObjects.path"] toFolder:selectedFolder];
            }
    }];

Here, beginSheetModalForWindow triggers the warning.

If I spawn the panel with beginWithCompletionHandler (i.e., not as a sheet), the message is posted as well. In fact, it also gets posted whenever I resize the panel.

This doesn't occur with other windows or with NSAlert sheets, but this occur with all open/save panels in my app. I have checked that these panels are not used within CATransaction blocks. They are spawned from the main thread.

All panels behave normally to the user, but I'd like to know what I'm doing wrong and why this started happening.

jeanlain
  • 382
  • 1
  • 3
  • 13

0 Answers0