hoffstadt / hoffstadt/DearPyGui

Deleting a texture causes a seg fault

Open
#2,219 0 comments 0 reactions 0 assignees View on GitHub
state: pending type: bug
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

## 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

```python
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()
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.