the Qt6Gui.dll on eventvwr unknown error
-
i meet a error,
when i use the python 3.11.5 and PyQt6 6.6.1 written a program.
Some users experience crashes on their Windows 11 computers.
this eventvwr is(In my network, I can see that the image has been successfully uploaded, but due to network reasons, I cannot see the uploaded image. If someone cannot see it, please prompt me and I will switch to XML)
I can't find a starting point to solve the problem,so i upgraded the dependent versions of Python and pyqt6 involved.
the python is 3.12.5, the PyQt6 is 6.7.1.
The issue of crashing still occurs on the user's computer.
the eventvwr is
(i don't know why this moduleversion is 6.7.2.0,i don't understand these relationships)
My development environment is Win11, and the exe packaged with pyinstaller runs well on my computer,
I added exception capture and used asyncio. I added a lot of code for exception capture, but the program crashed without any error messages.
such as:
try:
...
except Exception as e:
...sys.excepthook(e.class, e, e.traceback)
loop.set_exception_handler(handle_exception)
sys.excepthook = global_exception_handler
Is there anyone who can help me?
What should I do?
Thank you very much. -
I have identified the most likely cause, which is the frequent data changes in the QTextBrowser component
For example, if the frequency of changing the content of this component is less than 100ms, and if there is too much content, it will require the component to slide to the bottom
Unfortunately, it was only reproduced once, and the time manager displayed it as Qt6Gui.dll
No matter how much testing was conducted afterwards, it couldn't be reproducedDoes anyone know the upper limit of high-frequency refresh for this component?
-
Hi,
I don't know the limit however, if you need high frequency updates, it's likely not the widget you should use.
What are you populating this widget with ? -
Hi,
I don't know the limit however, if you need high frequency updates, it's likely not the widget you should use.
What are you populating this widget with ?@SGaist said in the Qt6Gui.dll on eventvwr unknown error:
Hi,
I don't know the limit however, if you need high frequency updates, it's likely not the widget you should use.
What are you populating this widget with ?thank you for your reply.
In the subsequent process, I adjusted the test code and updated the value of QTextBrower more frequently, which has been able to stably reproduce the user's problem. I'm not sure about the actual reason, but after adjusting the code, this phenomenon has disappeared in the short term.
Before the adjustment, I used the global variable method and called QTextBrower's setTextCursor. Later, I changed it to the signal slot method and it was fine.My foundation in ptqt6 is very weak. Due to a project requirement, I started using it after a basic understanding. Previously, I didn't know much about Python and pyqt6
-
Hi,
I don't know the limit however, if you need high frequency updates, it's likely not the widget you should use.
What are you populating this widget with ?@SGaist said in the Qt6Gui.dll on eventvwr unknown error:
Hi,
I don't know the limit however, if you need high frequency updates, it's likely not the widget you should use.
What are you populating this widget with ?my application will continuously update the QTextBrower value in an irregular frequency, which may be 100ms, 20ms, or even shorter
such as:cover_cursor = label.textCursor() cover_cursor.setPosition(0) cover_cursor.movePosition(QTextCursor.MoveOperation.End, QTextCursor.MoveMode.KeepAnchor) cover_cursor.insertText(message) cover_cursor.movePosition(QTextCursor.MoveOperation.End) label.setTextCursor(cover_cursor)
The user is still being verified. If this phenomenon does not occur again next week, I will close this discussion (if it is caused by frequent updates of global variables, it would be good if the exception could be caught, but unfortunately, according to my writing, no exception was caught, only a crash)
-
The usual rule: don't use global variables, they are usually a sign of architecture issues and become hidden state that are hard to debug and reason about.