-
-
Notifications
You must be signed in to change notification settings - Fork 420
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
Exception thrown with auxiliary keyboard keys and knobs #2407
Labels
bug
Something isn't working
Comments
2 tasks
Do you have a stack trace |
Sure thing @Perksey System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.InvalidOperationException: You cannot call `Reset` inside of the render loop!
at Silk.NET.Windowing.Internals.ViewImplementationBase.Reset()
at Silk.NET.Windowing.Internals.ViewImplementationBase.Dispose()
at InvokeStub_IDisposable.Dispose(Object, Object, IntPtr*)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
--- End of inner exception stack trace ---
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Velaptor.InternalExtensionMethods.DisposeOfType(Container container, Type type) in K:\SOFTWARE-DEVELOPMENT\PERSONAL\Velaptor\Velaptor\InternalExtensionMethods.cs:line 248
at Velaptor.IoC.DisposeOfRegisteredTypes() in K:\SOFTWARE-DEVELOPMENT\PERSONAL\Velaptor\Velaptor\IoC.cs:line 91
at Velaptor.UI.Window.DisposeOfRegisteredTypes() in K:\SOFTWARE-DEVELOPMENT\PERSONAL\Velaptor\Velaptor\UI\Window.cs:line 302
at Velaptor.UI.Window.Dispose(Boolean disposing) in K:\SOFTWARE-DEVELOPMENT\PERSONAL\Velaptor\Velaptor\UI\Window.cs:line 295
at Velaptor.UI.Window.Dispose() in K:\SOFTWARE-DEVELOPMENT\PERSONAL\Velaptor\Velaptor\UI\Window.cs:line 199
at VelaptorTesting.Program.Main(String[] args) in K:\SOFTWARE-DEVELOPMENT\PERSONAL\Velaptor\Testing\VelaptorTesting\Program.cs:line 101
at VelaptorTesting.Program.<Main>(String[] args) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
When using auxiliary keys or knobs on a keyboard, the application crashes. At first, I thought it was something in my library Velaptor, but after some investigation, I discovered that an
InvalidOperationException
is being thrown from theReset()
method in theViewImplementationBase
abstract class in theSilk.NET.Windowing.Internals
namespace.I know this is because I looked into the internal exception being thrown in Velaptor, and the exception message is
You cannot call 'Reset' inside of the render loop!
. I found this by searching in the Silk source code for tagv2.22.0
.When I say 'auxiliary', I mean custom keyboard keys and knobs that are used for volume, mute, skipping songs, etc.
I have a mechanical keyboard and my laptop keyboard, which have some aux keys and/or knobs that cause the exception to be thrown.
Since Velaptor is open source, you can run the VelaptorTesting project. Once the window is displayed, adjust the audio knob on a keyboard that has one, and it should crash. I attempted to see if the problem would occur in the Imgui sample project, but I had issues with errors being thrown by nuke. I am confident you can reproduce the issue with the Silk example projects.
I subscribe to a keyboard key-down event of an
IInputContext
instance. I set a breakpoint in my event handler, but it is not invoked. It simply immediately throws an exception.Steps to reproduce
Comments
The screenshots below are the knobs and keys that are causing the exception:
More Info:
You cannot call 'Reset' inside of the render loop!
. I found this by searching in the Silk source code for tagv2.22.0
.)Note
This is not just a volume knob. It can be used for other functions on the keyboard, such as the lighting.
Hitting the volume up and down on my laptop keyboard causes the same issue.
If you need more information or testing, let me know, and I would be glad to help. Thanks!!
If you know how to fix this issue, please submit a pull request instead!
The text was updated successfully, but these errors were encountered: