-
-
Notifications
You must be signed in to change notification settings - Fork 687
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
Delete widget cause crash if widget is an image #554
Comments
Can't seem to reproduce this on windows. Will check on linux later today. |
Have you tested on Ubuntu? It still crash when i try to delete an image or image button using the given code. The only error shown is Segmentation Fault (core dumped) |
Sorry. Will check today and if confirmed, will fix it today! |
Does this occur on the newest version? |
Closing. No response. |
Same here in Ubuntu 20.0, version 1.4.0. |
Will check into it again on a new linux Machine I got this week. |
Hi @hoffstadt
|
Hi @hoffstadt, Fedora 34 env info: Fedora 35 env info: |
I can reproduce the same issue, using the above code snippet, on Ubuntu 22.04 & Python 3.9.13. Not sure if the problem is glibc - my version is 2.35. |
This is the GDB stacktrace, if it's helpful:
|
I can also reproduce with @tobyclh's snippet. glibc=2.36, python=3.11.0, linux kernel=6.0.8-arch1-1. This is a pretty big blocker to using DearPyGui for me; not being able to delete textures means my application has rampant memory leaks, making it unusable :( |
I can reproduce this on macOS 13.3 M2 in DPG 1.9.1 as well using |
Here's what probably happens behind the scenes. There's a discussion on the Nvidia forum that has given me an idea (another discussion on Discord revealed that this issue occurs on Nvidia drivers but not on Intel graphics): In particular, this line is interesting, along with the mention of a segfault on
Now, back to DPG. First of all, a texture gets loaded in the main thread, during rendering. That's where all OpenGL work happens. Later on, DPG calls the button callback in the handlers thread, i.e. in a thread that has no OpenGL context at all (or at least shoud not have it). Somewhere along the deletion, I bet some drivers would ignore the |
Starting your app with the environment variable |
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. |
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
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.
The text was updated successfully, but these errors were encountered: