Bug 92006

Summary: CRTL-F command conflicts with large document opening phase
Product: LibreOffice Reporter: CBhihe <cedric.bhihe>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: ilmari.lauhakangas
Priority: medium    
Version: 4.2.8.2 release   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: Example of sanitized odt file with which the pbm happens.

Description CBhihe 2015-06-11 09:10:02 UTC
Context:
Dealing with large text and table documents, it takes time to open them.
Typically 6 or 7 s for a 200 page document on my system.
(Documents have plain odt format, no fancy formating except for font, tabulations and the occasional table and centered titles)
============================
Problem:
When not all pages have loaded yet and CTRL+F is invoked, to search for an occurrence of a string within said document.
============================
Manifestation:
LO-Writer freezes; i.e. LO window darkens & becomes unresponsive. The window can be moved but nothing in the window can - document stops loading, really s-t-o-p-s !
=========================== 
Work-around:
Kill LO, restart and that next time around, wait for the last page to be loaded before punching CTRL+L.
===========================
Can be easily reproduced.
100% occurence in my case with any number of large files.
Comment 1 CBhihe 2015-06-11 09:12:50 UTC
Additional Comment:
Documents have all one thing in common: They are all heavy on Endnotes (notes referenced at the end of the documents).
Comment 2 Buovjaga 2015-06-12 14:52:28 UTC
Could you provide an example document? You can anonymize it: https://wiki.documentfoundation.org/QA/Bugzilla/Sanitizing_Files_Before_Submission#Sanitize_file_text

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.
Comment 3 CBhihe 2015-06-12 20:16:09 UTC
Created attachment 116490 [details]
Example of sanitized odt file with which the pbm happens.

I sanitized an example 100+ page odt file and also removed hyperlinked in its main table. On the other hand, I did not removed hyperlinks contained in it end of file notes.
Comment 4 Buovjaga 2015-06-13 14:07:13 UTC
On Windows, no problem.
On Linux, it got a bit dark for a while, but nothing permanent.

I recommend you try 4.4.x as 4.2 and even 4.3 are EOL.

Please report here, if the darkness goes away with 4.4.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: d56b125f6c6c18ac40712cefc3cec06530750e15
TinderBox: Win-x86@39, Branch:master, Time: 2015-06-13_07:08:43
Locale: fi-FI (fi_FI)

Ubuntu 15.04 64-bit 
Version: 5.1.0.0.alpha1+
Build ID: a9286c302e96258f32d13fb66aced25750e82cd3
TinderBox: Linux-rpm_deb-x86_64@46-TDF-dbg, Branch:master, Time: 2015-06-13_00:35:08
Locale: en-US (en_US.UTF-8)
Comment 5 CBhihe 2015-06-14 15:44:12 UTC
@Beluga: 2 comments
1) For me the freeze is permanent and it occurs everytime. It seems that requesting CTRL+F, typing in [keyword]and pressing the Enter key conflicts with loading the file. I have no idea where the problem may originate, whether the call is badly handled by the OS or whether something does not quite agree with probing the reserved memory alloc just when that memory is loading its content. I am no dev, nor a Lx-tech, so I am stumped. What screams in my face is that this happens with ANY file large enough for the loading process to be long, so I have time to type in the sequence: 'CTRL+F [keyword] Enter'. 

2) You suggested installing 4.4.x. So I did. So far I had not tried to install packages outside the Ubuntu Software Center.
Here is what I did from Terminal:
> alias sag='sudo apt-get'
> sudo add-apt-repository -y ppa:libreoffice/ppa
> sag update; sag dist-upgrade
Then I copied the content of ~/.config/libreoffice/4/user in a backup directory
and killed everything related to Libreoffice that ran
> ps -aux | egrep libreoffice | awk -F" " '{print $2}' | kill -9
> sag purge libreoffice*
I downloaded LibreOffice_4.4.3_Linux_x86-64_deb.tar.gz from the LibreOffice Download page and put it in /opt/
> sudo chown root:root LibreOffice_4.4.3_Linux_x86-64_deb.tar.gz
> sudo chmod go+rw LibreOffice_4.4.3_Linux_x86-64_deb.tar.gz
> tar xzvf 4.4.3_Linux_x86-64_deb.tar.gz
> cd LibreOffice_4.4.3_Linux_x86-64_deb.tar.gz/DEBS
> sudo dpkg -i *.deb
OS restart and trial of LO.
Result:
The thing has gone completely spastic. Opening previous document was successful albeit quite a bit slower than with 4.2.x. After opening , the mere fact of checking options to see that all was well app-config-option wise made Writer crash no less than 4 times in a row. 
That install is unusable as is. Did I do st wrong ?
Do I have to start again fresh with the LO install ? 
If so how do I get rid of 4.4.3 and _everything_ pertaining to it in the first place ?  Would the following be enough for that ?
> sag --purge remove libreoffice* ; sag --purge autoremove
Comment 6 Buovjaga 2015-06-14 16:12:01 UTC
(In reply to CBhihe from comment #5)
> Here is what I did from Terminal:
> > alias sag='sudo apt-get'
> > sudo add-apt-repository -y ppa:libreoffice/ppa
> > sag update; sag dist-upgrade

The above would have been enough to install it.

I don't know how to undo the results of sudo dpkg -i *.deb
Comment 7 Buovjaga 2015-06-14 16:47:28 UTC
(In reply to Beluga from comment #6)
> I don't know how to undo the results of sudo dpkg -i *.deb

I got an answer that dpkg installs are tracked by the package manager, so you should be able to uninstall it from there (Synaptic or whichever you have).
Comment 8 Philippe Jung 2015-06-14 17:04:55 UTC
On my Mint system, after manual installation with dpkg -i, I reeach a point where some LO OS packages of the previous version were still present. 
The solution I found was to remove the packager provided packages with synaptic, trying to remove all LO base, pyUNO, core and so on.
Then install debs from LO site by downloading them locally, untar, dpkg -i

With two versions installed, I was able to have strange situations (some LO4.4 lib loaded by LO4.2 if i remember well)

Probably applicable to Ubuntu.

Philippe
Comment 9 CBhihe 2015-06-14 17:08:51 UTC
Actually I use the plain Ubuntu Software Center, usc, not synaptic. 
My install from yesterday (still there - I have not removed it yet, because I don't know how to) does not show on it.
Curiously my terminal command:
> sudo apt-get purge libreoffice*
which resulted in the deinstall of my libreoffice 4.2.x also does not show in the uninstall section of usc.

I just tried 
> dpkg -V libreoffice
exits silently without doing a thing.
> dpkg -r libreoffice # to remove
produces message saying that package is not installed.

I will keep at it. I need LibreOffice to be able to work tomorrow.
Comment 10 Buovjaga 2015-06-14 17:16:45 UTC
I think you should install Synaptic through the Ubuntu Software Center and then follow Philippe's advice.
Comment 11 CBhihe 2015-06-14 17:19:56 UTC
@Philippe
I had removed libreofice 4.2.x with 
> sudo apt-get purge libreoffice
prior to installing LO v4.4.3.2. I precisely wanted to avoid having two versions of the same package installed at the same time.

I just tried:
> cd /opt/LibreOffice_4.4.3.2_Linux_x86-64_deb/DEBS
> sudo dpkg -r *.deb
dpkg: error: you must specify packages by their own names, not by quoting the names of the files they come in

??? I am stumped. Should I uninstall the 46 .deb packages in /opt/LibreOffice_4.4.3.2_Linux_x86-64_deb/DEBS one at a time and by hand ?
Comment 12 CBhihe 2015-06-14 17:54:11 UTC
@Beluga, @Philippe,
ok. Synaptic installed. Nifty but I must say that I literally don't know what I am getting into here. It boils down to this: filtering all available packages with the keyword 'libreoffice', I get 294 packages listed !! The question is: which do I remove, and which not ?
Exploring further, if I select the "status" view mode: it says that only 43 were manually installed. Can I safely remove them ? Curiously the install date is not available, which would be the most helpful since everything I want removed was installed manually late yesterday.

Meanwhile from the terminal I was able to remove part of the manual install with 
> dpkg -r libreoffice4.4-{draw,base,calc,math,writer,dict-en,,[...]}
... a paultry total of 14~15 packages obviously related to LibreOffice v4.4.3.x
Comment 13 CBhihe 2015-06-14 18:19:20 UTC
One more detail: of the 43 packages listed by synaptic as "manually installed":

- 33 are related to libobasis4.4  <- origin local (33)
- 3 are directly related to libreoffice4-ure (UNO runtime env) <- origin local (1)
- 1 is libreoffice4.4-debian-menus (desktop integration)  <- origin local (1)
- 5 are spelling and hyphenation packages that should pose no problem if left untouched.
- 1 is the package that contains the OpenSymbol TrueType fonts.

Any idea as to which should stay and which should not ?
Can I safely remove all packages whose origin is local and install status is manual ?

Should I then go on and scrutinize each of the 251 other packages not mentioned above but related to LO ?
Comment 14 CBhihe 2015-06-14 18:37:03 UTC
Aha ! and the 251 above mentioned packages (what is left from 294 LO-related minus 43 manually installed) are marked "Not Installed" on synaptic.

Any help however small would be really appreciated. I think I am close to the solution. Should I remove the 35 packages whose origin is local and were manually installed.
Thanks in advance.
-ced.
Comment 15 Philippe Jung 2015-06-14 19:10:36 UTC
(In reply to CBhihe from comment #13)

> Any idea as to which should stay and which should not ?
> Can I safely remove all packages whose origin is local and install status is
> manual ?

I did remove all things I considered related to LO then applied. When you have the summary view, just check in the added removed files, just in case.

In case you have not seen, in sinaptic, on the left pane, you can filter by status installed.
Comment 16 CBhihe 2015-06-15 22:09:51 UTC
Finally it seems that I could install a stable 4.4.3.2 LO on my system. It took multiple uninstal and re-install. Synaptic is more powerful that USC in that it allows greater control and customisation over what is being installed. However it does not install ubuntu-specific packages and I think I must have previously installed some i386 or otherwise untoward package for my 64 bit system.

Ther is a shorter delay still, upon loading 200+ page files, similar to the sanitized one I uploaded as example. However there is no more conflict with punching in CTRL+F[keyword] Enter before the page loading process  exits gracefully.

So my earlier supposition about a conflict in LO 4.2.x is a _non-issue_.

Thanks @Beluga and @Philippe Jung for taking notice and the time to help me out. 

CLOSED
Comment 17 Buovjaga 2015-06-16 07:06:48 UTC
Thanks, I will set this to WFM then.