You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Back-end/Renderer/Compiler/OS
Back-ends: through giu library (imgui-go wrapper library)
Compiler: gcc
Operating System: linux
My Issue/Question:
I am trying to display a large hexdump of a several GB file.
I wanted to use ListClipper because it makes a nice scrollbar and I don't know how to make a scrollbar :)
However, when the amount of items in the list is very large (about 10**8 items or more), ListClipper behaves weird, due to what i assume are floating point errors (the last X items do not get displayed) and bugs (if the value is large enough and you scroll down, an assertion gets failed
listclippertest: imgui.cpp:2407: bool ImGuiListClipper::Step(): Assertion `ItemsHeight > 0.0f && "Unable to calculate item height! First item hasn't moved the cursor vertically!"' failed.
SIGABRT: abort
Here is example code to reproduce the problem
{
ImGui::Begin("window with clipped list");
ImGuiListClipper clipper;
clipper.Begin(pow(10, 8));
while (clipper.Step()) {
for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) {
std::string tmp = std::to_string(i);
char const *num_char = tmp.c_str();
ImGui::Text(num_char);
}
}
clipper.End();
ImGui::End();
}
The text was updated successfully, but these errors were encountered:
I am sorry, the issue doesn't seem to be with ListClipper, but rather that textlineheight * number_of_lines would be bigger than INT_MAX, which i guess means there aren't enough logical pixels for this approach.
See also: AllenDang/giu#354
Version/Branch of Dear ImGui:
Version: 1.84.2
Back-end/Renderer/Compiler/OS
Back-ends: through giu library (imgui-go wrapper library)
Compiler: gcc
Operating System: linux
My Issue/Question:
I am trying to display a large hexdump of a several GB file.
I wanted to use ListClipper because it makes a nice scrollbar and I don't know how to make a scrollbar :)
However, when the amount of items in the list is very large (about 10**8 items or more), ListClipper behaves weird, due to what i assume are floating point errors (the last X items do not get displayed) and bugs (if the value is large enough and you scroll down, an assertion gets failed
Here is example code to reproduce the problem
The text was updated successfully, but these errors were encountered: