Bug 628761

Summary: OOo hangs for some time after start
Product: [openSUSE] openSUSE 11.3 Reporter: Michal Svec <msvec>
Component: OpenOffice.orgAssignee: Petr Mladek <pmladek>
Status: RESOLVED DUPLICATE QA Contact: Chao Wei <cwei>
Severity: Critical    
Priority: P2 - High CC: fizzyfanta, forgotten_10buyl7JnO, gfarrell, nopower
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: strace.log
Strace for the same/similar problem
strace of oocalc

Description Michal Svec 2010-08-05 15:15:23 UTC
Created attachment 380918 [details]
strace.log

When opening a file (ooffice file.odt), OOo "hangs" in a strange way.

The splash and progress is shown, the the main window opens, then
it freezes for 3s or so, then most of the toolbars are shown and the
contents of the file, but then it freezes for 20s or more, the window
does not get updated.

After this OOo works fine.

This happens when the first file is opened, when OOo is running it
seems to be also fine.
Comment 1 Kohei Yoshida 2010-08-06 18:56:27 UTC
Are you in KDE or Gnome when this happens?
Comment 2 Michal Svec 2010-08-06 19:25:16 UTC
KDE
Comment 3 Michal Svec 2010-08-06 19:27:31 UTC
But I have OOO_FORCE_DESKTOP=gnome (from the times when in 11.2 the KDE
integration was broken). Unsetting it does not help, will try more.
Comment 4 Kohei Yoshida 2010-08-09 15:00:17 UTC
Does this hang also occur when you open just an empty window for the first time?  Also, does this happen regardless of which application to open i.e. Writer, Calc, Draw, Impress etc?
Comment 5 Kohei Yoshida 2010-08-09 15:03:08 UTC
BTW, this sounds a lot like Bug 625877.  They may be pointing to the same issue.
Comment 6 Michal Svec 2010-08-09 15:16:52 UTC
It seems to happen also with an empty application (oowriter, oocalc),
definitely once I write a couple of letters after it starts.

Interestingly, it happens _after_ I write something. After oowriter is
started, the empty window is active and it shows up fast. But after I
write something (a couple of letters), it hangs, eats a lot of CPU and
recovers only after some time.

Looks like some dynamic loading of some stuff (something like spell
checker libraries loaded on demand or so).
Comment 7 Muthu Subramanian 2010-08-09 16:28:10 UTC
Created attachment 381638 [details]
Strace for the same/similar problem

Hope, this would also help:

Specifically, when I type in something in the cell (calc), ooo starts doing the set of "read"s (in the strace). once it completes, calc starts responding again.

This problem is with openSUSE 11.3 x86_64 openoffice (build 9505, ooo320-m19, 3.2.1).
Comment 8 Kohei Yoshida 2010-08-09 16:35:13 UTC
Try disabling the automatic spell check *before* you type anything.  Does that make any difference?
Comment 9 Adam N 2010-08-11 09:30:53 UTC
Remove the following software packages from yast > software management 

OpenOffice_org-LanguageTool
OpenOffice_org-LanguageTool-en

I am also experiencing the long delay at start after opening documents. Removing the language tool cured the issue.

