Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading files from gvfs volumes fails invisibly #1044

Closed
mqudsi opened this issue Oct 6, 2023 · 8 comments
Closed

Loading files from gvfs volumes fails invisibly #1044

mqudsi opened this issue Oct 6, 2023 · 8 comments

Comments

@mqudsi
Copy link

mqudsi commented Oct 6, 2023

Describe the bug

f3d fails to load any files from a gvfs-mounted volume.

To Reproduce

Steps to reproduce the behavior:
0. Mount a folder via gvfs under a gnome-based Linux distribution; for example, under Ubuntu 23.04, mount an SMB folder containing an stl file and then attempt to open that path with f3d.

  1. Open the file using f3d --dry-run "/run/user/1000/gvfs/smb-share:server=freebsd.local,share=general/cnc/Pill Bottle Cap/Normal Cap v7.stl"
  2. f3d opens, looks like everything is fine, but no file is loaded. If the command was executed from the terminal, the following output is logged to stderr:
File /run/user/1000/gvfs/smb-share:server=freebsd.local does not exist
File /home/mqudsi/share=general/cnc/Pill Bottle Cap/Normal Cap v7.stl does not exist

Expected behavior

f3d should actually succeed in opening the file

System Information:

  • OS: Ubuntu 23.04
  • GPU and GPU driver: N/A

F3D Information
Paste the content of f3d --version:

f3d 1.3.1

F3D - A fast and minimalist 3D viewer
Version: 1.3.1.
Build date: 2022-11-06 13:17:51.
Build system: Linux.
Compiler: GNU 12.2.0.
External rendering module: OFF.
Raytracing module: OFF.
Exodus module: ON.
OpenCASCADE module: 7.6.3 (full support).
Assimp module: 5.2.4.
Alembic module: OFF.
VTK version: 9.1.0 (build 0).
Copyright (C) 2019-2021 Kitware SAS.
Copyright (C) 2021-2022 Michael Migliore, Mathieu Westphal.
License BSD-3-Clause.
By Michael Migliore, Mathieu Westphal and Joachim Pouderoux.

Additional context

Regular Linux apps can see the file without taking any special actions to account for gvfs file path:

mqudsi@ZBook ~> file "/run/user/1000/gvfs/smb-share:server=freebsd.local,share=general/cnc/Pill Bottle Cap/Normal Cap v7.stl"
/run/user/1000/gvfs/smb-share:server=freebsd.local,share=general/cnc/Pill Bottle Cap/Normal Cap v7.stl: data
mqudsi@ZBook ~> f3d "/run/user/1000/gvfs/smb-share:server=freebsd.local,share=general/cnc/Pill Bottle Cap/Normal Cap v7.stl"
File /run/user/1000/gvfs/smb-share:server=freebsd.local does not exist
File /home/mqudsi/share=general/cnc/Pill Bottle Cap/Normal Cap v7.stl does not exist
@mwestphal
Copy link
Contributor

I've yet to test on a gvfs volume but even simple special path like ~/file.ext are not supported, to be investigated and fixed.

@mwestphal
Copy link
Contributor

nevermind, ~/file.ext works fine.

In our case, the , means that cxxopts parse it as two separate arguments. Sadly there is no fix yet, but the issue is logged in their repo already: jarro2783/cxxopts#228

@mwestphal
Copy link
Contributor

Of course, a workaround on your side will be to create a symbolink link to this gvfs folder somewhere, but you probably already know that. Leaving this open until upstream fixes it (or we switch to another framework for handling options, see #434 )

@Meakk
Copy link
Member

Meakk commented Oct 8, 2023

I don't think f3d ~/file.ext works. It's probably expanded by your shell before reaching f3d.
If you try f3d "~/file.ext" I don't think it works.

@mwestphal mwestphal removed this from the 2.3.0 milestone Oct 9, 2023
@mwestphal
Copy link
Contributor

Correct, but that is another issue: #1042

Let's open it again

@mwestphal
Copy link
Contributor

@snoyer this is now fixed right ?

@snoyer
Copy link
Contributor

snoyer commented Dec 3, 2023

As far as I can tell:

  • The failure from the OP looks exactly like the splitting on spaces/commas issue so that should be fixed
  • The gvfs aspect is likely unrelated (should be an OS-level thing though and transparent to F3D now that the filenames are correctly handled I would hope) but I've not tested it myself
  • the "~/file.ext" not relevant according to Non standard paths are not correctly supported when inside quotes #1042

So unless the gvfs stuff needs double checking just in case you should be able to close this issue

@mwestphal
Copy link
Contributor

I agree. @mqudsi , please test again with the last nightly:
https://github.com/f3d-app/f3d/releases/tag/nightly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants