CedricGuillemet / ImGuizmo

Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui
MIT License
3.22k stars 907 forks source link

adding the gizmo to a window that was just renamed leads to a crash with asan activated #319

Open mgerhardy opened 11 months ago

mgerhardy commented 11 months ago

I suppose this is maybe due to the fact that the debug info for the drawlist owner char pointer is only valid a frame after the rename. But this is only a guess. I've added the window pointer to the context to remove the window-by-id lookup call in IsHoveringWindow() and that fixed the issue.

See https://github.com/vengi-voxel/vengi/issues/350 for the full asan report

https://github.com/vengi-voxel/vengi/commit/59cd9c3d581f5470b39d15fc4388431139286893 for a "fix" - the window pointer is kind of duplicating the drawlist - because one could get the drawlist from imgui directly if you already have the window. but at least it fixed the issue for me and might help others to get an idea of the crash.