# Extension Wizard - file open dialogs hang UI for several seconds

**URL:** <https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881>\
**Category:** Support\
**Created:** [August 5, 2019, 2:14pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881 "2019-08-05T14:14:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [August 5, 2019, 2:14pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/1 "2019-08-05T14:14:19Z")

</div>

7/31/19 nightly on MacOS 10.14.4.

1. Open slicer
2. Go to Extension Wizard
3. Click “Select Extension” (or anything that opens a file select dialog)

UI freezes (meaning window manager) - mouse movement continues, but dialog opens EXTREMELY slowly, and once it opens, it responds VERY slowly. MacOS UI Dock also does not respond - almost looks like window manager is overloaded/momentarily hung.

I should note that it _is_ operational and useable, just _very_ slow for these operations.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [August 5, 2019, 2:33pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/2 "2019-08-05T14:33:39Z")

</div>

Yes, I’m seeing something similar with the nightly. If started in a terminal (e.g. with `/Applications/Slicer-4.11.0-2019-07-19.app/Contents/MacOS/Slicer`) I see messages like this appear until the extension window shows up. Once it’s up it seems to work fine. This is only on the nightly, 4.10.2 works fine for me.

```auto
[27972:100867:0805/102712.778974:ERROR:gl_context_cgl.cc(137)] Error creating context.
[27972:100867:0805/102712.798547:ERROR:gl_context_cgl.cc(137)] Error creating context.
"{3db9d341-53ba-4a2e-8962-4409eca87c7e}: 5: Operation canceled"
"{4891af70-fea6-4635-8816-9627c110eaf5}: 5: Operation canceled"
"{fbc2e3b6-f01e-44d3-8435-7fb1b48c4f3f}: 5: Operation canceled"
"{9dc4382b-cba6-4d58-91fe-93290d349288}: 5: Operation canceled"
"{17831f79-0336-492a-8854-5d933668c421}: 5: Operation canceled"
"{16c14595-6939-489e-a004-4e51a32d1bdb}: 5: Operation canceled"
"{c8853a8f-36ce-4dbc-9364-558eafbc7d94}: 5: Operation canceled"
"{bedbcf6e-7b05-4ca9-8766-8b1424fc7076}: 5: Operation canceled"
"{d1afaf15-073f-4f18-95aa-dd0dc52328c7}: 5: Operation canceled"
"{99ea99c9-1b2b-4632-82e4-6fb4ea293d4e}: 5: Operation canceled"
"{124fc397-84e4-4923-99bb-c86db8ae777c}: 5: Operation canceled"
"{139bdfbe-86e9-411c-91cc-3002b100e6fa}: 5: Operation canceled"
"{9fc50f60-bfb5-4d37-82bc-92ad197d19f0}: 5: Operation canceled"
"{6071fe8f-cd84-48e6-9755-8e923aa0cb0b}: 5: Operation canceled"
"{66b3b4c5-0a8a-44a9-bb90-15296be5c742}: 5: Operation canceled"
"{34e50472-12b0-48ea-994e-34fe9068fe7a}: 5: Operation canceled"
"{6b8acfcb-8d4f-4355-9cc3-22410d21d08f}: 5: Operation canceled"
"{48575e31-ef58-47c7-bae7-a6a4b72e8335}: 5: Operation canceled"
"{ceb132f1-217c-471f-a3ab-41dc9ceb49d5}: 5: Operation canceled"
"{f456950f-09fb-44e1-bf4d-49981662a254}: 5: Operation canceled"
"{332f5221-e05f-460e-8700-89c156e995dc}: 5: Operation canceled"
"{5fa1e706-50fe-4a19-81a6-9987833368e4}: 5: Operation canceled"

```

On the mac you can use the Activity Monitor application’s Sample Process option to get an idea of what’s going on, or you can use Instruments from Xcode for a more fine grained look.

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [August 5, 2019, 2:53pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/3 "2019-08-05T14:53:49Z")

</div>

OK. It’s not a huge deal as I don’t use the Extension Wizard often, once something is set up I’m more or less done and then I develop in emacs or whatever. Odd that it makes OpenGL hang for some weird reason. I wonder what’s being fed to create the context (and why this needs to be done to open a file dialog).

Thanks for looking at it.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 5, 2019, 3:11pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/4 "2019-08-05T15:11:08Z")

