sn4k3 / UVtools

MSLA/DLP, file analysis, calibration, repair, conversion and manipulation
GNU Affero General Public License v3.0
1.23k stars 104 forks source link

Problem opening a CXDLP file (Creality Halot Sky) #376

Closed bordermultimedia closed 2 years ago

bordermultimedia commented 2 years ago

System

1. Go to "UVtools -> Help -> About"
2. Click on "Copy information"
3. Paste that infomation bellow this line:
UVtools v2.27.0
Operative system: Microsoft Windows 10.0.19044 X64
Processor: 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz
Processor cores: 16
Memory RAM: 53.24 / 127.88 GB
Runtime: win10-x64
Framework: .NET 5.0.13
AvaloniaUI: 0.10.8
OpenCV: 4.5.4-235

Sreens, resolution, working area, usable area:
1: 3840 x 2160 @ 150% (Primary) (On this)
    WA: 3840 x 2100    UA: 2560 x 1400
2: 1680 x 1050 @ 100%
    WA: 1680 x 1010    UA: 1680 x 1010

Path: C:\Program Files\UVtools

General configuration for OpenCV 4.5.4 =====================================
  Version control:               4.5.4-235-g27567928d7

  Extra modules:
    Location (extra):            D:/bb/cv_x64/build/build_x64/../opencv_contrib/modules
    Version control (extra):     4.5.4-61-gc33e5b60

  Platform:
    Timestamp:                   2021-10-27T09:08:07Z
    Host:                        Windows 10.0.22000 AMD64
    CMake:                       3.21.3
    CMake generator:             Visual Studio 16 2019
    CMake build tool:            C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe
    MSVC:                        1929
    Configuration:               Debug Release MinSizeRel RelWithDebInfo

  CPU/HW features:
    Baseline:                    SSE SSE2 SSE3
      requested:                 SSE3

  C/C++:
    Built as dynamic libs?:      NO
    C++ standard:                11
    C++ Compiler:                C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe  (ver 19.29.30136.0)
    C++ flags (Release):         /DWIN32 /D_WINDOWS /W4 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP  /MD /O2 /Ob2 /DNDEBUG 
    C++ flags (Debug):           /DWIN32 /D_WINDOWS /W4 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP  /MDd /Zi /Ob0 /Od /RTC1 
    C Compiler:                  C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe
    C flags (Release):           /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /MP   /MD /O2 /Ob2 /DNDEBUG 
    C flags (Debug):             /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /MP /MDd /Zi /Ob0 /Od /RTC1 
    Linker flags (Release):      /machine:x64  /INCREMENTAL:NO 
    Linker flags (Debug):        /machine:x64  /debug /INCREMENTAL 
    ccache:                      NO
    Precompiled headers:         YES
    Extra dependencies:          wsock32 comctl32 gdi32 ole32 setupapi ws2_32 D:/bb/cv_x64/build/build_x64/install/lib/freetype.lib D:/bb/cv_x64/build/build_x64/install/lib/harfbuzz.lib D:/bb/cv_x64/build/build_x64/install/lib/libhdf5.lib vtkRenderingOpenGL2 vtkCommonCore vtksys vtkCommonDataModel vtkCommonMath vtkCommonMisc vtkCommonSystem vtkCommonTransforms vtkCommonExecutionModel vtkRenderingCore vtkCommonColor vtkCommonComputationalGeometry vtkFiltersCore vtkFiltersGeneral vtkFiltersGeometry vtkFiltersSources vtkglew vtkInteractionStyle vtkFiltersExtraction vtkFiltersStatistics vtkImagingFourier vtkImagingCore vtkRenderingLOD vtkFiltersModeling vtkIOPLY vtkIOCore vtkdoubleconversion vtklz4 vtklzma vtkzlib vtkFiltersTexture vtkRenderingFreeType vtkfreetype vtkIOExport vtkIOImage vtkDICOMParser vtkmetaio vtkjpeg vtkpng vtktiff vtkIOXML vtkIOXMLParser vtkexpat vtkRenderingContext2D vtkRenderingGL2PSOpenGL2 vtkgl2ps vtkIOGeometry vtkIOLegacy
    3rdparty dependencies:       libprotobuf ade ittnotify libjpeg-turbo libwebp libpng libtiff libopenjp2 IlmImf zlib quirc

  OpenCV modules:
    To be built:                 alphamat aruco barcode bgsegm bioinspired calib3d ccalib core datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hdf hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab viz wechat_qrcode xfeatures2d ximgproc xobjdetect xphoto
    Disabled:                    python_bindings_generator python_tests world
    Disabled by dependency:      -
    Unavailable:                 cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv java julia matlab ovis python2 python3 sfm
    Applications:                perf_tests
    Documentation:               NO
    Non-free algorithms:         NO

  Windows RT support:            NO

  GUI:                           WIN32UI
    Win32 UI:                    YES
    VTK support:                 YES (ver 8.2.0)

  Media I/O: 
    ZLib:                        build (ver 1.2.11)
    JPEG:                        build-libjpeg-turbo (ver 2.1.0-62)
    WEBP:                        build (ver encoder: 0x020f)
    PNG:                         build (ver 1.6.37)
    TIFF:                        build (ver 42 - 4.2.0)
    JPEG 2000:                   build (ver 2.4.0)
    OpenEXR:                     build (ver 2.3.0)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES

  Video I/O:
    DC1394:                      NO
    FFMPEG:                      YES (prebuilt binaries)
      avcodec:                   YES (58.134.100)
      avformat:                  YES (58.76.100)
      avutil:                    YES (56.70.100)
      swscale:                   YES (5.9.100)
      avresample:                YES (4.0.0)
    GStreamer:                   NO
    DirectShow:                  YES
    Media Foundation:            YES
      DXVA:                      YES

  Parallel framework:            Concurrency

  Trace:                         YES (with Intel ITT)

  Other third-party libraries:
    Eigen:                       YES (ver 3.3.7)
    Custom HAL:                  NO
    Protobuf:                    build (3.5.1)

  OpenCL:                        YES (NVD3D11)
    Include path:                D:/bb/cv_x64/build/opencv/3rdparty/include/opencl/1.2
    Link libraries:              Dynamic load

  Python (for build):            C:/python-virt/python37/python.exe

  Java:                          
    ant:                         NO
    JNI:                         C:/Program Files/Java/jdk1.8.0_202/include C:/Program Files/Java/jdk1.8.0_202/include/win32 C:/Program Files/Java/jdk1.8.0_202/include
    Java wrappers:               NO
    Java tests:                  NO

  Install to:                    D:/bb/cv_x64/build/build_x64/install