I suspect it is the cause of your issue.
Comment 10 Michal Svec 2010-08-11 10:59:09 UTC
(In reply to comment #9)
> Remove the following software packages from yast > software management 
> 
> OpenOffice_org-LanguageTool
> OpenOffice_org-LanguageTool-en

That indeed helped. Now I don't experience the issue any more.
Comment 11 Noel Power 2010-08-13 10:06:08 UTC
Petr, Language tool for you? ( assuming so )
Comment 12 Noel Power 2010-08-13 10:07:06 UTC
*** Bug 625877 has been marked as a duplicate of this bug. ***
Comment 13 Geoff Farrell 2010-09-01 12:12:14 UTC
I have experienced the same problem with OOo Calc when opening the first file, but only on one machine. The other machine operates normally. Some observations from the machine that has the problem:

1. Packages OpenOffice_org-LanguageTool and OpenOffice_org-LanguageTool-en are installed.
2. Opening Tools-> Options-> Language Settings-> Writing Aids suffers a similar delay in opening that section of the dialog (12-15 seconds).
3. Disabling 'Check spelling as you type' in the 'Options' section fixes the problem. None of the other check items below that seem to trigger the delay.
4. After disabling 'Check spelling as you type', and the problem no longer manifests itself when opening files, accessing the Tools-> Options-> Language Settings-> Writing Aids section of the dialog still suffers from the delay.
Comment 14 Geoff Farrell 2010-09-13 11:36:57 UTC
On the machine that operates normally, I can induce the problem by enabling the 'Check spelling as you type' setting in the Options section. Taking that setting away also removes the problem.
Comment 15 Petr Mladek 2010-09-13 14:03:28 UTC
Ah, all the symptoms points to the bug #603316. Please, install all maintenance updates, especially the one for java-1_6_0-openjdk.

I am going to close this bug as a duplicate. Feel free to reopen it if the java update does not help.

*** This bug has been marked as a duplicate of bug 603316 ***
Comment 16 Forgotten User 10buyl7JnO 2010-09-13 14:46:11 UTC
I don't think so. I have latest java packages.

java-1_6_0-openjdk-1.6.0.0_b18-1.1.5.x86_64
java-ca-certificates-1-5.3.noarch
timezone-java-2010l-0.3.1.noarch
java-1_6_0-openjdk-plugin-1.6.0.0_b18-1.1.5.x86_64

I still face this issue.
Comment 17 Forgotten User 10buyl7JnO 2010-09-13 14:51:30 UTC
Quick note, I also have jre-1.6.0_21-fcs.x86_64, does that make any difference?
Comment 18 Petr Mladek 2010-09-14 09:22:48 UTC
Hmm, it is something new then. Could you please provide strace log? It is easy, see the instructions at http://en.opensuse.org/openSUSE:Bugreport_OOo#How_to_get_strace_log

It will need some debugging. I think that it might help to uninstall the OpenOffice_org-LanguageTool package as a temporary workaround.
Comment 19 Forgotten User 10buyl7JnO 2010-09-14 09:52:32 UTC
Created attachment 389440 [details]
strace of oocalc

As ooffice starts quick enough I'm attaching strace of actual file opening

strace -o /tmp/strace.log -f -tt -s 512  oocalc myfile.xls

This took longer as usual and generated attached strace.
Comment 20 Geoff Farrell 2010-09-14 11:00:02 UTC
I also still have the problem, even though I have the latest Java packages (same as Ruchir, same versions, except for the jre-1.6.0_21-fcs.x86_64 package).

Interestingly, I don't have the issue with an .odt file. With Writer, my documents open without delay. I only have the issue with Calc and .ods files. Once an OOo application other than Calc has started (and it doesn't have to open a file - just an open empty application will do) any file opened within Calc then opens without the delay. If Calc is the first application started, it suffers the delay for the first document opened, but not for subsequent documents opened. I tried with other OOo applications (Draw, Impress) and did not get the delay when they opened files. So it seems that Calc is the only OOo program affected.

I thought it might be connected with OpenOffice_org-QuickStarter, but when I uninstalled that package, the behaviour of Calc was unchanged.
Comment 21 Forgotten User 10buyl7JnO 2010-09-14 11:06:25 UTC
It happens for me on word docs also. I didn't test other types. Once one instance is open other docs open quickly. If no instance running then it takes much longer to start. For now I removed OpenOffice_org-LanguageTool  and OpenOffice_org-LanguageTool-en and the work around works fine for me.
Comment 22 Geoff Farrell 2010-09-14 11:11:21 UTC
I don't have to uninstall the Language tool. As in Comment #13, de-selecting the 'Check spelling as you type' option is a sufficient workaround for me.
Comment 23 Forgotten User 10buyl7JnO 2010-09-14 11:20:09 UTC
Yeah I overlooked it. That also works fine for me.
Comment 24 Petr Mladek 2010-09-17 19:50:16 UTC
There are some crashes in the strace. I will try to debug it.

I think that the LanguageTool extension does some mess when it is being initialized. It might happen when it tries to detect the dictionaries. The detection is a kind of hack, ...
Comment 25 Petr Mladek 2013-02-15 14:27:09 UTC
This looks like a duplicate of the bug #785203.

*** This bug has been marked as a duplicate of bug 785203 ***