</div>

It may be caused by the extension manager. Does it happen if you remove Slicer-NNN.ini file? Does it happen if you rename the entire NA-MIC folder in your profile folder?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [August 5, 2019, 3:23pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/5 "2019-08-05T15:23:53Z")

</div>

I believe there are a couple issues - the webengine in the qt version we are using seems to have a graphics context issue, and then the option to restore previous extensions sometimes seems to have networking issues. I don’t end up using it a lot either so I haven’t looked any deeper.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [August 5, 2019, 5:26pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/6 "2019-08-05T17:26:46Z")

</div>

I’ve been working on getting the nightly Slicer builds to all use Qt 5.12.4, so hopefully once that is complete it will fix the QWebEngine error here.

The current macOS nightly uses Qt 5.10.0 which was released December 2017 while macOS 10.14 which @hherhold is using wasn’t originally released until September 2018.

Qt 5.12 is a LTS release so it will have longer support/bug fixes for new macOS releases.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 15, 2019, 7:47pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/7 "2019-08-15T19:47:23Z")

</div>

@che85 told me today he has issues with slow Slicer startup and long 10-20 second delay when displaying any file dialog on his Mac. Using Instruments tool showed that the delay is most likely caused by tccd process. This may be also related to the “Allow Slicer application to control your computer?” question that is shown on some Macs.

Others have experienced this issue, too, for example [FreeCAD](https://forum.freecadweb.org/viewtopic.php?style=4&f=4&t=31343&sid=e93aa3b1b276fa037e7758890d735ca2) and [Skyrim](https://discussions.apple.com/thread/8612641?page=2).

Hopefully updating to a more recent Qt will solve this. @jamesobutler if you have a preview build that uses a recent Qt version then it would be great if you could send it to @che85 for testing.

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [November 8, 2019, 12:06am UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/8 "2019-11-08T00:06:30Z")

</div>

Any progress on this? I still get these hangs occasionally.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 8, 2019, 12:32am UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/9 "2019-11-08T00:32:14Z")

</div>

@jamesobutler did you have a chance to build Slicer with a more recent Qt? Could you create a package that @hherhold or @che85 could test?

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [November 8, 2019, 1:20am UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/10 "2019-11-08T01:20:35Z")

</div>

Sorry, I do not. I was borrowing a system during my development period back then.

Qt 5.12 series upgrading will require upgrades to the Slicer factory build machines as specified in my PRs there [https://github.com/Slicer/DashboardScripts/pulls](https://github.com/Slicer/DashboardScripts/pulls). Currently unclear if and when support for that would be coming around.

At the time I was doing various work to make Slicer easier to build using the latest compilers as that is the source of the problem for many basic users building from source.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 8, 2019, 2:36am UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/11 "2019-11-08T02:36:13Z")

</div>

@Sunderlandkyl could you create a Slicer Mac package with a latest possible Qt version so that people with the startup/filedialog hang issue coult try it?

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [November 8, 2019, 2:52am UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/12 "2019-11-08T02:52:52Z")

</div>

I can build from source with Qt 5.12 and see what happens. I seem to remember last time I built it locally it worked okay, but that was some months ago - I stopped building from source when I started doing only Python development.

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [November 9, 2019, 3:42pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/13 "2019-11-09T15:42:47Z")

</div>

My local build using Qt 5.12 does not have the problem. I did run a ‘make package’ and ran into errors towards the end, starting with:

```
768 - fixing item /Volumes/CT_Work/SB/Slicer-build/bin/libqSlicerApp.dylib with @rpath/lib/Slicer-4.11
Error copying file "@rpath/libSimpleITKBasicFilters0-1.3.1.dylib" to "/Volumes/CT_Work/SB/Slicer-build/_CPack_Packages/macosx-amd64/DragNDrop/Slicer-4.11.0-2019-11-07-macosx-amd64/Slicer.app/Contents/lib/Slicer-4.11/libSimpleITKBasicFilters0-1.3.1.dylib".
chmod: /Volumes/CT_Work/SB/Slicer-build/_CPack_Packages/macosx-amd64/DragNDrop/Slicer-4.11.0-2019-11-07-macosx-amd64/Slicer.app/Contents/lib/Slicer-4.11/libSimpleITKBasicFilters0-1.3.1.dylib: No such file or directory

```

