8000 imgui.table_set_column_index(0) fails · Issue #354 · pyimgui/pyimgui · GitHub
[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imgui.table_set_column_index(0) fails #354

Open
jalius opened this issue Oct 13, 2023 · 0 comments
Open

imgui.table_set_column_index(0) fails #354

jalius opened this issue Oct 13, 2023 · 0 comments

Comments

@jalius
Copy link
jalius commented Oct 13, 2023

Hi, I'm reporting a bug where going to column 0 with imgui.table_set_column_index(0) on a table fails, but imgui.table_next_column() works as intended. I'm using GLFW, Windows 11, Python 3.11.5, pyimgui.version = 2.0.0

Bugged table creation:

def begin_window(self):
        with imgui.begin("Registers", False, flags = 0) as (_, self.state.wind_open):
            with imgui.begin_table("RegEdit", 2, flags = imgui.TABLE_BORDERS) as self.state.regtable:
                if self.state.regtable.opened:
                    imgui.table_setup_column("Name")
                    imgui.table_setup_column("Address")
                    imgui.table_set_column_index(0)  #<----------------
                    imgui.text("Name!")
                    imgui.table_set_column_index(1)                    
                    imgui.text("0x201C")

Working table creation:

def begin_window(self):
        with imgui.begin("Registers", False, flags = 0) as (_, self.state.wind_open):
            with imgui.begin_table("RegEdit", 2, flags = imgui.TABLE_BORDERS) as self.state.regtable:
                if self.state.regtable.opened:
                    imgui.table_setup_column("Name")
                    imgui.table_setup_column("Address")
                    imgui.table_next_column() #<----------------
                    imgui.text("Name!")
                    imgui.table_set_column_index(1)                    
                    imgui.text("0x201C")

Exception has occurred: ImGuiError
ImGui assertion error (SizeOfIDStack == window->IDStack.Size && "PushID/PopID or TreeNode/TreePop Mismatch!") at imgui-cpp/imgui.cpp:7244
File "C:\file.py", line 1536, in begin_window
imgui.table_set_column_index(0)
imgui.core.ImGuiError: ImGui assertion error (idx >= 0 && idx < _Count) at imgui-cpp/imgui_draw.cpp:1756

During handling of the above exception, another exception occurred:

File "C:\file.py", line 1531, in begin_window
with imgui.begin_table("RegEdit", 2, flags = imgui.TABLE_BORDERS) as self.state.regtable:
imgui.core.ImGuiError: ImGui assertion error (table->RowPosY2 == inner_window->DC.CursorPos.y) at imgui-cpp/imgui_tables.cpp:1194

During handling of the above exception, another exception occurred:

File "C:\file.py", line 1530, in begin_window
with imgui.begin("Registers", False, flags = 0) as (_, self.state.wind_open):
File "C:\file.py", line 1705, in on_frame
app_state.reg_w.begin_window()
File "C:\file.py", line 1629, in main_glfw
on_frame()
File "C:\file.py", line 1741, in
main_glfw()
imgui.core.ImGuiError: ImGui assertion error (SizeOfIDStack == window->IDStack.Size && "PushID/PopID or TreeNode/TreePop Mismatch!") at imgui-cpp/imgui.cpp:7244

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0