Open tonyzhangnxp opened 1 month ago
Does a minimal example also crash on 2.0 on your system? Like this...
import dearpygui.dearpygui as dpg
dpg.create_context()
dpg.create_viewport(title='Test', width=600, height=300)
with dpg.window(label="Example Window"):
dpg.add_text("Hello, world")
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
It's working fine.
And with the same codes, v1.11 could stay longer, and will crash without information as well. Is there any way to capture this issue?
You mentioned VS - does this mean Visual Studio or is it Visual Studio Code? If you have Visual Studio installed, Windows typically offers to debug the app in VS when it crashes. If you can do that, can you post a screenshot of the call stack? It might give some clues.
Since the PyPI version was built without debug info, there's little you can pull out of it. If you really want to pursue this, you can try to build DPG yourself - and use either Debug
or RelWithDebInfo
configuration (I'd recommend to start with RelWithDebInfo
because it has optimizations just like Release
- the app behavior on Debug
might be different).
My typical approach to debugging such issues is to (1) recreate the issue with a RelWithDebInfo
build, and (2) on crash, open Visual Studio and.. well, debug it :rofl:. AFAIK, DPG doesn't have any logging or something that would make it easier.
Also: if you start your app on 1.11 and don't touch the UI, does it eventually crash as well?
Also: if you start your app on 1.11 and don't touch the UI, does it eventually crash as well?
Yes, but not so quick. I'm using VS code debugging the scripts. I can't see the stack info when crash happened. I will build the DPG locally and try the RelWithDebInfo . Thank you for your reply.
I have a question, DPG build into so, how to debug with so library?
Well, a .so
is for Linux, but your description and GIF indicate Windows. On Windows, DPG builds into a .pyd
file, which is essentially a DLL, just renamed to .pyd (a .so
is also like a DLL but for Linux).
I'm not sure that VS Code can debug DLLs (maybe it can, depends on extensions; I've never used it this way). Visual Studio (not Code), if you have it, might be a better choice.
Hi I had Visual Studio 2022. Open the dpg folder, but which of the items should be selected ?
When your program crashes on this system, does it show a message box suggesting to debug the program? If not, then probably Visual Studio is not selected as the default postmortem debugger. See this topic to enable such debugging.
In theory, after you tick the "Native" checkbox, it should start offering you to debug the app. The StackOverflow topic is pretty old, but seems to still apply to later versions of VS (not sure about 2022, I have an older version).
Also see the comment in there about WER in Windows 10.
PLEASE CAREFULLY READ: FAQ
PLEASE CAREFULLY READ: Documentation
FOR FIRST-TIME USERS ISSUES, please use the Discord server.
REMOVE ALL 3RD PARTY LIBRARIES.
PLEASE MAKE SURE that you have: read the FAQ; explored the examples; searched among Issues; and read the link provided in (1) (2).
Be mindful that messages are being sent to the e-mail box of "Watching" users. Try to proof-read your messages before sending them. Edits are not seen by those users.
Delete points 1-7 and PLEASE FILL THE TEMPLATE BELOW before submitting your issue or we will immediately close it.
Thank you!
Version of Dear PyGui
Version: 2.0 Operating System: Windows 10
My Issue/Question
In version 1.11.1, it can still work for a while. After upgrading to version 2.0, dearpygui crashes immediately after UI being displayed without any error prompts.
I was trying to debug on VS, when the UI displayed and when I step over the "dpg.render_dearpygui_frame()" again, then it crashes without any information.
Is there any way to capture and analyze error information? Since there is a relatively large amount of code, it is not very suitable for uploading.