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

[Bug] Error when opening file - Emgu.CV.Util.CvException: OpenCV: !_src.empty() #912

Closed
VasilNikolov opened this issue Aug 11, 2024 · 9 comments
Assignees

Comments

@VasilNikolov
Copy link

System

UVtools v4.4.0 X64
Operative system: Microsoft Windows 10.0.22621 X64
Processor: AMD Ryzen 5 1600 Six-Core Processor            
Processor cores: 12
Memory RAM: 7.78 / 15.95 GB
Runtime: win10-x64
Framework: .NET 6.0.32
AvaloniaUI: 11.1.1
OpenCV: 4.9.0

Sreens, resolution, working area, usable area:
1: 3840 x 2160 @ 150% (Primary) (On this)
    WA: 3840 x 2088    UA: 2560 x 1392

Path:       C:\Users\vasil\Downloads\UVtools_win-x64_v4.4.0\
Executable: C:\Users\vasil\Downloads\UVtools_win-x64_v4.4.0\UVtools.exe

Printer and Slicer

  • Printer:
  • Slicer: Prusaslicer 2.7.3

Description of the bug

The following error message appears when opening the file on linux and windows environments:

Emgu.CV.Util.CvException: OpenCV: !_src.empty()
at Emgu.CV.CvInvoke.CvErrorHandler(Int32 status, IntPtr funcName, IntPtr errMsg, IntPtr fileName, Int32 line, IntPtr userData)
at Emgu.CV.CvInvoke.cveCvtColor(IntPtr src, IntPtr dst, ColorConversion code, Int32 dstCn)
at Emgu.CV.CvInvoke.CvtColor(IInputArray src, IOutputArray dst, ColorConversion code, Int32 dstCn)
at UVtools.Core.FileFormats.FileFormat.SanitizeThumbnails(Boolean trimToFileSpec) in UVtools.Core\FileFormats\FileFormat.cs:line 4246
at UVtools.Core.FileFormats.FileFormat.Decode(String fileFullPath, FileDecodeType fileDecodeType, OperationProgress progress) in UVtools.Core\FileFormats\FileFormat.cs:line 4578
at UVtools.UI.MainWindow.<>c__DisplayClass97_0.b__2() in UVtools.UI\MainWindow.axaml.cs:line 1432

How to reproduce

Open UVTools and import the file in the attached zip. A progress bar is shown of the loading, after which the error occurs.

Files

test.zip

Copy link

This is your first time submitting an issue with UVtools 🥳Please review your issue and ensure that the submit template was followed, the information is complete, and not related to any other open issue. It will be reviewed shortly. Debugging is very important and make the program better. Thanks for contributing and making the software better! 🙌

@VasilNikolov
Copy link
Author

Version 4.3.2 breaks too...

@sn4k3
Copy link
Owner

sn4k3 commented Aug 11, 2024

Looks like all PNG's on your file are black/empty. Any reason why?

@VasilNikolov
Copy link
Author

Will investigate... this is the source stl.
test.zip

@sn4k3
Copy link
Owner

sn4k3 commented Aug 11, 2024

Your file is all messed up. Try to resclice.
The error is due all black layers and it try to generate thumbnail from empty layer.
image

@VasilNikolov
Copy link
Author

How can I open the files to check if there are any valid layers?

@VasilNikolov
Copy link
Author

I think it makes sense to not break the execution and still open the file in order to inspect it. Besides it has all the other properties from the slicer like time estimates, etc...

@sn4k3
Copy link
Owner

sn4k3 commented Aug 12, 2024

It will be fixed on next patch.
To open the file you must do it manually, by open the .sl1 as ZIP and inspect files.

sn4k3 added a commit that referenced this issue Aug 19, 2024
- (Add) Pixel Editor: Fill tool and merge into Erase section, left click fills and right click erases
- (Improvement) SL1: Implement missing material override properties
- (Fix) File formats: Error while trying to generate a thumbnail for a file that have a empty first layer (#912)
- (Upgrade) AvaloniaUI from 11.1.1 to 11.1.3
- (Upgrade) .NET from 6.0.32 to 6.0.33
@sn4k3
Copy link
Owner

sn4k3 commented Aug 19, 2024

Fixed

@sn4k3 sn4k3 closed this as completed Aug 19, 2024
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

2 participants