-----------------------------------------------------------------

Loaded Assemblies:
001: System.Private.CoreLib, Version=5.0.0.0
002: UVtools, Version=2.27.0.0
003: System.Runtime, Version=5.0.0.0
004: Avalonia.DesktopRuntime, Version=0.10.8.0
005: Avalonia.Controls, Version=0.10.8.0
006: netstandard, Version=2.1.0.0
007: Avalonia.Base, Version=0.10.8.0
008: System.ObjectModel, Version=5.0.0.0
009: Avalonia.Styling, Version=0.10.8.0
010: Avalonia.Input, Version=0.10.8.0
011: Avalonia.Interactivity, Version=0.10.8.0
012: Avalonia.Layout, Version=0.10.8.0
013: Avalonia.Visuals, Version=0.10.8.0
014: Avalonia.Animation, Version=0.10.8.0
015: System.ComponentModel.Primitives, Version=5.0.0.0
016: System.Collections, Version=5.0.0.0
017: System.Console, Version=5.0.0.0
018: UVtools.Core, Version=2.27.0.0
019: System.Drawing.Primitives, Version=5.0.0.0
020: System.IO.FileSystem, Version=5.0.0.0
021: MoreLinq, Version=3.3.2.0
022: System.Data.Common, Version=5.0.0.0
023: System.ComponentModel.TypeConverter, Version=5.0.0.0
024: System.ComponentModel, Version=5.0.0.0
025: System.Xml.ReaderWriter, Version=5.0.0.0
026: System.Private.Xml, Version=5.0.0.0
027: System.Numerics.Vectors, Version=5.0.0.0
028: Avalonia.Desktop, Version=0.10.8.0
029: Avalonia.Win32, Version=0.10.8.0
030: Avalonia.MicroCom, Version=0.10.8.0
031: System.Runtime.InteropServices, Version=5.0.0.0
032: System.Collections.Concurrent, Version=5.0.0.0
033: Avalonia.X11, Version=0.10.8.0
034: Avalonia.Native, Version=0.10.8.0
035: Avalonia.Skia, Version=0.10.8.0
036: System.Runtime.InteropServices.RuntimeInformation, Version=5.0.0.0
037: Avalonia.OpenGL, Version=0.10.8.0
038: System.Reactive, Version=5.0.0.0
039: System.Threading, Version=5.0.0.0
040: System.Private.Uri, Version=5.0.0.0
041: System.Linq, Version=5.0.0.0
042: System.Runtime.Extensions, Version=5.0.0.0
043: System.Xml.XDocument, Version=5.0.0.0
044: System.Private.Xml.Linq, Version=5.0.0.0
045: System.Threading.Thread, Version=5.0.0.0
046: System.Memory, Version=5.0.0.0
047: System.Security.Cryptography.Algorithms, Version=5.0.0.0
048: System.Text.Encoding.Extensions, Version=5.0.0.0
049: Microsoft.Win32.Primitives, Version=5.0.0.0
050: SkiaSharp, Version=2.80.0.0
051: System.Diagnostics.TraceSource, Version=5.0.0.0
052: System.Diagnostics.StackTrace, Version=5.0.0.0
053: System.Reflection.Metadata, Version=5.0.0.0
054: System.Collections.Immutable, Version=5.0.0.0
055: System.IO.Compression, Version=5.0.0.0
056: System.IO.MemoryMappedFiles, Version=5.0.0.0
057: System.Threading.Timer, Version=5.0.0.0
058: Avalonia.Markup.Xaml, Version=0.10.8.0
059: Avalonia.Themes.Fluent, Version=0.10.8.0
060: Avalonia.Markup, Version=0.10.8.0
061: System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0
062: ThemeEditor.Controls.ColorPicker, Version=0.10.8.0
063: Avalonia.Controls.DataGrid, Version=0.10.8.0
064: MessageBox.Avalonia, Version=1.0.0.0
065: Emgu.CV.Platform.NetStandard, Version=4.5.4.4788
066: System.Xml.XmlSerializer, Version=5.0.0.0
067: UVtools.AvaloniaControls, Version=1.0.1.0
068: System.Drawing.Common, Version=4.0.0.0
069: System.Linq.Expressions, Version=5.0.0.0
070: System.ComponentModel.Annotations, Version=5.0.0.0
071: System.Reflection.Emit.ILGeneration, Version=5.0.0.0
072: System.Reflection.Primitives, Version=5.0.0.0
073: System.Reflection.Emit.Lightweight, Version=5.0.0.0
074: Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0
075: System.Buffers, Version=5.0.0.0
076: HarfBuzzSharp, Version=1.0.0.0
077: System.Net.Http, Version=5.0.0.0
078: System.Text.RegularExpressions, Version=5.0.0.0
079: Newtonsoft.Json, Version=13.0.0.0
080: System.Net.Primitives, Version=5.0.0.0
081: System.Diagnostics.Tracing, Version=5.0.0.0
082: System.Diagnostics.DiagnosticSource, Version=5.0.0.0
083: System.Net.Security, Version=5.0.0.0
084: System.Security.Cryptography.X509Certificates, Version=5.0.0.0
085: BinarySerializer, Version=8.6.2.0
086: System.Threading.Tasks, Version=5.0.0.0
087: System.Text.Encoding, Version=5.0.0.0
088: System.IO, Version=5.0.0.0
089: System.Reflection.TypeExtensions, Version=5.0.0.0
090: System.Reflection, Version=5.0.0.0
091: System.Reflection.Extensions, Version=5.0.0.0
092: System.Net.Sockets, Version=5.0.0.0
093: System.Net.NameResolution, Version=5.0.0.0
094: System.Threading.Tasks.Parallel, Version=5.0.0.0
095: System.Security.Cryptography.Primitives, Version=5.0.0.0
096: System.Collections.NonGeneric, Version=5.0.0.0
097: System.Security.Principal.Windows, Version=6.0.0.0
098: System.Security.Claims, Version=5.0.0.0
099: System.Security.Principal, Version=5.0.0.0
100: System.Security.Cryptography.Encoding, Version=5.0.0.0
101: System.Runtime.Numerics, Version=5.0.0.0
102: Microsoft.Win32.Registry, Version=6.0.0.0

Describe the bug

Error when opening the CXDLP file: "System.OverflowException: Arithmetic operation resulted in an overflow. at UVtools.Core.FileFormats.CXDLPFile.DecodeInternally(OperationProgress progress) in D:\Tiago\Dropbox\Programming\C#\UVtools\UVtools.Core\FileFormats\CXDLPFile.cs:line 894 at UVtools.Core.FileFormats.FileFormat.Decode(String fileFullPath, FileDecodeType fileDecodeType, OperationProgress progress) in D:\Tiago\Dropbox\Programming\C#\UVtools\UVtools.Core\FileFormats\FileFormat.cs:line 2647 at UVtools.WPF.MainWindow.<>c__DisplayClass104_0.b__1() in D:\Tiago\Dropbox\Programming\C#\UVtools\UVtools.WPF\MainWindow.axaml.cs:line 1564"

Not sure if it's related to the size of the file, or some error from Lychee, the file has also had problems when printing, but it could be a coincidence.

To Reproduce

Steps to reproduce the behavior:

  1. Export a CXDLP file using Lychee and Creality Halot Sky as the printer
  2. Open the file with UV tools
  3. The error message appears

Expected behavior

File being opened

Screenshots

image

Files

Ive tried a couple of files, this is one of them, using no supports: soportes-tapas.zip This was the output: test.zip

Exceptions Log file

No log file was generated

Additional context

I have no problems when generating and opening files for my Phrozen Sonic Mini

sn4k3 commented 2 years ago

Lychee slicer is outputing new file version. Does it print if you attempt to?

sn4k3 commented 2 years ago

Fixed