tomviz icon indicating copy to clipboard operation
tomviz copied to clipboard

File -> open data | no dialog box | macOS

Open choROPeNt opened this issue 7 months ago • 14 comments

Describe the bug

downloaded the latest stable release for macOS today. Installed it via *.dmg. Can run it, but can't open any data. When I try to access File -> Open Data or shortcut cmd+o, no dialog box appears.

App also crashes when I try to get Tomviz -> about to get version number

Desktop (please complete the following information):

  • Operating system: macos 15.4.1 (24E263)
  • Tomviz version: 1.10.0

Hardware (please complete the following information):

  • Device: MacBook 16" 2021 M1 Pro

choROPeNt avatar Apr 23 '25 16:04 choROPeNt

Can you try installing the latest from conda-forge (you'll have to create a conda environment and conda install -c conda-forge tomviz)?

The Tomviz 1.10.0 binaries are old and I've had more success with the conda-forge ones.

psavery avatar Apr 24 '25 20:04 psavery

Hi many thanks for your answer. Unfortunately, conda can't find anything in the channel conda-forge:

(tomviz) ➜  ~ conda install -c conda-forge tomviz
Channels:
 - conda-forge
 - defaults
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - tomviz

Current channels:

  - https://conda.anaconda.org/conda-forge
  - defaults

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

I used miniconda and python 3.11.7

choROPeNt avatar Apr 25 '25 07:04 choROPeNt

Ah yes... we don't have any arm64 packages yet for Apple silicon 🙁

psavery avatar Apr 25 '25 12:04 psavery

Just updated to MacOS 15.5 from some 14 version, and open data doesn't open a finder window anymore as well. Also on Apple silicon.

cedriclim1 avatar Jun 06 '25 00:06 cedriclim1

We're hoping to have some more funding to continue supporting Tomviz very soon. Once we update dependencies and the build system, things should be working better.

I think we saw that issue with the file dialog on Apple Silicon for other projects too, and I believe there's a flag we can pass to get it to work again.

psavery avatar Jun 06 '25 14:06 psavery

That's unfortunate :(.

Is there a potential quick work around that I can do? Using tomviz is quite important for my research.

cedriclim1 avatar Jun 06 '25 18:06 cedriclim1

Did you try both the DMG and the conda-forge package?

You may be able to compile from source, and I can show you where to pass that flag. Let me know if you want to try to go down that route.

psavery avatar Jun 06 '25 18:06 psavery

Yes, the current install I have is using the Tomviz-latest.dmg. Similar to the @choROPeNt, I run into a similar issue:

Retrieving notices: ...working... done
Channels:
 - conda-forge
 - defaults
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - tomviz

Current channels:

  - https://conda.anaconda.org/conda-forge
  - defaults

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

And yes if possible could you show me where to pass that flag, and how to compile it from source? If it's easier for you, happy to do this over zoom (email at [email protected])

cedriclim1 avatar Jun 06 '25 18:06 cedriclim1

It looks like you might actually be able to set an environment variable, like QT_QPA_PLATFORMTHEME=none, in order to force Qt to not use native file dialogs. That might actually work, let me know if it does.

What I think you'd need to do to use tomviz from anaconda is to download the miniconda "Intel Chip" installer from the miniconda website (even though yours is Apple Silicon), and unpack that "Intel Chip" installation for miniconda somewhere. You then activate that environment and install tomviz. I believe that should work.

Compiling Tomviz may be challenging, especially since the build instructions are likely out of date, but you would try to follow the instructions here.

If you can compile it and run, then in the source code, somewhere around here, you can set dialog.setOption(QFileDialog::DontUseNativeDialog, true);.

I didn't test that myself, but I believe that ought to work. I really do hope we get more support soon to continue work on this project, as it is indeed a wonderful project.

psavery avatar Jun 06 '25 18:06 psavery

It looks like you might actually be able to set an environment variable, like QT_QPA_PLATFORMTHEME=none, in order to force Qt to not use native file dialogs. That might actually work, let me know if it does.

This worked! Thank you so much.

Hopefully there will be a much more general fix in the future.

cedriclim1 avatar Jun 06 '25 18:06 cedriclim1

Awesome! @choROPeNt, maybe you should try that too?

psavery avatar Jun 06 '25 18:06 psavery

Hi there,

Method 1

@cedriclim1 @psavery Yes, running from terminal with QT_QPA_PLATFORMTHEME=none /Applications/Tomviz.app/Contents/MacOS/tomviz does the trick by now 🚀

Method 2 @psavery I attempted the workaround using Miniconda (x86) under Rosetta. While the installation went fine, launching the Tomviz app takes an extremely long time and seems to hang.

Steps I followed: • Started the Terminal using Rosetta and confirmed with:

uname -m

Output: x86_64 • Installed and configured Miniconda:

bash Miniconda3-latest-MacOSX-x86_64.sh -p ~/miniconda3_intel
source ~/miniconda3_intel/bin/activate
conda create -n tomviz_env tomviz
conda activate tomviz_env
tomviz

However, when launching tomviz, the application takes ages to start and never opens. I had to force quit it.

choROPeNt avatar Jun 24 '25 16:06 choROPeNt

Nice!

Yeah unfortunately using Rosetta does have a performance cost. It sounds like sometimes it can be a big performance cost. But I'm glad Method 1 worked!

psavery avatar Jun 25 '25 02:06 psavery

Hi actually the app didn't start within three minutes and had 1 core occupied using Rosetta. However was impatient and forced to quit it. Will give it another try with more patience.

choROPeNt avatar Jun 25 '25 06:06 choROPeNt