sn4k3 / UVtools

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

[Bug] UVTool freezing up when attempting prep file for new printer #883

Closed c4box closed 3 months ago

c4box commented 3 months ago

System

UVtools v4.3.2 X64
Operative system: Microsoft Windows 10.0.22631 X64
Graphic card: 
Processor: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Processor cores: 8
Memory RAM: 2.96 / 7.84 GB
Runtime: win10-x64
Framework: .NET 6.0.29
AvaloniaUI: 11.0.10
OpenCV: 4.8.1

Path:       C:\Program Files\UVtools\
Executable: C:\Program Files\UVtools\UVtools.exe
Loaded file: dreadpod_doorhinge.goo [Version: 0] [Class: GooFile]

Printer and Slicer

Description of the bug

System.AggregateException: One or more errors occurred. (OpenCV: Failed to allocate 45028542 bytes) (OpenCV: Failed to allocate 53104635 bytes) (OpenCV: Failed to allocate 58982400 bytes) (OpenCV: Failed to allocate 220006492 bytes) (OpenCV: Failed to allocate 58380556 bytes) (OpenCV: Failed to allocate 58982400 bytes) (OpenCV: Failed to allocate 58982400 bytes) (OpenCV: Failed to allocate 55033659 bytes) (OpenCV: Failed to allocate 48944547 bytes) ---> Emgu.CV.Util.CvException: OpenCV: Failed to allocate 45028542 bytes at Emgu.CV.CvInvoke.cveFindContours(IntPtr image, IntPtr contours, IntPtr hierarchy, RetrType mode, ChainApproxMethod method, Point& offset) at Emgu.CV.CvInvoke.FindContours(IInputOutputArray image, IOutputArray contours, IOutputArray hierarchy, RetrType mode, ChainApproxMethod method, Point offset) at UVtools.Core.Extensions.EmguExtensions.FindContours(IInputOutputArray mat, Int32[,]& hierarchy, RetrType mode, ChainApproxMethod method, Point offset) in UVtools.Core\Extensions\EmguExtensions.cs:line 2256 at UVtools.Core.Managers.IssueManager.<>cDisplayClass18_2.b9(Int64 layerIndexInt) in UVtools.Core\Managers\IssueManager.cs:line 651 at System.Threading.Tasks.Parallel.<>cDisplayClass20_0`1.b1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) --- End of stack trace from previous location --- at System.Threading.Tasks.Parallel.<>cDisplayClass20_01.<ForWorker64>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica.Execute() --- End of inner exception stack trace --- at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction1 action, ParallelOptions options, Boolean stopOnFirstFailure) at System.Threading.Tasks.Parallel.ForWorker64[TLocal](Int64 fromInclusive, Int64 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally) --- End of stack trace from previous location --- at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection exceptions, CancellationToken cancelToken, Exception otherException) at System.Threading.Tasks.Parallel.ForWorker64[TLocal](Int64 fromInclusive, Int64 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.For(Int64 fromInclusive, Int64 toExclusive, ParallelOptions parallelOptions, Action`1 body) at UVtools.Core.Managers.IssueManager.DetectIssues(IssuesDetectionConfiguration config, OperationProgress progress) in UVtools.Core\Managers\IssueManager.cs:line 237 at UVtools.UI.MainWindow.<>c__DisplayClass191_0.b0() in UVtools.UI\MainWindow.Issues.cs:line 609

How to reproduce

  1. Open UVTool,
  2. Open file,
  3. attempt to detect errors,
  4. Error (after about 10-15 min of loading)

Files

No response

github-actions[bot] commented 3 months ago

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! 🙌

sn4k3 commented 3 months ago

This is a RAM problem. Either upgrade your RAM, increase SWAP or allocate less UVtools threads in settings (Under Tasks).