You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting any input related callbacks in GLFW, PollEvents causes an AccessViolationException
Steps to reproduce
Platform: Desktop
Framework Version: .NET 4.7.2
API: OpenGL
API Version: Legacy/OpenGL 1.1 (I mostly use Silk.NET to port legacy games)
Properly initialize a GLFW context and a window
Use either SetKeyCallback, SetMouseButtonCallback or SetCursorPosCallback (probably others too)
Call PollEvents
Comments
Oddly enough, SetWindowSizeCallback and other non-input related callbacks do not cause an access violation
// Leaving on this callback is fine
glfw.SetWindowSizeCallback(window, (WindowHandle* window, int width, int height) =>
{
// Code is executed
// ...
});
// But uncommenting this line, causes an AccessViolationException when polling the events
glfw.SetKeyCallback(window, (WindowHandle * window, Keys key,
int scanCode, InputAction action, KeyModifiers mods) =>
{
// Code is not executed, game crashes
// ...
});
The text was updated successfully, but these errors were encountered:
* Fix#2026
* Fix#2000, closes#2005
* Fix#2010
* Fix added AL bug (good thing we had tests!)
* Fix#1500
* Undo any unintentional changes
* Add nint overloads for things like VertexAttribPointer
* Fix build errors
* Add more standard cursor shapes
* Upversion natives where necessary
* Patch notes for 2.21
* Reorder literally a single line
* Incorporate #2143/#2066/#2090 in patch notes
* Implement IsExtensionPresent for WGL
* nit
* OpenXR updates?
* Fix flawed constant parsing for Vk/XR
* Add openxr to patch notes
* Update patch notes for 2.21
Summary
When setting any input related callbacks in GLFW, PollEvents causes an AccessViolationException
Steps to reproduce
Comments
Oddly enough, SetWindowSizeCallback and other non-input related callbacks do not cause an access violation
The text was updated successfully, but these errors were encountered: