Qt resource overflow. Highly annoying. How to fix?
-
Am I the only one who regularly experiences this annoying phenomenon?
When there are a few application windows open, one eventually reaches a point where Qt applications begin to show empty windows and menus, making working with Qt apps impossible.
It is the same as with old Windows, when the GDI ran out of resources. With Windows 4, Microsoft fixed this by granting every app a separate 64kb GDI resource pool instead of having all apps share the same 64Kb GDI pool.Atm there are only 67 windows open and this nuisance again begins...
Of these are Qt: 21 Konsole, 1 K3b, 1 Dolphin, 4 Ark, 1 Kate, 7 Okular, 1 KWrite
How do I increase the Qt resource buffer size, so that Qt does no longer break when opening a few Qt apps?
-
Hi and welcome to devnet,
What window manager are you using ?
On what distribution ?
What graphic card do you have ?
What version of Qt ?From the look of your application list it seems you are using KDE but the window decoration looks pretty old.
-
Thank you for welcoming!
WM is FVWM, on FreeBSD with Nvidia.
But that seems not really matter, as I can reproduce the same behavior using KDE also, and on various Linuxes.
And this behavior is not new, too. I encounter this regularly for years.
I have then to close a few Qt apps to make it work again.
The way to reproduce is to open a LOT of Qt apps/windows, at least three to four dozen. -
I'd take contact with the KDE folks also.
Do you also get that if you are opening Qt only applications ? (meaning not using KDE frameworks)
-
-
@Snurg said in Qt resource overflow. Highly annoying. How to fix?:
Could you suggest me a few Qt apps outside of the KDE environment, that I could download and try whether they behave different?
Here are some that I use:
- Qt Creator
- MuseScore
- Open Broadcaster Software
- qBittorrent
- Wireshark
- VirtualBox
Also, what versions of FreeBSD and FVWM are you using? How much RAM do you have? What graphics card do you have?
-
@JKSH Thank you very much! I will install these apps and see if the bug shows up when I create many windows using these, too.
FreeBSD: 11.1 Release
fvwm 2.6.7: compiled with support for: ReadLine, XPM, Shape, XShm, SM, Xinerama, XRender, XCursor, XFT, NLS
RAM: 48GB (23GB free atm)
Nvidia Quadro 2000 (using Nvidia proprietary driver) -
You're welcome.
@Snurg said in Qt resource overflow. Highly annoying. How to fix?:
FreeBSD: 11.1 Release
fvwm 2.6.7: compiled with support for: ReadLine, XPM, Shape, XShm, SM, Xinerama, XRender, XCursor, XFT, NLS
RAM: 48GB (23GB free atm)
Nvidia Quadro 2000 (using Nvidia proprietary driver)These are certainly very modern hardware and software... I'd expect them to be perfectly capable of handling today's typical demands.
I've never seen a phenomenon like yours, sorry (although I mainly use Windows 10 nowadays)
@Snurg said in Qt resource overflow. Highly annoying. How to fix?:
With Gtk/Gnome apps there is no such issue.
Do you mean: When you have reached the state where the KDE app menus go blank, the GTK/Gnome app menus are still OK?
-
@JKSH said in Qt resource overflow. Highly annoying. How to fix?:
Do you mean: When you have reached the state where the KDE app menus go blank, the GTK/Gnome app menus are still OK?
Yes.
Apps that do not use KDE/Qt are not affected at all.I can continue to open more Gtk and other apps without issues, after I reached the state that KDE/Qt apps only create empty windows (i.e. menus, dialogs, windows).
When the issue starts with the KDE/Qt apps, and I need additional terminals, editors, viewers etc, I have no choice to use non-KDE/Qt alternatives instead, as they do never show such issues. I can still open dozens more of them and work with them.
(The reason why I use FVWM is that it makes easy to have several projects open at the same time, without the need to overlap or stack them. This is why so many programs and windows. I find it easier to have their workspaces in parallel, so I can easily switch from one to another project without every time having to restart all applications related.)
Probably very few people have that many apps open and in use at the same time. This session the problem didn't show up before the 36th KDE/Qt app window.
Maybe that is the reason why nobody else reported this issue... -
Hi @Snurg,
Maybe that is the reason why nobody else reported this issue...
Given that really few users will have a setup like yours, it might be favorable to post your problem on the Interest mailing list. Or you can create a report on bugreports.qt.io In both cases you reach more Qt developers that can give you better hints.
It would be nice if you report back here when you get new information. Thanks.
-
@JKSH
I am currently installing all the apps you suggested. I also did a system update and had to reboot, thus the old session is gone. My idea for now is:- Work as usual until the issue appears again.
- Then run the apps that you listed.
If the problem does not affect them, I think one could exclude Qt as cause, as this would then hint at the KDE framework as cause.
-
Hi @jsulm, I checked the system and xorg logs. Sadly, there never is nothing what could hint at a cause for this problem. Just the usual normal messages.
The problem appeared when I installed and played around with ipmitool. But as this is no GUI stuff, I don't think that this was the cause. When I noticed the blank menu window, I installed and fired up Gimp to make screenshots (as Kolourpaint is of little use with a blank program window).
I'll "rebuild" the whole desktop workspace with many apps/windows today and report back when the issue returns.
By the way, are there utilities that can display stats about the Qt system (windows open, memory, resource usage etc?) Maybe such could assist finding what is wrong?
Thank you all for your help! -
-
Update:
Finally the bug re-appeared, a bit later than hoped for, as I had to reboot a few times due to updates.
As I promised to report back, here are the findings:When the blank windows/menus reappeared today, I did run a bunch of the non-KDE Qt apps from the list @JKSH provided above. The "pure" Qt apps seem unaffected, all is displayed fine.
Conclusion: It seems to be KDE related. Qt probably is not to blame.As you are probably curious what actually happened, the console output after starting the failing apps begins with:
% kolourpaint
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x172
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 3 (X_ShmPutImage)
Resource id: 0x3c00012
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 3 (X_ShmPutImage)
Resource id: 0x3c00012The last message then got spammed numerous times.
If I start more KDE apps, the output is the same, with the ResourceID increasing by 2 for every new KDE app.So I guess it is no Qt issue, but a KDE problem.
I'll report the thing in the KDE bugzilla and there refer to this forum link for details.Thank you very much for your assistance, and have a nice day, you Qt guys :)
-
@Snurg Thanks for your detailed report. We hope you manage to resolve your issue.
I found this post by a developer who had similar issues with MIT-SHM: https://github.com/marazmista/radeon-profile/issues/8 See if setting the environment variable
QT_X11_NO_MITSHM=1
helps. -
@Snurg said in Qt resource overflow. Highly annoying. How to fix?:
I'll report the thing in the KDE bugzilla and there refer to this forum link for details.
Please also add a link to the bugreport here, in case somebody later has the same problem.
Thanks.
-
@JKSH said in Qt resource overflow. Highly annoying. How to fix?:
QT_X11_NO_MITSHM=1
Setting this appears to work around the issue indeed!
(However, I had to reboot quite often the last days, thus my sessions didn't get that monstrous. So this is yet preliminary impression.)Another thing that I haven't yet verified is the impression that when I set the Konsole scrollback buffer from 10k to 50k lines, the problem set on quicker. I'll verify this with even larger values, with both QT_X11_NO_MITSHM set and not set.
Here the link to the bugreport I forgot (includes other links, too): https://bugreports.qt.io/browse/QTBUG-65681
I'll report back when I tested and found out whether this affects KDE 5, too.Thank you Qt guys again for your great help :)
Have a nice day!