DearPyGui
DearPyGui copied to clipboard
Deleting a texture causes a seg fault
Version of Dear PyGui
Version: 1.10.1 Operating System: PopOS 22.04 using dedicated Nvidia graphics card. Can't reproduce with integrated graphics
My Issue/Question
A clear and concise description of what the issue/question is. Please provide as much context as possible.
To Reproduce
Run the code, click the delete button, crash ensues on my system. Others on Discord unable to reproduce
Expected behavior
No crash, and the texture to be deleted
Standalone, minimal, complete and verifiable example
import dearpygui.dearpygui as dpg
dpg.create_context()
def remove_stuff():
dpg.delete_item("texture_tag")
texture_data = []
for i in range(0, 100 * 100):
texture_data.append(255 / 255)
texture_data.append(0)
texture_data.append(255 / 255)
texture_data.append(255 / 255)
with dpg.texture_registry(tag="asset_registry", show=True):
dpg.add_static_texture(width=100, height=100, default_value=texture_data, tag="texture_tag")
with dpg.window():
dpg.add_button(label="Del", callback=remove_stuff)
dpg.create_viewport(title="Custom Title", width=300, height=300)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
Anyone searching for possible workaround, take a look at: #554