SHADERed icon indicating copy to clipboard operation
SHADERed copied to clipboard

Opening files on mounted drives is impossible (Ubuntu)

Open chickenSandwich opened this issue 3 years ago • 4 comments

My shaders are all located on a mounted drive, and I am not able to open the files.

For example: /media/username/project_folder

chickenSandwich avatar Mar 30 '21 17:03 chickenSandwich

Does it throw an error, crash or something? Or does it just not let you open the shaders (as in nothing happens)? I'll need some more info.

dfranx avatar Apr 02 '21 14:04 dfranx

SHADERed v1.4.3 (Flatpak) [Pop!_OS 20.04 LTS] Steps to reproduce:

  1. Open a project file from a mounted drive ( /media/username/project_folder/project.sprj )
  • Open SHADERed
  • Click File -> Open
  • Choose the root ( the left-most / )
    • Of the directories listed, none are to mount points
  • In the File name field, manually add the absolute path to a project file (located on a mounted drive)
    • Observed:
      • Nothing happens.
  1. Create a shader pass, and try to add a shader ( /media/username/project_folder/shader.vert )
  • Open SHADERed
  • Right-click in Objects pane and choose: Create Shader Pass
  • In the Vertex shader path field click the ... (ellipse)
  • Choose the root (the left-most / )
    • Once again, of the directories listed, none are to mount points
  • In the File name field, manually add the absolute path to a shader file (located on a mounted drive)
    • Observed:
      • Vertex shader path contains the file path: ../../../../../media/username/project_folder/shader.vert
      • In the Preview window a red error message is displayed: Can not display preview - there are some errors you should fix.
      • In the Output pane, the Message column contains a red error message: Vertex shader file doesnt exist
  1. A most unusual behavior:
  • Open SHADERed
  • Observe the default project opens with a colored cube.
  • Click File -> Save as
  • In the File name field type an absolute path to a mounted drive: /media/username/project_folder/test_proj.sprj
  • Observed:
    • No error messages, window title changed to: SHADERed (test_proj.sprj)
    • Open a terminal and list the files/folders at the location specified: ls /media/username/project_folder -hal
      • Error: no such file or directory
    • (Now here's the really strange bit)
      • Click File Open
      • Observe the Open SHADERed project file dialog indicates the current location as: /media/username/project_folder
      • Listed is a [FILE] entry for the project that you saved, and a [DIR] entry for shaders which contains two files: test_proj_SimpleVS.glsl and test_proj_SimplePS.glsl
      • Attempt to find any of the files has no results
      • Try to open a different project and the folder is there for you to navigate
      • Click File -> Open project directory and nothing happens
      • You can edit the shaders, and they will look as though they are being saved
      • Close and re-open SHADERed and the folder/files are no where to be found

I realize there is a lot of detail (maybe too much), but if there's anything else that you need, let me know.

chickenSandwich avatar Apr 02 '21 15:04 chickenSandwich

Thank you for the detailed steps on how to reproduce the issue. It turns out that in order to write to the /media/... directory, SHADERed needs to be run using sudo. Not sure if I can fix this on my end.

dfranx avatar Apr 04 '21 13:04 dfranx

Thanks... Since this is the Flatpak install, running with sudo is problematic ( https://github.com/flatpak/flatpak/issues/3963 ) at this time.

chickenSandwich avatar Apr 04 '21 13:04 chickenSandwich