Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AniMe Matrix - "Parameter is not valid" #3280

Closed
2 tasks done
Scarlaid opened this issue Oct 22, 2024 · 8 comments
Closed
2 tasks done

AniMe Matrix - "Parameter is not valid" #3280

Scarlaid opened this issue Oct 22, 2024 · 8 comments
Labels
question Further information is requested

Comments

@Scarlaid
Copy link

Rules

  • I made myself familiar with the Readme, FAQ and Troubleshooting.
  • I understand that, if insufficient information or no app logs will be provided, my issue will be closed without an answer.

What's wrong?

For certain time, when you leave the AniMe Matrix preview on the screen, as long as it is a GIF, it will throw an error as "Parameter is not valid" and the Matrix will crash alongside the preview will be left with a big X mark

But after closing the preview and re-open it, it will work again.

How to reproduce the bug?

  1. Open G-Helper
  2. Open the AniMe Matrix Picture/Gif option
  3. Choose any long/short GIFs
  4. Leave the preview there

Logs

log.txt

Device and Model

ASUS Zephyrus G14 GA402XV

Additional information.

image

Armoury Crate

Uninstalled

Asus Services

0

Version

0.194.0

OS

Windows 11 22H2

@seerge
Copy link
Owner

seerge commented Oct 22, 2024

@Scarlaid hello,

  • Can you copy here full text from the Details button in the exception ?
  • Can you upload the GIF itself ?

But it looks like that native microsoft .NET component responsible for showing picture is failing :)

@seerge seerge added the question Further information is requested label Oct 22, 2024
@Scarlaid
Copy link
Author

Sadly I don't keep the old log, tried to replicate but got a differet error, make it two

.NET Log (new)
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: Object is currently in use elsewhere.
at System.Drawing.ImageAnimator.ImageInfo.UpdateFrame()
at System.Drawing.ImageAnimator.UpdateFrames(Image image)
at System.Windows.Forms.PictureBox.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)

************** Loaded Assemblies **************
System.Private.CoreLib
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Private.CoreLib.dll

GHelper
Assembly Version: 0.196.0.0
Location:

System.Runtime
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Runtime.dll

System.Windows.Forms
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.10\System.Windows.Forms.dll

System.Threading.Thread
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Threading.Thread.dll

System.ComponentModel.Primitives
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.ComponentModel.Primitives.dll

System.Windows.Forms.Primitives
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.10\System.Windows.Forms.Primitives.dll

System.Drawing.Primitives
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Drawing.Primitives.dll

System.Collections.Specialized
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Collections.Specialized.dll

Microsoft.Win32.SystemEvents
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.10\Microsoft.Win32.SystemEvents.dll

System.Diagnostics.Process
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Diagnostics.Process.dll

System.Collections
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Collections.dll

System.ComponentModel.TypeConverter
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.ComponentModel.TypeConverter.dll

System.Text.Json
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Text.Json.dll

System.Threading
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Threading.dll

System.Memory
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Memory.dll

System.Text.Encoding.Extensions
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Text.Encoding.Extensions.dll

System.Text.Encodings.Web
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Text.Encodings.Web.dll

System.Runtime.Intrinsics
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Runtime.Intrinsics.dll

System.Numerics.Vectors
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Numerics.Vectors.dll

System.Private.Uri
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Private.Uri.dll

System.Collections.Concurrent
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Collections.Concurrent.dll

System.Reflection.Emit.Lightweight
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Reflection.Emit.Lightweight.dll

System.Reflection.Primitives
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Reflection.Primitives.dll

System.Reflection.Emit.ILGeneration
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Reflection.Emit.ILGeneration.dll

System.Runtime.InteropServices
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Runtime.InteropServices.dll

Microsoft.Win32.Primitives
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\Microsoft.Win32.Primitives.dll

System.Management
Assembly Version: 8.0.0.0
Location:

Microsoft.Win32.Registry
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\Microsoft.Win32.Registry.dll

System.Security.Principal.Windows
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Security.Principal.Windows.dll

System.Security.Claims
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Security.Claims.dll

System.Drawing.Common
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.10\System.Drawing.Common.dll

System.Diagnostics.TraceSource
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Diagnostics.TraceSource.dll

System.Resources.Extensions
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.10\System.Resources.Extensions.dll

System.Drawing
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.10\System.Drawing.dll

NAudio.Wasapi
Assembly Version: 2.1.0.0
Location:

System.ComponentModel.EventBasedAsync
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.ComponentModel.EventBasedAsync.dll

Accessibility
Assembly Version: 4.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.10\Accessibility.dll

System.ComponentModel
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.ComponentModel.dll

WinForms.DataVisualization
Assembly Version: 1.0.0.0
Location:

WinForms.DataVisualization.Utilities
Assembly Version: 1.0.0.0
Location:

netstandard
Assembly Version: 2.1.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\netstandard.dll

HidSharpCore
Assembly Version: 2.1.0.0
Location:

System.Linq
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Linq.dll

System.Threading.ThreadPool
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Threading.ThreadPool.dll

Microsoft.Win32.TaskScheduler
Assembly Version: 2.11.0.0
Location:

System.ObjectModel
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.ObjectModel.dll

System.Diagnostics.FileVersionInfo
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Diagnostics.FileVersionInfo.dll

System.Text.RegularExpressions
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Text.RegularExpressions.dll

System.Xml.ReaderWriter
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Xml.ReaderWriter.dll

System.Private.Xml
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Private.Xml.dll

System.Runtime.Loader
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Runtime.Loader.dll

NvAPIWrapper
Assembly Version: 0.8.1.100
Location:

System.Diagnostics.PerformanceCounter
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.10\System.Diagnostics.PerformanceCounter.dll

System.Threading.Overlapped
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Threading.Overlapped.dll

NAudio.Core
Assembly Version: 2.1.0.0
Location:

System.Collections.NonGeneric
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Collections.NonGeneric.dll

System.Net.Http
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Net.Http.dll

System.Net.Primitives
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Net.Primitives.dll

System.Diagnostics.Tracing
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Diagnostics.Tracing.dll

System.Diagnostics.DiagnosticSource
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Diagnostics.DiagnosticSource.dll

System.Net.Security
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Net.Security.dll

System.Security.Cryptography
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Security.Cryptography.dll

System.Net.Sockets
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Net.Sockets.dll

System.Net.NameResolution
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Net.NameResolution.dll

System.Diagnostics.StackTrace
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Diagnostics.StackTrace.dll

System.Reflection.Metadata
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Reflection.Metadata.dll

System.Collections.Immutable
Assembly Version: 8.0.0.0
Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Collections.Immutable.dll

************** JIT Debugging **************

Here is the GIF too

@seerge
Copy link
Owner

seerge commented Oct 22, 2024

@Scarlaid ok, thanks.

Exception text says it's something happening inside image component that plays GIF itself (i.e. outside of actual G-Helper's code)

I honestly don't know why, but most likely cause it's literally huge GIF (36mb!) and it takes few seconds for me to even load it in UI. I can't reproduce exception tho.

What I can "offer" here is to actually just "trim" GIF preview to first 300 frames for example (or something like that) to speed up whole interaction with it. And may be that will help component and it won't run into exceptions

@seerge
Copy link
Owner

seerge commented Oct 22, 2024

@Scarlaid I did some more digging, and have found quite specific scenario to trigger this.

You need to have Matrix window open + change matrix mode to something else and back to Picture in a dropdown on main window.

Check this build, it should behave better
GHelper.zip

seerge added a commit that referenced this issue Oct 22, 2024
@Scarlaid
Copy link
Author

Scarlaid commented Oct 22, 2024

most likely cause it's literally huge GIF (36mb!)

Tried my best to optimize it :p
it's for a reddit post anyway

Can confirm the provided build has no more crashes with the Matrix windows open, however

  • The preview still slow to open
  • The Matrix is actually slower than the actual speed within the preview

But I think this could just be the heavy GIF, tried with a 3 second GIF and the speed is synchronized with the preview

Thanks for the quick fix!

@Scarlaid
Copy link
Author

Ahh, sorry if this is a little nitpicking from me but any chance to change the name from "Anime Matrix" to "AniMe Matrix"?

Technically from ASUS it is named like that 🫡

@seerge
Copy link
Owner

seerge commented Oct 22, 2024

@Scarlaid

Glad that fix worked.

The preview still slow to open

I didn't change or added resizing to GIF, so it is still slow to open as it takes a lot of time to process it still.

The Matrix is actually slower than the actual speed within the preview

There is an artificial limiter in the app, limiting GIF to 20FPS at max (or 50ms) to save resources and also cause anime matrix simply can't refresh much faster. So you may want to use some web GIF-editor and try to lower FPS in your GIF by dropping some frames for example?

You can also try to add to config.json to lower delay (in miliseconds), but resource load will be even higher.

"matrix_speed" : 30,

Ahh, sorry if this is a little nitpicking from me but any chance to change the name from "Anime Matrix" to "AniMe Matrix"?

G-Helper calls bunch of things not exactly same as AC (like Performance mode -> Balanced, Game Visual is Visual Mode, etc, so i think it's fine to keep it as is)

Thanks

@Scarlaid
Copy link
Author

There is an artificial limiter in the app, limiting GIF to 20FPS at max (or 50ms) to save resources and also cause anime matrix simply can't refresh much faster. 

Ahh now that's more understandable, and by your suggestion, I found out that to synchronize, the Matrix just need to be sped up for around x1.5 speed(ish)

Thanks for helping, and for such a great app! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants