glfwSetWindowSize causes read violation

I am creating my own window resizing logic because I have the GLFW_DECORATED hint set to false as I am creating my own title bar also.

When resizing from the corner (ie setting the width and height at the same time) I get a memory read violation from the nvoglv64.dll thread.

Specifically the error only occurs when I resize such the the width gets larger and the height gets smaller, all other combinations seem to work fine. Any advice would be helpful. The error itself doesnt point to any code that I can view (just the disassembly is viewable)

Hi @jkleve,

Welcome to the GLFW forum.

It would be a good idea to first update your driver - there was a recent NVIDIA driver which was hot fixed to patch a bug causing crashes.

If this doesn’t resolve the problem, check that the GLFW examples work with resizing, and if you are able to check the latest GLFW from Github by building from source.

Let us know how you get on and whether you need any further help.



It would seem my drivers are all up to date. I installed whatever is the newest just to be sure.
As for testing the examples, that might take me some time to setup. Right now I am using the library with Dear Imgui but I will try to set this up.

Another thing is I am updating the window size frequently (every frame during the cursor position callback). Could that cause any problems that I might be overlooking? Alternatively is it possible to disable to standard title bar and keep the native resizable functionality?

I’ve never tried this or seen the issue before.

One thing you might want to try is instead of setting pos/size in the callback, set them on the next frame start. This would avoid potential infinite recursions due to the relative mouse position changing as the window size/pos change, thus triggering a cursor position callback.

You might also want to remove extra GetWindow* since the size should not change the position and visa-versa.

I wasnt able to test the glfw stuff by itself yet but I did discover some things while testing the Dear ImGui docking examples which has a similar issue but actually gives me an exception that I can start making sense of. I created a separate issue for it under the Dear Imgui git which you can see here

This issue was apparently caused by NahimicOSD.dll which when uninstalled fixed the issue.