ant icon indicating copy to clipboard operation
ant copied to clipboard

发现一个ImGui.GetIO()的崩溃

Open constly opened this issue 1 year ago • 1 comments

我最近在做切换场景的功能,然后遇到一个imgui的宕机。 bug_07

我研究了下了,应该是ant.imgui里面mian.lua导致的

function ImGuiAnt.DispatchEvent(e)
    ImGuiIO = ImGui.GetIO()
    local func = ImGuiEvent[e.type]
    return func and func(e)
end

调用ImGui.GetIO时 可能得先判断下时机。

因为我在新场景加载了一个比较大的字体,loading时间比较久,在这个期间晃动鼠标,必崩。

constly avatar Apr 27 '24 09:04 constly

看起来是ImGui没初始化,但不知道你是如何在ImGui未初始化的情况下触发到DispatchEvent的

actboy168 avatar Apr 28 '24 02:04 actboy168

操作是这样:

  1. 进入场景后,渲染一个imgui界面
  2. 点击按钮并 执行 window.reboot
  3. 在加载期间 晃动鼠标,游戏崩溃

bug

constly avatar May 10 '24 14:05 constly