Skip to content

ImVector erase assertion failure #5009

@sigmareaver

Description

@sigmareaver

Version/Branch of Dear ImGui:

Version: 1.87 WIP
Branch: master

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_opengl2.cpp
Compiler: MSVC v142 C++ (x86 Debug configuration)
Operating System: Windows 7

My Issue/Question:
Assertion failed:
it >= Data && it < Data + Size && it_last > it && it_last <= Data + Size, file \imgui\imgui.h, line 1807

Stacktrace:

ImVector<ImGuiInputEvent>::erase(const ImGuiInputEvent * it=0x0871fbf0, const ImGuiInputEvent * it_last=0x0871fbf0) Line 1807	C++
ImGui::UpdateInputEvents(bool trickle_fast_inputs=true) Line 7871	C++
ImGui::NewFrame() Line 4329	C++

Screenshot
Capture.png
Untitled.png
Untitled2.png

Standalone, minimal, complete and verifiable example: (see #2261)
The assertion occurred while I was moving a slider (FrameRounding) in the ImGui::ShowStyleEditor();

This isn't the first time I've had ImGui crash while playing with the built-in style editor, but it's very rare.

So, it's doing g.InputEventsQueue.erase(g.InputEventsQueue.Data, g.InputEventsQueue.Data + event_n);
I'm noticing that g.InputEventsQueue.Data has an address of 0x0870e2e8 in the frame that is calling erase, yet inside of erase, the iterator argument passed in has a different address of 0x0871fbf0?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions