Screentogif: [Bug] System.AggregateException

Created on 20 Nov 2016  ·  2Comments  ·  Source: NickeManarin/ScreenToGif

Summary

GIF with several title frames and fade effects not encode for me.

Expected behavior

Expected

Actual behavior

Actual

Error: произошла одна или несколько ошибок.

Translate:

Error: One or more errors


_Click on this message to see full log:_

► Title - 
    Encode
▬ Message - 
    Произошла одна или несколько ошибок.
○ Type - 
    System.AggregateException
♦ Date/Hour - 
    20.11.2016 7:03:06
▲ Source - 
    mscorlib
▼ TargetSite - 
    Void ThrowIfExceptional(Boolean)
♠ StackTrace - 
   в System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   в System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   в System.Threading.Tasks.Task.Wait()
   в 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)
   в System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body)
   в ScreenToGif.ImageUtil.ImageMethods.PaintTransparentAndCut(List`1 listToEncode, Color transparent, Int32 id, CancellationTokenSource tokenSource)
   в ScreenToGif.Windows.Encoder.Encode(List`1 listFrames, Int32 id, Parameters param, CancellationTokenSource tokenSource)

▬▬ Message - 
    Индекс находился вне границ массива.
○○ Type - 
    System.IndexOutOfRangeException
▲▲ Source - 
    ScreenToGif
▼▼ TargetSite - 
    System.Drawing.Color GetPixel(Int32, Int32)
♠♠ StackTrace - 
   в ScreenToGif.ImageUtil.PixelUtilOld.GetPixel(Int32 x, Int32 y)
   в ScreenToGif.ImageUtil.ImageMethods.<>c__DisplayClass0_0.<PaintTransparentAndCut>b__0(Int32 x)
   в System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   в System.Threading.Tasks.Task.InnerInvoke()
   в System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   в System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )

----------------------------------

► Title - 
    Encode
▬ Message - 
    Произошла одна или несколько ошибок.
○ Type - 
    System.AggregateException
♦ Date/Hour - 
    20.11.2016 7:03:40
▲ Source - 
    mscorlib
▼ TargetSite - 
    Void ThrowIfExceptional(Boolean)
♠ StackTrace - 
   в System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   в System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   в System.Threading.Tasks.Task.Wait()
   в 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)
   в System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body)
   в ScreenToGif.ImageUtil.ImageMethods.PaintTransparentAndCut(List`1 listToEncode, Color transparent, Int32 id, CancellationTokenSource tokenSource)
   в ScreenToGif.Windows.Encoder.Encode(List`1 listFrames, Int32 id, Parameters param, CancellationTokenSource tokenSource)

▬▬ Message - 
    Индекс находился вне границ массива.
○○ Type - 
    System.IndexOutOfRangeException
▲▲ Source - 
    ScreenToGif
▼▼ TargetSite - 
    System.Drawing.Color GetPixel(Int32, Int32)
♠♠ StackTrace - 
   в ScreenToGif.ImageUtil.PixelUtilOld.GetPixel(Int32 x, Int32 y)
   в ScreenToGif.ImageUtil.ImageMethods.<>c__DisplayClass0_0.<PaintTransparentAndCut>b__0(Int32 x)
   в System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   в System.Threading.Tasks.Task.InnerInvoke()
   в System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   в System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )

----------------------------------

► Title - 
    Encode
▬ Message - 
    Произошла одна или несколько ошибок.
○ Type - 
    System.AggregateException
♦ Date/Hour - 
    20.11.2016 7:04:31
▲ Source - 
    mscorlib
▼ TargetSite - 
    Void ThrowIfExceptional(Boolean)
♠ StackTrace - 
   в System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   в System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   в System.Threading.Tasks.Task.Wait()
   в 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)
   в System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body)
   в ScreenToGif.ImageUtil.ImageMethods.PaintTransparentAndCut(List`1 listToEncode, Color transparent, Int32 id, CancellationTokenSource tokenSource)
   в ScreenToGif.Windows.Encoder.Encode(List`1 listFrames, Int32 id, Parameters param, CancellationTokenSource tokenSource)

▬▬ Message - 
    Индекс находился вне границ массива.
○○ Type - 
    System.IndexOutOfRangeException
▲▲ Source - 
    ScreenToGif
▼▼ TargetSite - 
    System.Drawing.Color GetPixel(Int32, Int32)
♠♠ StackTrace - 
   в ScreenToGif.ImageUtil.PixelUtilOld.GetPixel(Int32 x, Int32 y)
   в ScreenToGif.ImageUtil.ImageMethods.<>c__DisplayClass0_0.<PaintTransparentAndCut>b__0(Int32 x)
   в System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   в System.Threading.Tasks.Task.InnerInvoke()
   в System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   в System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )

----------------------------------

► Title - 
    Encode
▬ Message - 
    Произошла одна или несколько ошибок.
○ Type - 
    System.AggregateException
♦ Date/Hour - 
    20.11.2016 7:28:27
▲ Source - 
    mscorlib
▼ TargetSite - 
    Void ThrowIfExceptional(Boolean)
♠ StackTrace - 
   в System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   в System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   в System.Threading.Tasks.Task.Wait()
   в 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)
   в System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body)
   в ScreenToGif.ImageUtil.ImageMethods.PaintTransparentAndCut(List`1 listToEncode, Color transparent, Int32 id, CancellationTokenSource tokenSource)
   в ScreenToGif.Windows.Encoder.Encode(List`1 listFrames, Int32 id, Parameters param, CancellationTokenSource tokenSource)

▬▬ Message - 
    Индекс находился вне границ массива.
○○ Type - 
    System.IndexOutOfRangeException
▲▲ Source - 
    ScreenToGif
▼▼ TargetSite - 
    System.Drawing.Color GetPixel(Int32, Int32)
♠♠ StackTrace - 
   в ScreenToGif.ImageUtil.PixelUtilOld.GetPixel(Int32 x, Int32 y)
   в ScreenToGif.ImageUtil.ImageMethods.<>c__DisplayClass0_0.<PaintTransparentAndCut>b__0(Int32 x)
   в System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   в System.Threading.Tasks.Task.InnerInvoke()
   в System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   в System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )

----------------------------------

Steps to reproduce

I create GIF 3 Title frames and 3 fade effects → Save As:

  • if I select Legacy Encoder I get error,
  • if I select ScreenToGIF Encoder I get error,
  • if I select System Encoder, 167(!) MB GIF encode for me. No program is open this file.

In E:\Chocolatey\lib\screentogif\content\Logs directory I saw log_20_11_2016.txt file.

Attached file

I save my project file

Environment

Operating system and version:
Windows 32-bit 10.0.14393
ScreenToGif:
2.3.161030
.NET Framework
4.6 Build 394802

Thanks.

🐞 bug

All 2 comments

Looks like at least one of the frames has a different size. Could be related to a bug related to high DPI. Working on it.

With previous fixes (v2.7) this bug got less common. But even if someone tries to manually resize the frames by opening the temp folder, the app will not throw an exception, it will treat the missing pixels as a transparent color.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

felixfbecker picture felixfbecker  ·  27Comments

Kristinita picture Kristinita  ·  12Comments

mabbas64 picture mabbas64  ·  13Comments

positr0nic picture positr0nic  ·  17Comments

Ivaylo-Lafchiev picture Ivaylo-Lafchiev  ·  12Comments