Navigation Menu

Skip to content
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

Open/Save File Dialogs cause 100% CPU Usage (Qt5 build) #1635

Closed
KRicketts6237 opened this issue Oct 14, 2018 · 5 comments
Closed

Open/Save File Dialogs cause 100% CPU Usage (Qt5 build) #1635

KRicketts6237 opened this issue Oct 14, 2018 · 5 comments

Comments

@KRicketts6237
Copy link

When running CudaText, I've noticed that if I open an open file or save file dialog, the CPU usage of CudaText jumps to 100% and stays there even after the dialog has been closed. It does not seem to impact functionality, directly. It is, however, undesirable behavior.

It's best to use top or htop to check this behavior. I've noticed that applications like gnome-system-monitor will divide usage by the number of threads your CPU has. For example, I have 8 threads and the system monitor reports CudaText as using only 12% of my CPU.

I am unable to check if this behavior exists on Windows or Mac OS X. I have been able to cause the bug two different Debian systems.

To Reproduce:

  1. Open a terminal window and run top
  2. Run CudaText and invoke a file save/open dialog box.
  3. Close the file dialog either by opening a file or cancelling.

Thank you!

@Alexey-T
Copy link
Owner

Alexey-T commented Oct 14, 2018

imho, file open/save dialogs are native, ie from OS, so their CPU usage is OS issue. not Lazarus issue.
same must be in other Lazarus apps.

@Alexey-T
Copy link
Owner

and I cannot repeat it here (Ubuntu).

@KRicketts6237
Copy link
Author

Since you mentioned the dialog boxes are native, I had an idea. I believe it may be related to libqt5pas. I use KDE and originally built Lazarus and CudaText for Qt5. I rebuilt using Gtk2 and the problem seems to have been mitigated. I am led to believe that the problem is with libqt5pas because I have not experienced with problem with other Qt5 applications.

If anyone else runs into this problem, try recompiling Lazarus and CudaText with the LCL Widget Type set to Gtk2.

@Alexey-T
Copy link
Owner

thanks for this note, agree that Qt5 lib has a bug, or Lazarus.

@Alexey-T Alexey-T changed the title Open/Save File Dialogs cause 100% CPU Usage Open/Save File Dialogs cause 100% CPU Usage (Qt5 build) Oct 15, 2018
@Alexey-T
Copy link
Owner

posted bugreport to http://forum.lazarus.freepascal.org/index.php/board,29.0.html
so you can watch it. I close this topic. not Cud bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants