Catalinaでnanoguiのファイルオープンダイアログと保存ダイアログが動かない。 beta2, beta3の両方だめ。
nanogui https://github.com/wjakob/nanogui
nanoguiはGLFWベースのウィンドウシステム
ファイルオープンの実装 https://github.com/wjakob/nanogui/blob/885e4fccc69bbfdd4c527009eef8ed33641d9765/src/darwin.mm#L24
実行しても例外が飛ぶ。
stdoutに下記出力。
2019-07-03 12:26:03.504 example1[2218:26296] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'com.apple.view-bridge': Connection interrupted
File dialog result:
console.appに下記出力。
エラー 12:26:55.330250+0900 com.apple.appkit.xpc.openAndSavePanelService cannot open file at line 43328 of [378230ae7f]
エラー 12:26:55.330279+0900 com.apple.appkit.xpc.openAndSavePanelService os_unix.c:43328: (2) open(/var/db/DetachedSignatures) - No such file or directory
エラー 12:26:55.330712+0900 com.apple.appkit.xpc.openAndSavePanelService cannot open file at line 43328 of [378230ae7f]
エラー 12:26:55.330735+0900 com.apple.appkit.xpc.openAndSavePanelService os_unix.c:43328: (2) open(/var/db/DetachedSignatures) - No such file or directory
エラー 12:26:55.333494+0900 example1 ERROR: Unable to display open panel (unrecognized error: Error Domain=NSCocoaErrorDomain Code=4099 UserInfo={NSDebugDescription=<private>})
エラー 12:26:59.238014+0900 taskgated cannot open file at line 43328 of [378230ae7f]
エラー 12:26:59.238033+0900 taskgated os_unix.c:43328: (2) open(/var/db/DetachedSignatures) - No such file or directory
Xamarinで関係がありそうなトラブルがあったっぽい。
どのように解決したのかイマイチ不明。
OBSのmac版で同じトラブルがあるっぽい。
https://obsproject.com/forum/threads/unable-to-browse-files-macos-catalina.107386/
nanogui再現方法
$ git clone https://github.com/wjakob/nanogui
$ cd nanogui
$ git submodule update --init
$ mkdir build
$ cd build
$ cmake .. -DNANOGUI_BUILD_PYTHON=OFF
$ make -j8
$ ./example1
# ウィンドウが出るので File Dialog > Open をクリック
# 本来はここでオープンダイアログが出るが、何も出ないでエラーメッセージがコンソールに出る
swift packageのmainだけで再現
https://github.com/omochi/catalina-NSOpenPanel-bug