This went on for a while, then recovered and finished with:

```
776 - fixing item /usr/local/Cellar/qt/5.12.0/lib/QtWebEngineCore.framework/Versions/5/QtWebEngineCore with @rpath/Frameworks
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open input file: /Volumes/CT_Work/SB/Slicer-build/_CPack_Packages/macosx-amd64/DragNDrop/Slicer-4.11.0-2019-11-07-macosx-amd64/Slicer.app/Contents/Frameworks/QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess for writing (Permission denied)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't lseek to offset: 0 in file: /Volumes/CT_Work/SB/Slicer-build/_CPack_Packages/macosx-amd64/DragNDrop/Slicer-4.11.0-2019-11-07-macosx-amd64/Slicer.app/Contents/Frameworks/QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess for writing (Bad file descriptor)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't write new headers in file: /Volumes/CT_Work/SB/Slicer-build/_CPack_Packages/macosx-amd64/DragNDrop/Slicer-4.11.0-2019-11-07-macosx-amd64/Slicer.app/Contents/Frameworks/QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess (Bad file descriptor)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't close written on input file: /Volumes/CT_Work/SB/Slicer-build/_CPack_Packages/macosx-amd64/DragNDrop/Slicer-4.11.0-2019-11-07-macosx-amd64/Slicer.app/Contents/Frameworks/QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess (Bad file descriptor)
CPack: Create package
CPack Error: Error executing: /usr/bin/hdiutil detach "/Volumes/Slicer-4.11.0-2019-11-07-macosx-amd64"
CPack Error: Error detaching temporary disk image.
CPack Error: Problem compressing the directory
CPack Error: Error when generating package: Slicer
make: *** [package] Error 1

```

The Slicer app packed into the dmg did seem to work, though, but I didn’t test it extensively (yet).

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [November 9, 2019, 3:43pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/14 "2019-11-09T15:43:54Z")

</div>

I’m happy to post that DMG somewhere for testing/use if these packaging errors are ignorable.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 9, 2019, 3:55pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/15 "2019-11-09T15:55:57Z")

</div>

> [@hherhold](#):
>
> I’m happy to post that DMG somewhere

I would be great. Dropbox, OneDrive, etc. should work.

@Sunderlandkyl have you tried to build and package, too? Have you experienced similar packaging issues?

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [November 9, 2019, 4:12pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/16 "2019-11-09T16:12:29Z")

</div>

Disk image uploading now, should be ready in a few mins.

> **[Slicer build](https://www.dropbox.com/sh/do60w766ojk0b8i/AAB-lJq80hIr2V3ozXBsHgt9a?dl=0)**
>
> Shared with Dropbox

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 9, 2019, 4:26pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/17 "2019-11-09T16:26:52Z")

</div>

@che85 Could you try the package above and see if you still have the issues of long startup time and long time required for file selection dialogs to show up. Thanks!

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [November 9, 2019, 5:05pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/18 "2019-11-09T17:05:05Z")

</div>

Interesting - I tried the build that @hherhold made, and it gave me the dialog box shown below when I tried to open the extension manager. The extension manager dialog does show up but is blank. Today’s factory nightly build on the same mac works fine, and the extension manager takes just a second or two to start up and displays correctly.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/6/e6ad45a053e7391b8d32e49423b6e591ba14a1f8.png)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 9, 2019, 5:20pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/19 "2019-11-09T17:20:54Z")

</div>

@pieper What MacOSX version do you use? Have you experienced slow startup and long wait before file selection dialogs show up? Do you remember that the OS asked you for permission to Slicer control your computer? Did you give permission? (these slowdowns are caused by waiting for tccd process and it is likely related to some security or accessibility checks).

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [November 9, 2019, 5:41pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/20 "2019-11-09T17:41:26Z")

</div>

This is kind of odd. When I run the app from the package, I get the window manager hang. When I run it from the command line (i.e., Slicer-build/Slicer), I do not get the hang.

I wonder if it’s a problem with improper packaging, and not all the correct libraries are included, and Slicer falls back on system-installed libraries? (totally shooting in the dark here…)

[Next page](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881.md?page=2)
