DearPyGui: Delete widget cause crash if widget is an image

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

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.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

import platform
import os
if platform.system().upper() == "LINUX":
    os.environ["__GLVND_DISALLOW_PATCHING"] = "1"

For the time being, this is how you guys can monkeypatch it into the code, remember to put it BEFORE any initialization of DPG. It should fix problems for nvidia users, shouldn’t cause any problems for amd/intel users.

Will check into it again on a new linux Machine I got this week.