Bug 86793 - Hang showing large reference mark tooltips (Zotero references)
Summary: Hang showing large reference mark tooltips (Zotero references)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
4.3.4.1 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:5.0.0 target:4.4.4 target:4.3....
Keywords: bibisected, bisected, perf, regression
: 90399 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-11-27 16:39 UTC by Milan Bouchet-Valat
Modified: 2015-12-15 11:08 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
gdb backtrace while LO is hanging (11.96 KB, text/plain)
2014-11-27 16:39 UTC, Milan Bouchet-Valat
Details
ODT file to reproduce the problem (13.04 KB, application/vnd.oasis.opendocument.text)
2014-11-27 16:44 UTC, Milan Bouchet-Valat
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Bouchet-Valat 2014-11-27 16:39:51 UTC
Created attachment 110132 [details]
gdb backtrace while LO is hanging

This has appeared after upgrading from LO 4.2.7 to 4.3.4.1 (from Fedora 20 to 21). I'm using the Zotero bibliographic manager, which inserts special fields in the text. When selecting text in a paragraph containing such references, LO hangs for a few seconds.

Zotero fields appear as "(Author, date)", but they contain a quite long code, which is visible in a tooltip on hover. In 4.2, the tooltip was quite big; in 4.3, the text is ellipsized, which makes sense. But I suspect this change introduced a large performance penalty, as the attached backtrace seems to indicate.

Please ask if you need more information.
Comment 1 Milan Bouchet-Valat 2014-11-27 16:44:02 UTC
Created attachment 110133 [details]
ODT file to reproduce the problem

With the attached ODT file, simply hovering over the Zotero field in enough to get LO to hang both before and after the tooltip appears.
Comment 2 Milan Bouchet-Valat 2015-01-05 12:51:13 UTC
Bump! This looks like a very simple bug to me, which could be fixed by truncating the displayed text.

This actually happens even when just moving the mouse pointer, I don't even need to select text. Quite annoying.
Comment 3 Milan Bouchet-Valat 2015-02-20 14:42:57 UTC
Is there anything I can do to help? Is there any possibility this would be a bug in Zotero rather than in LO?
Comment 4 Milan Bouchet-Valat 2015-02-20 14:47:25 UTC
I've just found a thread on Zotero forums with people reporting the same problem on both Windows and Linux, using LO 4.4. The bug apparently also affects Mendeley.

A workaround is to completely disable tooltips in LO.

https://forums.zotero.org/discussion/46393/citation-styles-that-include-the-authors-names-freeze-libreoffice/
Comment 5 Joel 2015-02-20 15:39:05 UTC
This bug affects me too and I can reproduce it with the example document attached above. Usually I have even worse freezes than that.
Comment 6 kalei 2015-02-22 07:29:05 UTC
This happens to me with LibreOffice 4.4.0.3. A 20-page document with can 50 citations became almost uneditable until I learned about the work-around through the Zotero forums.
Comment 7 tomaskeb 2015-03-22 22:12:52 UTC
I can confirm this even on various Windows Vista & 7. In addition to Zotero citations it happens with externally linked images. Disabling the tooltips helped.
Comment 8 Milan Bouchet-Valat 2015-03-23 11:10:54 UTC
Interesting. Could you post a file reproducing the issue with only links to external images? Not requiring Zotero could help debugging.
Comment 9 andis.lazdins 2015-03-23 14:29:25 UTC
Hi!

This problem appears and the solution works also in 4.3.6.2 under Ubuntu 14.04 32 bit with MATE desktop environment. It is 100% reproducible with multiple Zotero citations.

Regards
Comment 10 Matthew Francis 2015-03-31 14:19:27 UTC
This seems to have begun at the below commit.
Adding Cc: to caolanm@redhat.com; Could you possibly take a look at this? Thanks

(This appears only to occur if Tools - Options - General - Help - Extended Tips is disabled)

    commit 912ecaf565e68d2ca3fb9584712313e712749f75
    Author:     Caolán McNamara <caolanm@redhat.com>
    AuthorDate: Thu Oct 9 10:38:34 2014 +0100
    Commit:     Caolán McNamara <caolanm@redhat.com>
    CommitDate: Thu Oct 9 10:39:13 2014 +0100
    
        Resolves: fdo#55546 center ellipsis tooltips that don't fit on screen
    
        Change-Id: Ic44c9032878892fa33c839e5aaac1996e7bed943
Comment 11 Matthew Francis 2015-04-09 16:28:30 UTC
*** Bug 90399 has been marked as a duplicate of this bug. ***
Comment 12 jose luis m 2015-04-16 15:40:22 UTC
I have this same problem, a couple of weeks ago i left a message in mendeley support

http://support.mendeley.com/customer/en/portal/questions/11637782-bug-placing-the-cursor-on-any-reference-inside-libreoffice-4-4-causes-until-1-cpu-use-?new=11637782

Disabling tips in LO solved it.
Comment 13 Michael Stahl (allotropia) 2015-04-16 20:38:20 UTC
turns out the TEXT_DRAW_CENTERELLIPSIS thing is unbelievably slow
for these 2300 char strings due to advanced algorithmic stupidity

fixed on master
Comment 14 Commit Notification 2015-04-16 20:38:57 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c6ec3e4cee8c7c22380780f2661ac23946cdb050

tdf#86793: vcl: speed up OutputDevice::GetEllipsisString()

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 15 Milan Bouchet-Valat 2015-04-16 21:08:25 UTC
Great! Any chance to get a backport to 4.4.x?
Comment 16 Commit Notification 2015-04-17 07:34:43 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=84b28b7d0b5061377b368c809acdb286902b4069

tdf#86793: vcl: speed up OutputDevice::GetEllipsisString()

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 17 Michael Stahl (allotropia) 2015-04-17 10:32:15 UTC
... and the silly script is still hard-coded to master, that last one was for libreoffice-4-4 actually.
Comment 18 Commit Notification 2015-04-20 09:01:29 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2cd486b1dd75d530d8c12eb223e5f215fa8f1944&h=libreoffice-4-3

tdf#86793: vcl: speed up OutputDevice::GetEllipsisString()

It will be available in 4.3.8.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 19 Commit Notification 2015-04-20 14:37:21 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-3-7":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=05006dd3b2cd3e3961127d719e5a4d2c39aaa051&h=libreoffice-4-3-7

tdf#86793: vcl: speed up OutputDevice::GetEllipsisString()

It will be available in 4.3.7.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 20 Commit Notification 2015-04-21 15:59:41 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0070b8f540e6b6fbecd5f1793b9d338de4841868&h=libreoffice-4-4-3

tdf#86793: vcl: speed up OutputDevice::GetEllipsisString()

It will be available in 4.4.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 21 Robinson Tryon (qubit) 2015-12-15 11:08:33 UTC
Migrating Whiteboard tags to Keywords: (bibisected, perf)
[NinjaEdit]