cnr-isti-vclab / meshlab

The open source mesh processing system
http://www.meshlab.net
GNU General Public License v3.0
4.69k stars 820 forks source link

[FlatPak] Cannot open meshes from external disk #1103

Open removcik opened 2 years ago

removcik commented 2 years ago

Hello Meshlab Developers,

MeshLab 2021.07 and 2021.05, Linux

I have issue when I'm trying to open project or .ply file, which was exported from version 2021.05, in version 2021.07. They can't be opened it look like there are no backward compatibility.

Data are in zip. files.zip

alemuntoni commented 2 years ago

It is not a compatibility problem. The mlp file you shared links to a file that is not provided into the archive (../vitrazovani/hlavni_oltar/mesh_8_hlavni_oltar.ply). It can't be opened both on 2021.05 and 2021.07. The ply file can be opened as expected both on 2021.05 and 2021.07.

removcik commented 2 years ago

Hello Meshlab Developers,

MeshLab 2021.07

I found that, there is no problem with compatibility, but there is problem when I'm trying open a mesh with texture from second disk (disk which doesn't contain OS). When I open the same mesh with texture on main disk(disk with OS) it will open. So I think there is problem with processing path maybe? files.zip

alemuntoni commented 2 years ago

I cannot replicate the issue. Does the entire mesh fails to load, or just the texture? Are you using the FlatPak version or the AppImage? In the first case, could be just some permission issues of the flatpak.

removcik commented 2 years ago

I'm using a FlatPak and on load the message is: "The following textures have not been loaded: hlavni_oltar.jpg"

alemuntoni commented 2 years ago

Ok, could you please try the AppImage version with the same mesh? Just to understand if the issue regards meshlab or the permissions of the flatpak...

removcik commented 2 years ago

I opened it on AppImage, so maybe it is something with flatpak?

alemuntoni commented 2 years ago

Yes, could be something related with permissions. Are you able to load meshes without textures from the external partition? What is the file system of the partition?

removcik commented 2 years ago

In flatpak i can open only meshes without texture and the file system of partition is ext3/ext4

alemuntoni commented 2 years ago

@kevinsmia1939 do you have an idea why this is happening? I just tried to open a file from a ntfs partition and it fails opening it.

About the textures, it should be a bug that has been already solved and will be available in the next version.

removcik commented 2 years ago

Ok, thanks for help. and wish you nice weekend

kevinsmia1939 commented 2 years ago

@alemuntoni @removcik Hi, could you try running meshlab with permission to all file? flatpak --filesystem=host run net.meshlab.MeshLab

alemuntoni commented 2 years ago

Works fine if run with permission to all file. Is it for flatpak policy that the option is not enabled by default?

kevinsmia1939 commented 2 years ago

Works fine if run with permission to all file. Is it for flatpak policy that the option is not enabled by default?

It is advice to use permission as needed rather than give it all. But if we really need them, I can do that. Should we do this by default? Also, the idea is that the app must use portal, if use properly, the portal dialog will popup asking the user what and where to do something.

alemuntoni commented 2 years ago

From my point of view there should be something that automatically allows to enable it. Loading files from a different filesystem is quite common (e.g. big mesh files loaded from external disk).

I had a quick look to portal, but I don't think I'll be able to implement this by the end of the month (I would like to release 2021.10 version).. Right now it is not clear to me:

kevinsmia1939 commented 2 years ago

@alemuntoni The app can see if it is in flatpak sandbox by looking for .flatpak-info file under / If it run this command for example. ls -la / there will be .flatpak-info

aryez91 commented 2 years ago

I hope this belongs here,

I'm having a similar problem on Windows 11. Meshlab 2021.07

When mlp and ply files are both on secondary drive, opening a project would fail and display an error:

Meshlab Opening Error

../6_4/6_4_scan/merges/A.ply mesh file not found.

While both files on the OS partition, it works fine.

alemuntoni commented 2 years ago

@aryez91 nope, this is a different issue. Flatpak is a package for linux. Are you sure that the file actually exists and the path is correct w.r.t. the position of the mlp file? I tried a small example on a different partition and I failed to reproduce the issue. Maybe if you could share a zip containing a reproducible example would be better (in a new issue :) )

gachiemchiep commented 2 months ago

Bumped into this problem today. I wrote detail how to solve it here.

  1. Get meshlab from flatpak
  2. start MeshLab from terminal using flatpak --filesystem=host run net.meshlab.MeshLab allow "openning meshes from external disk"
  3. create a new shortcut on Main Menu for MeshLab using Alacarte like this need to check the "Launch in Terminal?" image

And you're good to go

kevinsmia1939 commented 2 months ago

@gachiemchiep @alemuntoni @removcik Then I think I should allow host access for now. Since it has many user who need this.

gachiemchiep commented 2 months ago

@kevinsmia1939 please sir. switch it on by default.

alemuntoni commented 2 months ago

Yep @kevinsmia1939, I agree.

kevinsmia1939 commented 2 months ago

--filesystem=host has been add in https://github.com/flathub/net.meshlab.MeshLab/pull/103

kevinsmia1939 commented 2 months ago

@gachiemchiep @removcik Let me know if latest update works.