pro3d-space / PRo3D

PRo3D, short for Planetary Robotics 3D Viewer, is an interactive 3D visualization tool allowing planetary scientists to work with high-resolution 3D reconstructions of planetary surfaces.
http://pro3d.space/
GNU Affero General Public License v3.0
38 stars 2 forks source link

Filesystem issues under Linux #343

Open swalterfub opened 1 year ago

swalterfub commented 1 year ago

Generally runs nicely under Linux, but I noticed some features seem not to work and according to Chris they are related to the filesystem.

I'm using PRo3D.Viewer-4.12.0-prerelease9-x86_64_1b79941bf0efcf816bd07e83701768c1.AppImage und Ubuntu 22.04

uname -a gives me: Linux precision 5.19.17-051917-generic #202210240939 SMP PREEMPT_DYNAMIC Mon Oct 24 09:43:01 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Here are the messages from the console: PickExploreCenter

9:           ERROR
 9:             [media] update function failed with: System.IO.DirectoryNotFoundException: Could not find a part of the path '/home/user/Pro3D-Workshop/M20/0800/0822/Job_0822_8839-110-rad/result/ZCAM-0822-ZCAM08839-R-RAD-ALL-110-OPC-MULTI-SPHR-20230624/ZCAM-0822-ZCAM08839-R-RAD-ALL-110-OPC-MULTI-SPHR-20230624_000_000/patches/05-Patch-00001~0187/00-Patch-00207~0131-0.aakd'.
 9:                at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
 9:                at Interop.CheckIo(Error error, String path, Boolean isDirectory, Func`2 errorRewriter)

log:  9:                at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
 9:                at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
 9:                at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
 9:                at System.IO.File.OpenRead(String path)
 9:                at Aardvark.VRVis.Opc.KdTrees.loadKdtree(String path)
 9:                at PRo3D.Core.Surface.DebugKdTreesX.loadObjectSet(FSharpHashMap`2 cache, Level0KdTree lvl0Tree)
 9:                at PRo3D.Core.Surface.DebugKdTreesX.intersectKdTrees(Box3d bb, Surface hitObject, FSharpHashMap`2 cache, FastRay3d ray, FSharpHashMap`2 kdTreeMap)
 9:                at PRo3D.Core.Surface.SurfaceIntersection.doKdTreeIntersection@226-6.Invoke(Box3d key)
 9:                at PRo3D.Core.Surface.SurfaceIntersection.doKdTreeIntersection@193-4.Invoke(Tuple`2 tupledArg)
 9:                at Microsoft.FSharp.Primitives.Basics.List.choose[T,TResult](FSharpFunc`2 f, FSharpList`1 xs) in D:\a\_work\1\s\src\fsharp\FSharp.Core\local.fs:line 189
 9:                at PRo3D.Core.Surface.SurfaceIntersection.doKdTreeIntersection(SurfaceModel m, ReferenceSystem refSys, FastRay3d r, FSharpFunc`2 filterSurface, FSharpHashMap`2 cache)
 9:                at PRo3D.ViewerApp.updateViewer$cont@926-18(BlockingCollection`1 sendQueue, Model m, String name, FastRay3d fray, Ray3d r, Int32 rayHash, Unit unitVar)
 9:                at PRo3D.ViewerApp.updateViewer$cont@419(IRuntime runtime, IFramebufferSignature signature, BlockingCollection`1 sendQueue, FSharpMailboxProcessor`1 mailbox, Model m, ViewerAction msg, Boolean matchValue_2, Unit unitVar)

log:  9:                at PRo3D.ViewerApp.updateViewer(IRuntime runtime, IFramebufferSignature signature, BlockingCollection`1 sendQueue, FSharpMailboxProcessor`1 mailbox, Model m, ViewerAction msg)
 9:                at PRo3D.ViewerApp.updateWithProvenanceTracking(IRuntime runtime, Boolean enableProvenance, IFramebufferSignature signature, BlockingCollection`1 sendQueue, FSharpMailboxProcessor`1 mailbox, Model m, ViewerAnimationAction msg)
 9:                at PRo3D.ViewerApp.start@2057-3.Invoke(Model m, ViewerAnimationAction msg)
 9:                at <StartupCode$Aardvark-UI>.$App.doit@72-2.Invoke(Unit unitVar0)

Save Scene:

9:             [media] update function failed with: System.UnauthorizedAccessException: Access to the path '/home/user/Pro3D-Workshop/test2' is denied.
 9:              ---> System.IO.IOException: Permission denied
 9:                --- End of inner exception stack trace ---
 9:                at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
 9:                at Interop.CheckIo(Error error, String path, Boolean isDirectory, Func`2 errorRewriter)
 9:                at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
 9:                at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
 9:                at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
 9:                at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)

log:  9:                at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
 9:                at System.IO.File.WriteAllText(String path, String contents)
 9:                at PRo3D.ViewerIO.saveEverything$cont@304(String path, Model m, Unit unitVar)
 9:                at PRo3D.ViewerIO.saveEverything(String path, Model m)
 9:                at PRo3D.ViewerApp.updateViewer$cont@419(IRuntime runtime, IFramebufferSignature signature, BlockingCollection`1 sendQueue, FSharpMailboxProcessor`1 mailbox, Model m, ViewerAction msg, Boolean matchValue_2, Unit unitVar)
 9:                at PRo3D.ViewerApp.updateViewer(IRuntime runtime, IFramebufferSignature signature, BlockingCollection`1 sendQueue, FSharpMailboxProcessor`1 mailbox, Model m, ViewerAction msg)
 9:                at PRo3D.ViewerApp.updateWithProvenanceTracking(IRuntime runtime, Boolean enableProvenance, IFramebufferSignature signature, BlockingCollection`1 sendQueue, FSharpMailboxProcessor`1 mailbox, Model m, ViewerAnimationAction msg)
swalterfub commented 1 year ago

Drawing annotation also doesn't work and throws this error:

ERROR
 7:                           [media] update function failed with: System.IO.DirectoryNotFoundException: Could not find a part of the path '/home/user/Pro3D-Workshop/M20/0800/ZCAM-0821-ZCAM08837-L-RAD-ALL-110-OPC-MULTI-SPHR-20230619/ZCAM-0821-ZCAM08837-L-RAD-ALL-110-OPC-MULTI-SPHR-20230619_000_000/patches/00-Patch-00154~0102/Positions.aara'
[...]
haraldsteinlechner commented 1 year ago

Hi,

thanks for the detailled descriptions. This all boils down to unconsistencies when scanning OPCs. It is concerned with "patches" vs "Patches" in the file system. I've tried to fix this recently, yet i just found other spots where this problem persists.

I will re-work the hole path construction scheme on various places.

Thanks again, Harald

Seealso: https://github.com/pro3d-space/PRo3D/issues/75 and https://github.com/pro3d-space/PRo3D/issues/62