sn4k3 / UVtools

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

[Bug] UVTools 4.3.1 - System.AggregateException When running 'Detect' function #869

Closed mjf55 closed 3 months ago

mjf55 commented 3 months ago

System

UVtools v4.3.1 X64
Operative system: Microsoft Windows 10.0.22631 X64
Processor: 12th Gen Intel(R) Core(TM) i7-1255U
Processor cores: 12
Memory RAM: 9.73 / 15.69 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: ox-fixed-final.ctb [Version: 4] [Class: CTBEncryptedFile]

Running on Windows 11.  Dell Inspiron 14 laptop.

Printer and Slicer

Description of the bug

Open the Lychee sliced CTB file in UVTools 4.3.1. Code runs and automatically detects an empty layer. Then I press 'Detect' and the following pop-up pops up. instantly. NOTE: Everything works fine in UVTools 4.3.0. Used the same file. I uninstalled previous versions switching between 4.3.0 <-> 4.3.1

System.AggregateException: One or more errors occurred. (Index was outside the bounds of the array.) (Index was outside the bounds of the array.) (Index was outside the bounds of the array.) (Index was outside the bounds of the array.) (Index was outside the bounds of the array.) (Index was outside the bounds of the array.) (Index was outside the bounds of the array.) (Index was outside the bounds of the array.) (Index was outside the bounds of the array.) ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at UVtools.Core.Managers.IssueManager.<>cDisplayClass18_2.b9(Int64 layerIndexInt) in UVtools.Core\Managers\IssueManager.cs:line 239 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 ---> (Inner Exception #1) System.IndexOutOfRangeException: Index was outside the bounds of the array. at UVtools.Core.Managers.IssueManager.<>cDisplayClass18_2.b9(Int64 layerIndexInt) in UVtools.Core\Managers\IssueManager.cs:line 239 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.<>c__DisplayClass20_0`1.b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica.Execute()<---

---> (Inner Exception #2) System.IndexOutOfRangeException: Index was outside the bounds of the array. at UVtools.Core.Managers.IssueManager.<>cDisplayClass18_2.b9(Int64 layerIndexInt) in UVtools.Core\Managers\IssueManager.cs:line 239 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.<>c__DisplayClass20_0`1.b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica.Execute()<---

---> (Inner Exception #3) System.IndexOutOfRangeException: Index was outside the bounds of the array. at UVtools.Core.Managers.IssueManager.<>cDisplayClass18_2.b9(Int64 layerIndexInt) in UVtools.Core\Managers\IssueManager.cs:line 239 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.<>c__DisplayClass20_0`1.b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica.Execute()<---

---> (Inner Exception #4) System.IndexOutOfRangeException: Index was outside the bounds of the array. at UVtools.Core.Managers.IssueManager.<>cDisplayClass18_2.b9(Int64 layerIndexInt) in UVtools.Core\Managers\IssueManager.cs:line 239 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.<>c__DisplayClass20_0`1.b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica.Execute()<---

---> (Inner Exception #5) System.IndexOutOfRangeException: Index was outside the bounds of the array. at UVtools.Core.Managers.IssueManager.<>cDisplayClass18_2.b9(Int64 layerIndexInt) in UVtools.Core\Managers\IssueManager.cs:line 239 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.<>c__DisplayClass20_0`1.b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica.Execute()<---

How to reproduce

1- Open *.CTB file in UVtools 2- Delete the empty layer 3- Press 'Detect' and the error happens.

DOES NOT happen in UVTools 4.3.1.

Checked old issues but none related to index out of bounds of the array.

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

mjf55 commented 3 months ago

Verified as fixed. Thanks