[GH-ISSUE #968] [Bug] Crash when saving frames of different size #738

Closed
opened 2026-02-26 09:32:28 +03:00 by kerem · 3 comments
Owner

Originally created by @szmabcd on GitHub (Aug 9, 2021).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/968

► Title -
Encode
▬ Message -
One or more errors occurred.
○ Type -
System.AggregateException
♦ [Version] Date/Hour -
[2.33.1] 08/09/2021 21:19:50
▲ Source -
mscorlib
▼ TargetSite -
Void ThrowIfExceptional(Boolean)
♠ StackTrace -
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action1 body)
at ScreenToGif.ImageUtil.ImageMethods.PaintTransparentAndCut(ExportProject project, Color chroma, Int32 taskId, CancellationTokenSource tokenSource)
at ScreenToGif.Util.EncodingManager.d__27.MoveNext()

▬▬ Message -
Index was outside the bounds of the array.
○○ Type -
System.IndexOutOfRangeException
▲▲ Source -
ScreenToGif
▼▼ TargetSite -
Void b__0(Int32)
♠♠ StackTrace -
at ScreenToGif.ImageUtil.ImageMethods.<>c__DisplayClass1_1.b__0(Int32 i)
at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.b__1()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )


► Title -
Encode
▬ Message -
One or more errors occurred.
○ Type -
System.AggregateException
♦ [Version] Date/Hour -
[2.33.1] 08/09/2021 21:21:48
▲ Source -
mscorlib
▼ TargetSite -
Void ThrowIfExceptional(Boolean)
♠ StackTrace -
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action1 body)
at ScreenToGif.ImageUtil.ImageMethods.PaintTransparentAndCut(ExportProject project, Color chroma, Int32 taskId, CancellationTokenSource tokenSource)
at ScreenToGif.Util.EncodingManager.d__27.MoveNext()

▬▬ Message -
Index was outside the bounds of the array.
○○ Type -
System.IndexOutOfRangeException
▲▲ Source -
ScreenToGif
▼▼ TargetSite -
Void b__0(Int32)
♠♠ StackTrace -
at ScreenToGif.ImageUtil.ImageMethods.<>c__DisplayClass1_1.b__0(Int32 i)
at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.b__1()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )


► Title -
Encode
▬ Message -
One or more errors occurred.
○ Type -
System.AggregateException
♦ [Version] Date/Hour -
[2.25] 08/09/2021 22:13:59
▲ Source -
mscorlib
▼ TargetSite -
Void ThrowIfExceptional(Boolean)
♠ StackTrace -
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action1 body)
at ScreenToGif.ImageUtil.ImageMethods.PaintTransparentAndCut(List`1 listToEncode, Color transparent, Int32 id, CancellationTokenSource tokenSource)
at ScreenToGif.Windows.Other.Encoder.d__26.MoveNext()

▬▬ Message -
Index was outside the bounds of the array.
○○ Type -
System.IndexOutOfRangeException
▲▲ Source -
ScreenToGif
▼▼ TargetSite -
Void b__0(Int32)
♠♠ StackTrace -
at ScreenToGif.ImageUtil.ImageMethods.<>c__DisplayClass0_1.b__0(Int32 i)
at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.b__1()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )


► Title -
Encode
▬ Message -
One or more errors occurred.
○ Type -
System.AggregateException
♦ [Version] Date/Hour -
[2.30] 08/09/2021 22:14:50
▲ Source -
mscorlib
▼ TargetSite -
Void ThrowIfExceptional(Boolean)
♠ StackTrace -
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action1 body)
at ScreenToGif.ImageUtil.ImageMethods.PaintTransparentAndCut(ExportProject project, Color chroma, Int32 taskId, CancellationTokenSource tokenSource)
at ScreenToGif.Util.EncodingManager.d__27.MoveNext()

▬▬ Message -
Index was outside the bounds of the array.
○○ Type -
System.IndexOutOfRangeException
▲▲ Source -
ScreenToGif
▼▼ TargetSite -
Void b__0(Int32)
♠♠ StackTrace -
at ScreenToGif.ImageUtil.ImageMethods.<>c__DisplayClass1_1.b__0(Int32 i)
at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.b__1()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )


► Title -
Encode
▬ Message -
One or more errors occurred.
○ Type -
System.AggregateException
♦ [Version] Date/Hour -
[2.30] 08/09/2021 22:15:03
▲ Source -
mscorlib
▼ TargetSite -
Void ThrowIfExceptional(Boolean)
♠ StackTrace -
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action1 body)
at ScreenToGif.ImageUtil.ImageMethods.PaintTransparentAndCut(ExportProject project, Color chroma, Int32 taskId, CancellationTokenSource tokenSource)
at ScreenToGif.Util.EncodingManager.d__27.MoveNext()

▬▬ Message -
Index was outside the bounds of the array.
○○ Type -
System.IndexOutOfRangeException
▲▲ Source -
ScreenToGif
▼▼ TargetSite -
Void b__0(Int32)
♠♠ StackTrace -
at ScreenToGif.ImageUtil.ImageMethods.<>c__DisplayClass1_1.b__0(Int32 i)
at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.b__1()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )


Originally created by @szmabcd on GitHub (Aug 9, 2021). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/968 ► Title - Encode ▬ Message - One or more errors occurred. ○ Type - System.AggregateException ♦ [Version] Date/Hour - [2.33.1] 08/09/2021 21:19:50 ▲ Source - mscorlib ▼ TargetSite - Void ThrowIfExceptional(Boolean) ♠ StackTrace - at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body) at ScreenToGif.ImageUtil.ImageMethods.PaintTransparentAndCut(ExportProject project, Color chroma, Int32 taskId, CancellationTokenSource tokenSource) at ScreenToGif.Util.EncodingManager.<Encode>d__27.MoveNext() ▬▬ Message - Index was outside the bounds of the array. ○○ Type - System.IndexOutOfRangeException ▲▲ Source - ScreenToGif ▼▼ TargetSite - Void <PaintTransparentAndCut>b__0(Int32) ♠♠ StackTrace - at ScreenToGif.ImageUtil.ImageMethods.<>c__DisplayClass1_1.<PaintTransparentAndCut>b__0(Int32 i) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>) ---------------------------------- ► Title - Encode ▬ Message - One or more errors occurred. ○ Type - System.AggregateException ♦ [Version] Date/Hour - [2.33.1] 08/09/2021 21:21:48 ▲ Source - mscorlib ▼ TargetSite - Void ThrowIfExceptional(Boolean) ♠ StackTrace - at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body) at ScreenToGif.ImageUtil.ImageMethods.PaintTransparentAndCut(ExportProject project, Color chroma, Int32 taskId, CancellationTokenSource tokenSource) at ScreenToGif.Util.EncodingManager.<Encode>d__27.MoveNext() ▬▬ Message - Index was outside the bounds of the array. ○○ Type - System.IndexOutOfRangeException ▲▲ Source - ScreenToGif ▼▼ TargetSite - Void <PaintTransparentAndCut>b__0(Int32) ♠♠ StackTrace - at ScreenToGif.ImageUtil.ImageMethods.<>c__DisplayClass1_1.<PaintTransparentAndCut>b__0(Int32 i) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>) ---------------------------------- ► Title - Encode ▬ Message - One or more errors occurred. ○ Type - System.AggregateException ♦ [Version] Date/Hour - [2.25] 08/09/2021 22:13:59 ▲ Source - mscorlib ▼ TargetSite - Void ThrowIfExceptional(Boolean) ♠ StackTrace - at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body) at ScreenToGif.ImageUtil.ImageMethods.PaintTransparentAndCut(List`1 listToEncode, Color transparent, Int32 id, CancellationTokenSource tokenSource) at ScreenToGif.Windows.Other.Encoder.<Encode>d__26.MoveNext() ▬▬ Message - Index was outside the bounds of the array. ○○ Type - System.IndexOutOfRangeException ▲▲ Source - ScreenToGif ▼▼ TargetSite - Void <PaintTransparentAndCut>b__0(Int32) ♠♠ StackTrace - at ScreenToGif.ImageUtil.ImageMethods.<>c__DisplayClass0_1.<PaintTransparentAndCut>b__0(Int32 i) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>) ---------------------------------- ► Title - Encode ▬ Message - One or more errors occurred. ○ Type - System.AggregateException ♦ [Version] Date/Hour - [2.30] 08/09/2021 22:14:50 ▲ Source - mscorlib ▼ TargetSite - Void ThrowIfExceptional(Boolean) ♠ StackTrace - at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body) at ScreenToGif.ImageUtil.ImageMethods.PaintTransparentAndCut(ExportProject project, Color chroma, Int32 taskId, CancellationTokenSource tokenSource) at ScreenToGif.Util.EncodingManager.<Encode>d__27.MoveNext() ▬▬ Message - Index was outside the bounds of the array. ○○ Type - System.IndexOutOfRangeException ▲▲ Source - ScreenToGif ▼▼ TargetSite - Void <PaintTransparentAndCut>b__0(Int32) ♠♠ StackTrace - at ScreenToGif.ImageUtil.ImageMethods.<>c__DisplayClass1_1.<PaintTransparentAndCut>b__0(Int32 i) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>) ---------------------------------- ► Title - Encode ▬ Message - One or more errors occurred. ○ Type - System.AggregateException ♦ [Version] Date/Hour - [2.30] 08/09/2021 22:15:03 ▲ Source - mscorlib ▼ TargetSite - Void ThrowIfExceptional(Boolean) ♠ StackTrace - at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body) at ScreenToGif.ImageUtil.ImageMethods.PaintTransparentAndCut(ExportProject project, Color chroma, Int32 taskId, CancellationTokenSource tokenSource) at ScreenToGif.Util.EncodingManager.<Encode>d__27.MoveNext() ▬▬ Message - Index was outside the bounds of the array. ○○ Type - System.IndexOutOfRangeException ▲▲ Source - ScreenToGif ▼▼ TargetSite - Void <PaintTransparentAndCut>b__0(Int32) ♠♠ StackTrace - at ScreenToGif.ImageUtil.ImageMethods.<>c__DisplayClass1_1.<PaintTransparentAndCut>b__0(Int32 i) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>) ----------------------------------
Author
Owner

