Skip to content
This repository has been archived by the owner on May 2, 2021. It is now read-only.

IterationCount has no effect #7

Open
MrKDx opened this issue Oct 28, 2020 · 0 comments
Open

IterationCount has no effect #7

MrKDx opened this issue Oct 28, 2020 · 0 comments

Comments

@MrKDx
Copy link

MrKDx commented Oct 28, 2020

The parameter GifImage.IterationCount has currently no effect.
Expection is, when set to x the animation will run for x times and then stop.
For example change MainWindow.xaml in AvaloniaGif.Demo Line 16 and add gif:GifImage.IterationCount="5"
Start the Demo and chose an image. The animation will start immediately but will not stop after 5 iterations.

If set an exception occurs after a while:

System.InvalidOperationException
HResult=0x80131509
Message=Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
Source=System.Private.CoreLib
StackTrace:
at System.ThrowHelper.ThrowInvalidOperationException_ConcurrentOperationsNotSupported()
at System.Collections.Generic.Dictionary2.FindEntry(TKey key) at System.Collections.Generic.Dictionary2.TryGetValue(TKey key, TValue& value)
at Avalonia.Rendering.DirtyVisuals.Add(IVisual visual)
at AvaloniaGif.GifInstance.RenderTick(TimeSpan time) in AvaloniaGif-master\AvaloniaGif\GifInstance.cs:line 79
at Avalonia.Rendering.DefaultRenderTimer.InternalTick(TimeSpan tickCount)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant