Post

Replies

Boosts

Views

Activity

NSOpenPanel does not work and the application becomes “not responding”.
The code below does not work properly in macos sonoma. I tested it on multiple Macs (mini, m1, intel), but it does not work the same way. (Normal operation in sonoma preview version and previous versions) NSOpenPanel* openPanel = [NSOpenPanel openPanel] Symptoms: When you press the button, the cursor changes to a whirlwind icon. My application and another system service (openAndSavePanelService) become "Not Responding". However, after a few minutes, this condition is resolved and my application returns to normal, but openAndSavePanelService continues to be in the "Not Responding" state. Suppose: Looking at the attached spindump, it is assumed that when openPanel init is called, a problem occurs in the process of communicating with xpc and the system service (openAndSavePanelService) for displaying the dialog box. What I tried: Without creating an instance when pressing the button NSOpenPanel* g_openPanel = [NSOpenPanel openPanel] When the task is attempted in main and the button is pressed, openPanel was attempted with the created instnace, but failed. Tried to work with NSOpenPanel* g_openPanel = [NSOpenPanel openPanel] via dispatch_async(dispatch_get_main_queue(), { ... }) but failed. I found similar questions on forums but they didn't help. https://developer.apple.com/forums/thread/104442?answerId=332068022#332068022 Project environment: Cocoa project Application is agent(UIElement) Hardened Runtime (apple event checked) No Sandbox Network Extension System Extension Deployment Target: 10.9 Could it be a permission issue? Is there anything else worth trying?
5
0
681
Dec ’23