My Mac is intended for editing and analyzing graphs that users can create and store in files anywhere in the file system. I go to the user to allow them to open a previously created file with [NSOpenPanel openPanel] and the built-in completion handler block. During menu processing, I get this console error message several times:
2017-02-25 13:42:47.394433 pasteurnet3[32901:1263849] [default] Failed to updated bookmark for item (null) [60AF512E-6072-427D-8624-C406B0EF7D5A] - URL:file:
This only happens when creating an NSOpenPanel , even before sending the beginWithCompletionHandler: message. FWIW, however, the menu appears when it is finally requested, allows you to select a file, and seems to work. There seems to be a long delay in initializing the menu object.
I have not paid attention to this application for a long time, but the appearance of the message appears to be due to a change in MacOS. I immediately suspected the sandbox, but the sandbox was disabled for the application. If I turn on the sandbox and request the rights to the "User File", this does not seem to matter.
There is nothing special about creating an object, except that it runs inside the @try block:
@try { // Create the File Open Dialog class. openDialog_ = [NSOpenPanel openPanel]; // error occurs here } @catch (NSException *e){ NSLog(@"innocuous exception(1) in -initForOpenWithDefaultFile:callBackTo:"); } @catch (NSString *s){ NSLog(@"innocuous exception(2) in -initForOpenWithDefaultFile:callBackTo: \"%@\"", s); } @catch (...) { NSLog(@"innocuous exception(3) in -initForOpenWithDefaultFile:callBackTo: probably a layout error"); } @finally { ; }
I do nothing with bookmarks from the program and, for that matter, with AirDrop.
Xcode 8.2.1, Macbook MacOS 10.12.3.
source share