Skip to content

Instantly share code, notes, and snippets.

@omochi
Last active July 18, 2019 06:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omochi/7693d0609ad3753d3e5495f420e59584 to your computer and use it in GitHub Desktop.
Save omochi/7693d0609ad3753d3e5495f420e59584 to your computer and use it in GitHub Desktop.

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で関係がありそうなトラブルがあったっぽい。

xamarin/xamarin-macios#6474

どのように解決したのかイマイチ不明。

xamarin/xamarin-macios#6476

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 をクリック
# 本来はここでオープンダイアログが出るが、何も出ないでエラーメッセージがコンソールに出る
@omochi
Copy link
Author

omochi commented Jul 18, 2019

swift packageのmainだけで再現
https://github.com/omochi/catalina-NSOpenPanel-bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment