# 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:** 2

<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:54pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/21 "2019-11-09T17:54:17Z")

</div>

> [@lassoan](#):
>
> @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).

I’m testing on 10.14.6. It does ask for permissions from time to time but I decline and it doesn’t seem to matter.

I’m installing the latest 10.15 on an older machine now, so I can test that out and let you know.

> [@hherhold](#):
>
> 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…)

Interesting idea - in the Activity Monitor if you select a process and click the info icon (i in circle) you can list all the open files and ports, which will show you which libs are in use, so you could compare.

---

<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, 6:31pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/22 "2019-11-09T18:31:51Z")

</div>

There’s nothing obviously different in the libs at first glance. The packaged one is using the packaged libraries, which (presumably) came from my system, as that’s where it was built using Qt 5.12 from Homebrew.

---

<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, 8:07pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/23 "2019-11-09T20:07:14Z")

</div>

On macos 10.15, both the factory preview and @hherhold’s build take about 10 seconds to bring up the extension manager. 4.10.2 opens right away.

On a side note, slicer seems to run fine on 10.15, but with stricter default security permissions - you must manually go to the security settings and manually approve each version of the app, you can’t just use the context menu Open.

---

<div class="post-metadata">

### Author: ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)
#### Post date: [November 9, 2019, 8:29pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/24 "2019-11-09T20:29:34Z")

</div>

Sorry for the delay, I had to update some build scripts for MacOS 10.14, but it looks like it was successful.  
I built Slicer using the latest Qt LTS release (5.12.5).

Here is the link:

> **[Slicer-4.11.0-2019-11-07-macosx-amd64.dmg](https://www.dropbox.com/s/l2zlcbyzurr7w6c/Slicer-4.11.0-2019-11-07-macosx-amd64.dmg?dl=0)**
>
> Shared with Dropbox

---

<div class="post-metadata">

### Author: ![rkikinis](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rkikinis/32/791_2.png) [@rkikinis](https://discourse.slicer.org/u/rkikinis)
#### Post date: [November 9, 2019, 8:39pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/25 "2019-11-09T20:39:32Z")

</div>

Where are those security settings to be found?

---

<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, 9:51pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/26 "2019-11-09T21:51:25Z")

</div>

When I first tried to run it only offered cancel or move the app to the trash. I cancel, and then in the System Preferences under Security & Privacy there was a button added to enable running the app. After that it worked.

---

<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, 10:22pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/27 "2019-11-09T22:22:32Z")

</div>

Could everybody with a Mac report the following for a recent Slicer preview release:

- MacOSX version, Slicer version
- application startup time
- time to show a file selection dialog (menu: File / Add data / Choose file to add)
- time to show Extension wizard window

Thank you!

---

<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 10, 2019, 3:20pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/28 "2019-11-10T15:20:46Z")

</div>

OK, I found out something rather odd. This is with the 11-7 slicer nightly build (downloaded Saturday PM).

Test:

1. Run slicer
2. Go to screen capture module
3. Hit … for dialog box to pick output directory.

When I run slicer by double-clicking on the app, the dialog box always freezes halfway through its “zoom up” process. It hangs the window manager completely for several seconds. It will also sometimes hang the WM after it is up.

When I open a terminal window and run slicer from the command line (i.e., cd Desktop/Slicer.app/Contents/MacOS; ./Slicer) I _never_ get these hangs.

Could it be some environment variable or path difference between running from the WM by double-clicking vs running on the command line?

This is MacOS 10.14.4.

---

<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 10, 2019, 3:42pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/29 "2019-11-10T15:42:55Z")

</div>

This freeze of the window manager is due to the tccd system process hanging for tens of seconds. This is what we try to fix.

Do you experience this issue with Slicer built with Qt-5.12.5?

---

<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 10, 2019, 4:11pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/30 "2019-11-10T16:11:15Z")

</div>

I was not able to run the 5.12.5 slicer because (I think) it’s built for 10.15, and I’m running 10.14.4.

Also, I thought the tccd problem was only referring to 10.15.

---

<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 10, 2019, 4:21pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/31 "2019-11-10T16:21:37Z")

</div>

You can use Instruments (I think it comes with xcode) to see what’s happening while the file dialog hangs. Maybe you can also try the package that @Sunderlandkyl built.

---

<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 10, 2019, 4:34pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/32 "2019-11-10T16:34:42Z")

</div>

That’s the one I can’t run (the one @Sunderlandkyl built with 5.12.5).

On 10.14.4, if I put Slicer into the “it can control your machine” list in security settings, I do not get the dialog box hang. I mistakenly thought that was a 10.15-only issue.

---

<div class="post-metadata">

### Author: ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)
#### Post date: [November 11, 2019, 2:31pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/33 "2019-11-11T14:31:51Z")

</div>

Here are some nightly stats:

- MacOS: 10.14.6
- Slicer Nightly (2019-11-09)
- Startup: 11.0s
- File dialog: 0.0s
- Extension manager: 6.1s

---

<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 11, 2019, 2:38pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/34 "2019-11-11T14:38:07Z")

</div>

> [@hherhold](#):
>
> if I put Slicer into the “it can control your machine” list in security settings, I do not get the dialog box hang

This is a very important finding.

@Sunderlandkyl do you see any difference in file dialog display time if you change security settings for Slicer application?

---

<div class="post-metadata">

### Author: ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)
#### Post date: [November 11, 2019, 3:06pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/35 "2019-11-11T15:06:01Z")

</div>

Slicer is not in the list of apps that can “control your computer”, and I am unable to add it.

I restarted the Mac, and now I’m seeing different behavior (same Nightly as before 2019-11-09):  
Startup: Hangs OS for ~33.4s on startup (total startup time (45.5s).  
File dialog: 0.0s  
Extension manager: Hangs OS for 56.4s.

Trying to determine why I can’t add security options for Slicer.

---

<div class="post-metadata">

### Author: ![che85](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/che85/32/636_2.png) [@che85](https://discourse.slicer.org/u/che85)
#### Post date: [November 11, 2019, 3:17pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/36 "2019-11-11T15:17:42Z")

</div>

I have a similar issue. Slicer shows up in the accessibility list, but I cannot check it. I also reinstalled, removed Slicer, but that didn’t change anything.

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

---

<div class="post-metadata">

### Author: ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)
#### Post date: [November 13, 2019, 7:03pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/37 "2019-11-13T19:03:06Z")

</div>

Andras and I did some more digging into this issue.

Logged tccd using this command:

> log stream --debug --predicate ‘subsystem == “com.apple.TCC”’

During startup, there is a 50sec window where tccd is presumably checking the application signature:

> 2019-11-13 12:41:30.733517-0500 0x7694f Info 0xa9379 199 0 tccd: [com.apple.TCC:access] adhoc signed StaticCode :0x7fa6d33950e0 START  
> 2019-11-13 12:42:23.224389-0500 0x7694f Info 0xa9379 199 0 tccd: [com.apple.TCC:access] adhoc signed StaticCode :0x7fa6d33950e0 END

This seems to be the main cause of the hang in MacOS 10.14 for many unsigned applications.

Creating an ad-hoc signing with the following command allows Slicer to open without the delay:

> codesign --force --deep -s - /Applications/Slicer.app/Contents/MacOS/Slicer

---

<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 14, 2019, 12:30am UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/38 "2019-11-14T00:30:20Z")

</div>

@che85 @hherhold @pieper could you check if using the codesign command above fixes the temporary system hang for you?

---

<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 20, 2019, 2:30pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/39 "2019-11-20T14:30:38Z")

</div>

Yep - works. (Sorry for slow reply.)

Just tried on 11-18 build, freshly downloaded. Dialog box hang, then did codesign, then dialog box does not hang.

---

<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 20, 2019, 4:16pm UTC](https://discourse.slicer.org/t/extension-wizard-file-open-dialogs-hang-ui-for-several-seconds/7881/40 "2019-11-20T16:16:05Z")

</div>

@jcfr, could we try to do such self-signing with some default (non-trusted) signature? TCC does not seem to delay requests from executables that are at least self-signed.

Self-signing may not work between different computers/users (maybe TCC only accepts self-signed executables from the current user?), but it might worth a try, as it is a simpler process than accessing the official Kitware signing computer.

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

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