TheCherno / Hazel

Hazel Engine
Apache License 2.0
11.75k stars 1.51k forks source link

When the mouse clicks on the imgui interface, an error message appears: Exception thrown: read access violation.**window** was nullptr. #687

Open hoho965191737 opened 4 weeks ago

hoho965191737 commented 4 weeks ago

When I clicked the imgui interface with the mouse, an error occurred; it prompted me Exception thrown: read access violation.windowwas nullptr.; I checked the error stack and found that the ImGuiButtonFlags_NoNavFocus macro definition was executed and ClearActiveID was executed. looking through the call stack it happens because the ClearActiveID() function is called,which inturn calls the SetActiveID() with 0 and NULL as arguments ,i.e. SetActiveID(0, NULL),And this original error occured because in the function SetActiveID

image image

ViktorPopp commented 3 weeks ago

It seems like you forgot to initialize one of your pointers.

Autodidac commented 3 weeks ago

can someone tell me is this the Hazel Source? or is it Hazel 2D only? I'm so confused!

ViktorPopp commented 3 weeks ago

It seems like Hazel2D

VagueLobster commented 3 weeks ago

When I clicked the imgui interface with the mouse, an error occurred; it prompted me Exception thrown: read access violation.windowwas nullptr.; I checked the error stack and found that the ImGuiButtonFlags_NoNavFocus macro definition was executed and ClearActiveID was executed. looking through the call stack it happens because the ClearActiveID() function is called,which inturn calls the SetActiveID() with 0 and NULL as arguments ,i.e. SetActiveID(0, NULL),And this original error occured because in the function SetActiveID

image image

I've had a similar issue where i had to remove the window-> part of those 2 window->DC.Layouts Maybe either try that or update to a newer version of imgui?

hoho965191737 commented 3 weeks ago

When I clicked the imgui interface with the mouse, an error occurred; it prompted me Exception thrown: read access violation.windowwas nullptr.; I checked the error stack and found that the ImGuiButtonFlags_NoNavFocus macro definition was executed and ClearActiveID was executed. looking through the call stack it happens because the ClearActiveID() function is called,which inturn calls the SetActiveID() with 0 and NULL as arguments ,i.e. SetActiveID(0, NULL),And this original error occured because in the function SetActiveID当我用鼠标点击imgui界面时,出现错误;它提示我抛出异常:读取访问冲突.windowwas nullptr.;我检查了错误堆栈,发现执行了ImGuiButtonFlags_NoNavFocus宏定义并执行了ClearActiveID。查看调用堆栈,这是因为调用了 ClearActiveID() 函数,该函数又调用了以 0 和 NULL 作为参数的 SetActiveID(),即 SetActiveID(0, NULL),而出现这个原始错误是因为在函数 SetActiveID 中 image image

I've had a similar issue where i had to remove the window-> part of those 2 window->DC.Layouts我遇到了类似的问题,我必须删除这 2 个window->DC.Layoutswindow->部分 Maybe either try that or update to a newer version of imgui?也许尝试一下或更新到较新版本的 imgui?

Deleting Windows presents new problems and can only be attempted with a new version