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.
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.
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.
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).
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?
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.
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.
@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 and Skyrim.
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.
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. 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.
@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?
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.
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).
@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!
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.
@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).
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…)