Bug 336388 - Starts very slow after closed / closed process hangs
Summary: Starts very slow after closed / closed process hangs
Status: RESOLVED UPSTREAM
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.19.60
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-18 10:12 UTC by Ondřej Hruška
Modified: 2014-07-10 22:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ondřej Hruška 2014-06-18 10:12:23 UTC
After I close *any* running Okular instance, starting Okular becomes very slow for quite some time. Eventually this effect disappears.

Reproducible: Always

Steps to Reproduce:
1. Start okular (click on a PDF file)
2. Close the Okular window
3. Start okular again
Actual Results:  
The second start will take around 10 seconds or more.

Expected Results:  
Should be as fast as the first time

Starting multiple Okular instances is fine - very fast. But once you close at least one of them, the next one to start will take AGES to open (ages = over 10 seconds).

Could be related to the fact that after closing Okular window, the process is still running - "killall okular" succeeds.

Here's a output from terminal in one okular run

[code]
$ okular vektorova_analyza.pdf 
okular(8964)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(8964)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(8964)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(8964)/kdeui (kdelibs): Shortcut for KAction  "mainToolBar" "Show &Toolbar" set with QShortcut::setShortcut()! See KAction documentation. 
okular(8964) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-excel.sheet.binary.macroEnabled.12" 
okular(8964) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-excel.addin.macroEnabled.12" 
okular(8964) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-powerpoint.slideshow.macroEnabled.12" 
okular(8964) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-excel.sheet.macroEnabled.12" 
okular(8964) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-powerpoint.presentation.macroEnabled.12" 
okular(8964) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-word.template.macroEnabled.12" 
okular(8964) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-excel.template.macroEnabled.12" 
okular(8964) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-powerpoint.template.macroEnabled.12" 
okular(8964) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-word.document.macroEnabled.12" 
okular(8964) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-powerpoint.slide.macroEnabled.12" 

// now I closed the window
// around 10 seconds delay

QClipboard: Unable to receive an event from the clipboard manager in a reasonable time
$
[/code]

My system: ArchBang Linux
Okular package: aur/okular-git

Okular version:
$ okular --version
Qt: 4.8.6
KDE Development Platform: 4.13.2
Okular: 0.19.60

My clipboard program: xfce4-clipman
Comment 1 Albert Astals Cid 2014-06-18 22:53:15 UTC
The QClipboard warning seems to indicate something is indeed unhappy. Can you try not running xfce4-clipman? Or running something different altogether (i.e. Plasma or Gnome3)? Does it still happen?
Comment 2 Ondřej Hruška 2014-06-22 09:48:26 UTC
(In reply to comment #1)
> The QClipboard warning seems to indicate something is indeed unhappy. Can
> you try not running xfce4-clipman? Or running something different altogether
> (i.e. Plasma or Gnome3)? Does it still happen?

I've tried running it in different environment (basically Xfce with OpenBox), and it works flawlessly. Not sure what exactly is different, though.

Any ideas what to try, to narrow down the problem?
Comment 3 Albert Astals Cid 2014-07-10 21:44:53 UTC
well, there's some clipboard problems between qt and what you use, on your Xfce with OpenBox do you also use  xfce4-clipman ? What environment are you using when it fails?
Comment 4 Ondřej Hruška 2014-07-10 21:48:18 UTC
It's acting weird on: Openbox, Tint2, xfce4-clipman, LXDM. It's almost vanilla ArchBang.
Works good on Openbox, Xfce4-panel, Xfce except XFWM, xfce4-clipman, LXDM.
Comment 5 Albert Astals Cid 2014-07-10 22:01:45 UTC
Do you have this problem with any other Qt/kdelibs based software or only with okular?
Comment 6 Ondřej Hruška 2014-07-10 22:07:00 UTC
Just checked, it's them all - Both Kate and Kwrite have from the same issue.

After you close the app window, it hands and then complains about the QClipboard.
While it's hung, the same app can't be started (well, it is started, but doesn't show window, until the old one is terminated).

Interestingly, I can run Okular while Kate is hung, so it's some per-application mutex kind of thing, it's not global.

Hope that helps.
Comment 7 Ondřej Hruška 2014-07-10 22:10:03 UTC
sorry for typos, can't edit :(
I meant *have the same issue, *hangs
Comment 8 Albert Astals Cid 2014-07-10 22:11:51 UTC
Yes, it's something in Qt not understanding the clibpoard system you have. Unfortunately at this point all i can say is that it's either a kdelibs bug or a Qt bug.

I'd vote for a Qt bug, see if you can reproduce it with a symple Qt program like assistant and if you can you can try reporting a bug against Qt upstream at https://bugreports.qt-project.org/ though don't think that they are doing much 4.8 development anymore.

I am going to close this bug since it's a bit outside the "okular bug" realm, sorry i can't really help you more and good luck :)
Comment 9 Albert Astals Cid 2014-07-10 22:12:28 UTC
I would also suggest you talking with some of the "Openbox, Tint2, xfce4-clipman, LXDM" as the bug may be hiding there too.
Comment 10 Ondřej Hruška 2014-07-10 22:14:56 UTC
Yeah, no problem, I've already created a shortcut to "killall okular", so it's really just a minor annoyance. I'll also try installing some additional kdebase packages, in case I missed something.

Thanks for suport ;)