@NickeManarin commented on GitHub (Aug 12, 2021):

Looks like the frames have a difference in size. Do you still have the project and can you share with me?

<!-- gh-comment-id:897955549 --> @NickeManarin commented on GitHub (Aug 12, 2021): Looks like the frames have a difference in size. Do you still have the project and can you share with me?
Author
Owner

@szmabcd commented on GitHub (Aug 12, 2021):

221
222
223

<!-- gh-comment-id:898011446 --> @szmabcd commented on GitHub (Aug 12, 2021): ![221](https://user-images.githubusercontent.com/38176269/129278351-d80458a6-0826-4168-b350-a3987294610d.png) ![222](https://user-images.githubusercontent.com/38176269/129278355-da0e2e2a-db2f-402d-946b-849e447c319d.png) ![223](https://user-images.githubusercontent.com/38176269/129278356-e6b8e7f4-bebe-49f8-8655-10d884f9a305.png)
Author
Owner

@NickeManarin commented on GitHub (Jan 26, 2022):

This issue was caused by the lack of a validation during the import of multiple frames in the editor.
With the latest version, you should be able to import it again, but you'll receive a warning if the frames are mismatched in size.

<!-- gh-comment-id:1022698012 --> @NickeManarin commented on GitHub (Jan 26, 2022): This issue was caused by the lack of a validation during the import of multiple frames in the editor. With the latest version, you should be able to import it again, but you'll receive a warning if the frames are mismatched in size.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#738
No description provided.