[kde] [Bug 504487] [ANR] Closing the "Keyboard Shortcuts" window whilst it is waiting for the "Print" window to appear causes a crash.
https://bugs.kde.org/show_bug.cgi?id=504487 Roke Julian Lockhart Beedell <[email protected]> changed: What|Removed |Added Resolution|--- |UPSTREAM Status|REPORTED|RESOLVED -- You are receiving this mail because: You are watching all bug changes.
[kde] [Bug 504487] [ANR] Closing the "Keyboard Shortcuts" window whilst it is waiting for the "Print" window to appear causes a crash.
https://bugs.kde.org/show_bug.cgi?id=504487 --- Comment #16 from Roke Julian Lockhart Beedell <[email protected]> --- Created attachment 181687 --> https://bugs.kde.org/attachment.cgi?id=181687&action=edit A Screencast Demonstrating That This Affects All Qt 6 Applications (In reply to Roke Julian Lockhart Beedell from comment #11) > I suppose we can consider CUPS the most *significant* culprit, but on > Windows, this is instantaneous, so there's more at play. Per [`bbs.archlinux.org/viewtopic.php?pid=1279792#p1279792`][1], I've ascertained that the cause is `avahi-daemon.service` (or, at least, its default configuration). Consequently, I have filed https://github.com/avahi/avahi/issues/701#issue-3087466051 to, hopefully, replace this. If not, it's at worst a Qt issue, rather than a KDE one, since it affects a custom PyQt6 application of mine, too. [1]: https://bbs.archlinux.org/viewtopic.php?pid=1279792#p1279792:~:text=but%20after%20I%20setup%20my%20network(with%20help%20of%20a%20question%20created%20by%20me%20on%20unix.stackexchange.com)%20I%20discovered%20that%20problem%20isn't%20cups%20and%20isn't%20network%2C%20the%20problem%20is%20the%20avahi%2Ddaemon%2C%20if%20it's%20runnig%20the%20cups%20is%20slow%2C%20if%20it%20isn't%20cups%20is%20normal... -- You are receiving this mail because: You are watching all bug changes.
[kde] [Bug 504487] [ANR] Closing the "Keyboard Shortcuts" window whilst it is waiting for the "Print" window to appear causes a crash.
https://bugs.kde.org/show_bug.cgi?id=504487 --- Comment #15 from Roke Julian Lockhart Beedell <[email protected]> --- (In reply to Roke Julian Lockhart Beedell from comment #11) ...Ignore that NextCloud URI. I wrote that comment in a text editor, and meant to leave that as a note to self to remove once I published the comment. Apologies for the noise. -- You are receiving this mail because: You are watching all bug changes.
[kde] [Bug 504487] [ANR] Closing the "Keyboard Shortcuts" window whilst it is waiting for the "Print" window to appear causes a crash.
https://bugs.kde.org/show_bug.cgi?id=504487 --- Comment #13 from Roke Julian Lockhart Beedell <[email protected]> --- Created attachment 181660 --> https://bugs.kde.org/attachment.cgi?id=181660&action=edit A Perf Record, For Comment 11 -- You are receiving this mail because: You are watching all bug changes.
[kde] [Bug 504487] [ANR] Closing the "Keyboard Shortcuts" window whilst it is waiting for the "Print" window to appear causes a crash.
https://bugs.kde.org/show_bug.cgi?id=504487 --- Comment #14 from Roke Julian Lockhart Beedell <[email protected]> --- Created attachment 181661 --> https://bugs.kde.org/attachment.cgi?id=181661&action=edit A KWrite STrace Record, For Comment 11 -- You are receiving this mail because: You are watching all bug changes.
[kde] [Bug 504487] [ANR] Closing the "Keyboard Shortcuts" window whilst it is waiting for the "Print" window to appear causes a crash.
https://bugs.kde.org/show_bug.cgi?id=504487 Roke Julian Lockhart Beedell <[email protected]> changed: What|Removed |Added Attachment #181660|A Perf Record, For Comment |A KWrite Perf Record, For description|11 |Comment 11 -- You are receiving this mail because: You are watching all bug changes.
[kde] [Bug 504487] [ANR] Closing the "Keyboard Shortcuts" window whilst it is waiting for the "Print" window to appear causes a crash.
https://bugs.kde.org/show_bug.cgi?id=504487 Roke Julian Lockhart Beedell <[email protected]> changed: What|Removed |Added Attachment #181659|A Screencast Of STrace, For |A Screencast Of STrace description|Comment 11 |Attached To KWrite, For ||Comment 11 -- You are receiving this mail because: You are watching all bug changes.
[kde] [Bug 504487] [ANR] Closing the "Keyboard Shortcuts" window whilst it is waiting for the "Print" window to appear causes a crash.
https://bugs.kde.org/show_bug.cgi?id=504487 Roke Julian Lockhart Beedell <[email protected]> changed: What|Removed |Added Attachment #181658|A KCrash For Krita |A KCrash Of Krita, For description||Comment 11 -- You are receiving this mail because: You are watching all bug changes.
[kde] [Bug 504487] [ANR] Closing the "Keyboard Shortcuts" window whilst it is waiting for the "Print" window to appear causes a crash.
https://bugs.kde.org/show_bug.cgi?id=504487 Roke Julian Lockhart Beedell <[email protected]> changed: What|Removed |Added Attachment #181659|A Screencast Of STrace |A Screencast Of STrace, For description||Comment 11 -- You are receiving this mail because: You are watching all bug changes.
[kde] [Bug 504487] [ANR] Closing the "Keyboard Shortcuts" window whilst it is waiting for the "Print" window to appear causes a crash.
https://bugs.kde.org/show_bug.cgi?id=504487 --- Comment #12 from Roke Julian Lockhart Beedell <[email protected]> --- Created attachment 181659 --> https://bugs.kde.org/attachment.cgi?id=181659&action=edit A Screencast Of STrace -- You are receiving this mail because: You are watching all bug changes.
[kde] [Bug 504487] [ANR] Closing the "Keyboard Shortcuts" window whilst it is waiting for the "Print" window to appear causes a crash.
https://bugs.kde.org/show_bug.cgi?id=504487 --- Comment #11 from Roke Julian Lockhart Beedell <[email protected]> --- Created attachment 181658 --> https://bugs.kde.org/attachment.cgi?id=181658&action=edit A KCrash For Krita (In reply to Nate Graham from comment #9) > Why were you trying to open the print dialog if you don't have a printer? To > make a PDF? Yes. I thought it might be a useful way to visualise (or, crudely, backup) keyboard shortcuts. (In reply to Mike from comment #10) > there is at least one timeout in the code path, maybe two. I've captured a Perf and STrace record, if of use. I've plonked them in https://collaborate.kde.org/apps/files/files/684451?dir=/%27Custom%27%23.dir/%27Publicly%20Accessible%27%23.dir/%27bugs.KDE.org%27%23.dir/%27504487%27%23.dir, but shall attach them once I've submitted this comment. About STrace, I saw, whilst the printer is loading, a multitude of ultimately quite quick calls, repeatedly occurring until the dialog appears: > 0.48 read(28, "W", 10) = 1 <0.11> > 0.30 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050086> > 0.050137 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050083> > 0.050127 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050084> > 0.050134 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050091> > 0.050139 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050088> > 0.050154 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050088> > 0.050147 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050088> > 0.050135 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050088> > 0.050134 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050078> > 0.050122 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050081> > 0.050126 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050080> > 0.050126 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050097> > 0.050146 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050041> > 0.050095 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050088> > 0.050139 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050089> > 0.050148 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050090> > 0.050160 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 0 > (Timeout) <0.050088> > 0.050151 poll([{fd=28, events=POLLIN}, {fd=30, events=POLLIN}], 2, 50) = 1 > ([{fd=30, revents=POLLIN}]) <0.048304> > 0.048380 recvmsg(30, {msg_name=NULL, msg_namelen=0, > msg_iov=[{iov_base="l\4\1\1\0\0\0\0\220\0\0\0\215\0\0\0\1\1o\0\31\0\0\0/Client1"..., > iov_len=2048}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, > MSG_CMSG_CLOEXEC) = 320 <0.34> >From what I see, this doesn't occur before or after I invoke the dialog. ...About CUPS: > One thing you could try is to turn off your networking, then try the print > and see if the dialog still takes "a while" to present. CUPS will do some > IPP/network "stuff" to discover printers on your net. > > You could disable CUPS `sudo systemctl stop cups.service` and then try the > print and see what happens there. I stopped it, and verified it was: > Loaded: loaded (/usr/lib/systemd/system/cups.service; disabled; preset: > disabled) This made it almost ⪆ 4s faster, but it still takes ⪅ 2.5s to appear, which is still bad on a system with 32 GiB of DDR5 SDRAM! 😆 However, disabling Ethernet reduced it by *maybe* ⪅ 0.5s, if I'm not merely experiencing confirmation bias / placebo / whatever. I suppose we can consider CUPS the most *significant* culprit, but on Windows, this is instantaneous, so there's more at play. (In reply to Roke Julian Lockhart Beedell from comment #6) > This *does not* affect Krita, nor SkanPage It *does* affect Krita too, per https://discuss.kde.org/t/is-a-kde-application-not-providing-a-bug-reporting-address-a-bug/34640?u=rokejulianlockhart. The reason SkanPage doesn't appear affected appears to be that it solely exposes one keyboard shortcut. At least that demonstrates that the quantity of shortcuts affects invocation time. I'll presume you knew this, though, you backtrace-reading nutters. -- You are receiving this mail because: You are watching all bug changes.
[kde] [Bug 504487] [ANR] Closing the "Keyboard Shortcuts" window whilst it is waiting for the "Print" window to appear causes a crash.
https://bugs.kde.org/show_bug.cgi?id=504487 --- Comment #10 from Mike --- Nate is correct, this is essentially an "app" using print services provided by Qt. In my case, I get modal behavior immediately, meaning once the print button is clicked, I can't close the window while waiting for the modal print dialog to present. Even then, it still acts modal. And I too, am on Qt6.9. I'm more familiar with the config/setup side of printer management, not so much print services provided by Qt, but I can tell you this: there is at least one timeout in the code path, maybe two. It's been a while, but IIRC, Qt is looking for/initializing print services backend (CUPS) and then CUPS is looking/waiting for it's own backends to enumerate. The latter can take a some seconds I've noticed and it appears to be directly related to not just CUPS backends installed, but also the number of "filters" you have installed, ie. cups-filters, hplip-*, epson, etc... One thing you could try is to turn off your networking, then try the print and see if the dialog still takes "a while" to present. CUPS will do some IPP/network "stuff" to discover printers on your net. In addition, you could disable CUPS `sudo systemctl stop cups.service` and then try the print and see what happens there. Turn it back on later with systemctl start cups, fyi. Not sure this helps but it might give some clues on where to dig in first. -- You are receiving this mail because: You are watching all bug changes.
[kde] [Bug 504487] [ANR] Closing the "Keyboard Shortcuts" window whilst it is waiting for the "Print" window to appear causes a crash.
https://bugs.kde.org/show_bug.cgi?id=504487 Nate Graham changed: What|Removed |Added CC||[email protected] Assignee|[email protected]|[email protected] Product|frameworks-kxmlgui |kde Component|general |general Version First|6.14.0 |unspecified Reported In|| --- Comment #9 from Nate Graham --- The fact that the print dialog takes a long time to appear when it shouldn't is probably the real issue to dig into here; if it was fast, you wouldn't try to close its parent window — and in fact could not, because by the time you tried, the print dialog would already be visible. I'm not sure there's much we can do here though, since the print dialog comes from Qt directly. CCing a printer-savvy person who may know more. P.S. why were you trying to open the print dialog if you don't have a printer? To make a PDF? -- You are receiving this mail because: You are watching all bug changes.
[kde] [Bug 504487] [ANR] Closing the "Keyboard Shortcuts" window whilst it is waiting for the "Print" window to appear causes a crash.
https://bugs.kde.org/show_bug.cgi?id=504487 Bug Janitor Service changed: What|Removed |Added Sentry Crash||https://crash-reports.kde.o Report||rg/organizations/kde/issues ||/183325/events/38c4f63efea4 ||42a19fb00fce5c316813/ -- You are receiving this mail because: You are watching all bug changes.
[kde] [Bug 504487] [ANR] Closing the "Keyboard Shortcuts" window whilst it is waiting for the "Print" window to appear causes a crash.
https://bugs.kde.org/show_bug.cgi?id=504487 Roke Julian Lockhart Beedell <[email protected]> changed: What|Removed |Added Version First|25.04.1 |unspecified Reported In|| Product|dolphin |kde Component|general |general Assignee|[email protected] |[email protected] -- You are receiving this mail because: You are watching all bug changes.
