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
doxywizard freezes when large amounts of command line output is produced #10115
Comments
It looks like the entire output process dumps the information a little bit less "blocked" but I see one major problem i.e. that there are sometimes some extra newlines in the shown output like: whilst this normally should look more like: I ran the doxywizard on the internal documentation of doxygen Edit the output obtained from "Save log" doesn't have these empty lines. |
Appending everything as plain text (like this) fixes the issue but changes the text formatting. You can probably configure it to use the same font settings to match the look and feel and wrap the saved log with the tags to get the same HTML log as before. It might be a good idea to use |
…line output is produced Make the log output in the doxygen wizard more fluent.
Thanks for the link to the stack overflow answer (https://stackoverflow.com/questions/13559990/how-to-append-text-to-qplaintextedit-without-adding-newline-and-keep-scroll-at/18134824#18134824) this looks good. I've just pushed a proposed patch, pull request #10118 |
Thanks, i can confirm that those changes work as expected. Note that because the cursor is changed to the end it is not possible to scroll the output while doxygen is still working. |
issue #10115 doxywizard freezes when large amounts of command line output is produced
Code has been integrated in master on GitHub (please don't close the issue as this will be done at the moment of an official release). |
Regarding the scrolling (like mentioned in #10115 (comment)) I didn't find a solution. so suggestions are welcome (and I also created https://stackoverflow.com/questions/76430485/qtextbrowser-scroll-through-text-whilst-new-text-is-still-being-added) |
…line output is produced Have better control over the scrolling (see also https://stackoverflow.com/questions/76430485/qtextbrowser-scroll-through-text-whilst-new-text-is-still-being-added/76430591#76430591)
Regarding the scroll problem, I got an answer and this looks like to fix the problem. |
I can confirm that the fix works. I haven't encountered any other problems. |
issue #10115 doxywizard freezes when large amounts of command line output is produced
Code of #10119 has been integrated in master on GitHub (please don't close the issue as this will be done at the moment of an official release). |
This issue was previously marked 'fixed but not released', |
Describe the bug
When the doxygen command line program produces a lot of command line output the doxywizard program freezes.
This issue was mentioned in #9894 but that's closed so i'm reporting this separately with more information.
Expected behavior
The GUI stays responsive, showing command line output as it is produced until the program has finished.
To Reproduce
Running doxygen on a large project should produce sufficient output to cause the problem. The project where i encountered this problem has 500 source files with roughly 140000 lines of code. Alternatively modifying doxygen itself to produce more output should show the problem as well.
Version
1.9.7 (a2f34e1ed90f83713dc347b5134920f32c455d46)
The current Git master also has this problem.
Platform is Windows 10 64 bit.
Additional context
This happens because doxywizard uses an expensive method to format command line output:
m_outputLog
is aQTextEdit*
. Callingclear
and then adding the entire current log results in the wizard spending more and more time formatting the output. Eventually the program takes longer to format the text than it takes for more output to be produced, resulting in the wizard spending all of its time either formatting text or appending it to the text edit.The symptoms first appear as the text edit becoming blank (due to calling
clear
) before the program freezes altogether.The fix described in the issue linked above does not account for edge cases where the wizard reads part of a line resulting in additional line breaks being inserted.
This fix correctly handles output by appending it only if a whole line was read:
This fixes the freeze issues and keeps the UI responsive without noticeable slowdowns. It also reduces memory usage since
text1
no longer contains all of the command line output.Note that this code does not account for platform-specific line endings and does not handle edge cases where doxygen finishes before all output has been read.
There may be better ways to handle the logging of output from QProcess that don't involve using HTML which could simplify this solution to just appending the text that's been read.
The text was updated successfully, but these errors were encountered: