hoffstadt / hoffstadt/DearPyGui

Delete widget cause crash if widget is an image

Open
#554 16 comments 0 reactions 0 assignees View on GitHub
can't reproduce platform: Linux type: bug
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

## Version of Dear PyGui

Version: 0.6.157
Operating System: Ubuntu 18.04 (Windows 10, macOs xx, Ubuntu 20.04, etc.)

## My Issue/Question

Delete widget cause crash ( Segmentation fault (core dumped) ) if widget contains an image ( or image button). Otherwise it works fine.

## To Reproduce
I follow the example in https://github.com/hoffstadt/DearPyGui/wiki/Runtime-Adding-and-Deleting-Widgets .
# Example code
```python
from dearpygui.core import *
from dearpygui.simple import *

def add_widgets(sender, data):

with window("Secondary Window"): # simple
#add_button("New Button")
add_image_button("image","/home/quannm/DearPyGui/GUI/0183_c6s1_042351_01.jpg",show=True)
def delete_children(sender, data):
delete_item("Secondary Window", children_only=True)

show_debug()

with window("Tutorial"):
add_button("Add Window and Items", callback=add_widgets)
add_button("Delete Window's Children", callback=delete_children)
start_dearpygui()
```
## Expected behavior

If you add button , the code works as intended. However, if you add an image ( or image button), the program crash when you try to delete widget.

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.