Bug 70857 - Freezes to show formating dialog with CJK UI in Ubuntu (Summary in Comment 23)
Summary: Freezes to show formating dialog with CJK UI in Ubuntu (Summary in Comment 23)
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.1.3.2 release
Hardware: All Linux (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard: noRepro:4.1.0.0.beta1:Ubuntu
Keywords: bibisectRequest, regression
Depends on:
Blocks:
 
Reported: 2013-10-25 08:48 UTC by Kevin Suo
Modified: 2016-01-24 04:49 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
how the UI looks with the droid font (115.78 KB, image/png)
2014-06-22 08:29 UTC, Yousuf Philips (jay) (retired)
Details
how the UI looks with the WenQuanYi font (156.96 KB, image/png)
2014-06-22 08:30 UTC, Yousuf Philips (jay) (retired)
Details
how the UI looks in Ubuntu 14.04 (106.05 KB, image/png)
2014-06-22 08:33 UTC, Yousuf Philips (jay) (retired)
Details
valgrind --tool=callgrind output (137.59 KB, application/x-bzip)
2014-07-20 16:06 UTC, Kevin Suo
Details
callgrind_annotate output (41.73 KB, text/plain)
2014-07-21 00:03 UTC, Kevin Suo
Details
valgrind terminal output (1.64 KB, text/plain)
2014-07-21 00:05 UTC, Kevin Suo
Details
"fc-list --zh" output (712 bytes, text/plain)
2014-08-02 03:18 UTC, Kevin Suo
Details
"dpkg-query --list font*" output (7.04 KB, text/plain)
2014-08-02 03:19 UTC, Kevin Suo
Details
/etc/fonts/conf.d files list (2.72 KB, text/plain)
2014-08-02 03:22 UTC, Kevin Suo
Details
/etc/fonts/conf.d/65-nonlatin.conf file (7.77 KB, application/xml)
2014-08-02 03:23 UTC, Kevin Suo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Suo 2013-10-25 08:48:07 UTC
Description:
LibreOffice takes much longer time for the formating window to show up. Tested both in Calc and Writer.

Steps to reproduce:
1. Install a libreoffice version without any lang pack.
2. Create a new spreadsheet, right-click-->"format cells". the formating window pops up instantly. (Or, create a new writer file, insert a table, right-click-->"table", or, in writer, right-click-->"Character", windows pop up instantly).
3. Install the zh_ch lang pack (so the default UI language become Simplified Chinese), and do the same test as show in step 2, the formating window takes around 10s to pop up.
4. "Tools(工具)-->Options(选项)-->Language Settings(语言选项)-->Language(语言)", set "Language of: User Interface(用户界面)" to "English(英语)", then restart LO and test step 2, window pops up instantly.

Current Behaviour:
Formating window takes much longer time to show up when zh_cn is enabled for UI.

OS: Ubuntu 13.10 x86, LibreOffice 4.1.3.2, sys locale: zh_cn.

In my memory, this behaviour first began since 4.0, and was reproduciable in Ubuntu 13.04. The same to use LO official build and Ubuntu build.
Comment 1 Kevin Suo 2013-10-31 03:20:46 UTC
This seems to affect all formating properties window, and when set UI language to EN everything is OK again.

This blocks my work when enable zh_cn UI language, so mark importance to HIGH CRITICAL.
Comment 2 Kevin Suo 2013-11-01 16:29:35 UTC
Today I tested in Ubuntu 13.04 X64 and the same behaviour happen, so not a ubuntu 13.10 or an x86 only issue.
Comment 3 Kevin Suo 2013-12-05 09:49:18 UTC
Still exists in 4.2 beta 2.

To be simple:
1. Install zh_CN lang pack;
2. Calc -> right click -> "单元格格式"

Formating properties window takes more than 10s to show.
Comment 4 Kevin Suo 2013-12-09 01:54:08 UTC
Based on tests done by members in the official QQ Qun, I confirm that this issue is Ubuntu 13.04/13.10 specific, not reproducable in other linux distrs.
Comment 5 Michael Meeks 2013-12-13 15:31:46 UTC
If something is very slow, install the debuginfo so you have symbols (without this it's a waste of time) and do:

export OOO_DISABLE_RECOVERY=1
valgrind --tool=callgrind --simulate-cache=yes --dump-instr=yes ./soffice.bin --splash-pipe=0 

reproduce the problem (if it only takes a second or two to pop up then do it a few times), then exit cleanly.

Bear in mind callgrind runs 150x slower than real-time - so this will take some patience.

Now bzip2 the callgrind.txt* and mail it to an interested developer.

Or poke in kcachegrind and fix it yourself =)

Needs a callgrind trace.
Comment 6 Kevin Suo 2014-01-23 02:34:45 UTC
Sorry, I really don't know how to do the symbols info things, since I run ubuntu 13.10, and LO build of LibreOffice DEBs.
Comment 7 Kevin Suo 2014-01-27 03:58:11 UTC
Valgrind trace generated, because it's a big file, please go to the following link: (Click the "下载" button to download)
http://www.kuaipan.cn/file/id_2595367132601438.htm

Below is the terminal output:
suokunlong@suokunlong-Vostro-230:~$ valgrind --tool=callgrind --simulate-cache=yes --dump-instr=yes /usr/lib/libreoffice/program/soffice.bin --splash-pipe=0
==5678== Callgrind, a call-graph generating cache profiler
==5678== Copyright (C) 2002-2012, and GNU GPL'd, by Josef Weidendorfer et al.
==5678== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==5678== Command: /usr/lib/libreoffice/program/soffice.bin --splash-pipe=0
==5678== 
==5678== For interactive control, run 'callgrind_control -h'.
10%
20%
25%
30%
35%
40%
50%
60%
75%
100%
end
==5678== 
==5678== Events    : Ir Dr Dw I1mr D1mr D1mw ILmr DLmr DLmw
==5678== Collected : 60770249569 17297929635 10729202474 27629464 47153782 3441863 544555 2622641 853884
==5678== 
==5678== I   refs:      60,770,249,569
==5678== I1  misses:        27,629,464
==5678== LLi misses:           544,555
==5678== I1  miss rate:            0.4%
==5678== LLi miss rate:            0.0%
==5678== 
==5678== D   refs:      28,027,132,109  (17,297,929,635 rd + 10,729,202,474 wr)
==5678== D1  misses:        50,595,645  (    47,153,782 rd +      3,441,863 wr)
==5678== LLd misses:         3,476,525  (     2,622,641 rd +        853,884 wr)
==5678== D1  miss rate:            0.1% (           0.2%   +            0.0%  )
==5678== LLd miss rate:            0.0% (           0.0%   +            0.0%  )
==5678== 
==5678== LL refs:           78,225,109  (    74,783,246 rd +      3,441,863 wr)
==5678== LL misses:          4,021,080  (     3,167,196 rd +        853,884 wr)
==5678== LL miss rate:             0.0% (           0.0%   +            0.0%  )
Comment 8 Kevin Suo 2014-01-27 04:09:48 UTC
A copy of the trace file also uploaded to dropbox, in case someone can not download at kuaipan.cn

https://www.dropbox.com/s/m3gtddzxf7gm635/callgrind.out.5678.tar.bz2
Comment 9 Kevin Suo 2014-02-06 06:34:32 UTC
Changing the title because I tested with Tranditional Chinese, Japanese, Korean as well as English GB user interfaces, and found the same problem in all the non-English (CJK) UIs.

Changing status to NEW from NEEDINFO because I have provided the debuginfo.
Comment 10 Michael Stahl (allotropia) 2014-02-10 11:30:36 UTC
since comment #4 says the bug happens on Ubuntu only, CC: Bjoern
Comment 11 Kevin Suo 2014-04-19 14:46:44 UTC
Today I tested in Ubuntu 14.04 lts, libreoffice 4.2.4.1 Build ID: d4c441391e20647b3d2e8dde4d20aa868e77e515, and also 4.2.3.3.

The delay no longer exists anymore. So marking as RESOLVED WORKSFORME.

Maybe the "delay" was because the uncomplete UI translation? 
libreoffice 4.2 ZH_CN UI was 90% complete when this bug report was filed. Now it's 100% tranalated.
Comment 12 Kevin Suo 2014-06-22 04:46:36 UTC
Sorry to reopen, this issue happens again today,
Ubuntu 14.04 x86,
LibreOffice 4.3.0.1 and 4.2.5.2
Simplified Chinese UI (zh_CN)

Set back to UNCONFIRMED. (this bug never confirmed by someone else)
Comment 13 Yousuf Philips (jay) (retired) 2014-06-22 05:49:49 UTC
Here's my testing on my desktop pc using the writer table right-click example.

System - Linux Mint 32-bit, Dual Core Intel Pentium 4 @ 3.20GHz, 4GB RAM.

- LibO 4.1 -

English : 1.0s
Arabic : 1.1s
Chinese (simplified) : 2.5s

- LibO 4.3 beta 2 -

English : 1.0s
Arabic : 1.2s
Chinese (simplified) : 3.5s

I'm assume the chinese characters take longer to render because of their complexity and i think the new dialog UI might also be a factor in the slowness.
Comment 14 Yousuf Philips (jay) (retired) 2014-06-22 08:29:55 UTC
Created attachment 101516 [details]
how the UI looks with the droid font
Comment 15 Yousuf Philips (jay) (retired) 2014-06-22 08:30:58 UTC
Created attachment 101517 [details]
how the UI looks with the WenQuanYi font
Comment 16 Yousuf Philips (jay) (retired) 2014-06-22 08:33:26 UTC
Created attachment 101518 [details]
how the UI looks in Ubuntu 14.04
Comment 17 Yousuf Philips (jay) (retired) 2014-06-22 08:35:16 UTC
After some unsuspected fooling around with chinese fonts and reporting a bug for the default use of libre fonts over proprietary fonts (bug 80346), i noticed that this problem boils down to fonts.

On my linux mint 13 (equivalent to ubuntu 12.04) installation, libreoffice defaults to using the droid font for the chinese interface, which is the package fonts-droid version 20101110+git-2. As can be seen in the previously attached screenshot, it doesnt render all the chinese characters, which i'm assuming is why the dialog takes so long to load. When i installed the ttf-wqy-zenhei package version 0.9.45, it took over rendering the text for the UI and all the chinese characters were there and the dialog opened in 1 second.

When i tried the default behaviour of the chinese UI in Ubuntu 14.04, there wasnt any problems as the droid font is updated in it.
Comment 18 Kevin Suo 2014-07-20 16:06:18 UTC
Created attachment 103142 [details]
valgrind --tool=callgrind output

Sorry to reopen, but I encounter this issue again. It's quite annoying.
Open any of the formatting dialog takes 20+ seconds on my Ubuntu 14.04 x86 mechine.

Attached is the valgrind callgrind output.
I installed the ubuntu-build when generating these callgrind info. 

Hope it will be helpful.
Comment 19 Kevin Suo 2014-07-20 16:20:58 UTC
(In reply to comment #18)
Sorry, seems that I run the wrong command. I should run
$ valgrind --tool=callgrind --simulate-cache=yes --dump-instr=yes /usr/li/libreoffice/program/soffice.bin --writer --splash-pipe=0

Regenerating...
Comment 20 Kevin Suo 2014-07-21 00:03:58 UTC
Created attachment 103159 [details]
callgrind_annotate output

This is the output for:
callgrind_annotate ./callgrind.out.10317 > ./callgrind_annotate.txt

The debug steps I followed:
1. Format -> Paragraph -> Cancle
Comment 21 Kevin Suo 2014-07-21 00:05:10 UTC
Created attachment 103160 [details]
valgrind terminal output

This is the terminal output when I run valgrind.
Comment 22 Kevin Suo 2014-07-21 00:06:54 UTC
As I have generated the callgrind_annotate file,
is the 6.3MB callgrind.out.10317.tar.bz2 file really needed? It's too large to attach.
Comment 23 Kevin Suo 2014-07-29 14:35:21 UTC
Summary of this bug:

LibreOffice takes a long time to show up almost all of the following/properties dialog in Ubuntu, with zh-cn system locale and zh-cn LibreOffice UI. 

The freeze also happens with Japanese and Korea UI in my system. 
The freeze do not happen in Fedora. I do not believe its ubuntu's bug, because all other applications works fine in my system.

Steps to reproduce: 
1. A fresh install of Ubuntu 14.04, Simplified Chinese locale. 
2. Make sure you have Simplifed Chinese UI installed and enabled with libreoffice.
3. Try to open any of the following dialog:
 * In Calc: format cells; characters; format page...
 * In Writer: format paragraph; characters; format page; edit styles...

Current behaviour:
LibreOffice freezes for about 10-20 seconds at step 3 before open the dialog.

The bug behaviour did not happen in earlier vesions (3.6.7, 4.0.*), so it's a regression in version 4.1.*.

callgrind_annotate output in attachment 103159 [details].  valgrind terminal output in attachment 103160 [details]. (generated by doing "Format -> Paragraph -> Cancel" in Writer)

With this bug, one can do nothing with libreoffice in Ubuntu. The only workaround is to use english UI.
If more debug work is needed, i will provide.


Thanks!
Comment 24 Björn Michaelsen 2014-07-29 16:25:49 UTC
(In reply to comment #23)
> Current behaviour:
> LibreOffice freezes for about 10-20 seconds at step 3 before open the dialog.

@Kevin: Thanks for the summary. Do you have the ttf-wqy-zenhei package installed as suggested by comment 17 and if so, which version?
Comment 25 Kevin Suo 2014-08-02 03:18:54 UTC
Created attachment 103845 [details]
"fc-list --zh" output
Comment 26 Kevin Suo 2014-08-02 03:19:47 UTC
Created attachment 103846 [details]
"dpkg-query --list font*" output
Comment 27 Kevin Suo 2014-08-02 03:22:30 UTC
Created attachment 103847 [details]
/etc/fonts/conf.d files list
Comment 28 Kevin Suo 2014-08-02 03:23:23 UTC
Created attachment 103848 [details]
/etc/fonts/conf.d/65-nonlatin.conf file
Comment 29 Kevin Suo 2014-08-02 03:32:09 UTC
(In reply to comment #24)
> @Kevin: Thanks for the summary. Do you have the ttf-wqy-zenhei package installed as suggested by comment 17 and if so, which version?

Previously I have ttf-wqy-zenhei and ttf-wqy-microhei installed (this font was not updated for many years, so may be the same version). Previously I also tried other fonts (Microsoft Yahei, etc.), but the same behaviour (freezes)

But this time, I did a fresh install of Ubuntu 14.04 zh-CN UI, then installed the "missing language files" as suggested by update manager. I did not install wqy fonts this time. Still freezes.
Actually by installing the missing lanuage files, it installed: fonts-arphic-ukai and fonts-arphic-uming. Droid fonts (fallback) was installed by default with the fresh ubuntu install.

This freeze never happen in Fedora 20. I noticed that Fedora has different font conf files than Ubuntu.
Comment 31 Kevin Suo 2014-08-02 03:59:12 UTC
Good new...I found something.

I did a "apt-get purge fonts-droid", and then uncheck the "Tools - Options - LibreOffice - View: Use system fonts for user interface", now no freeze anymore! But with this option checked, still freeze.

Intall fonts-droid again will cause freeze, no matter the  "Use system fonts for user interface" is checked or not.

Lower importance to "Medium Major", as there is a workaround.
Comment 32 Kevin Suo 2014-11-05 06:03:49 UTC
This is confirmed by a post in the Ubuntu Chinese forum:
http://forum.ubuntu.org.cn/viewtopic.php?f=35&t=462131&p=3113351#p3113351

So I set it to NEW.
Comment 33 Kevin Suo 2014-11-05 06:17:59 UTC
Also the this post in the Ubuntu Kylin discussion forum:
http://www.ubuntukylin.com/ukylin/forum.php?mod=redirect&goto=findpost&ptid=10013&pid=70679
Comment 34 Robinson Tryon (qubit) 2015-12-14 05:37:05 UTC
Migrating Whiteboard tags to Keywords: (bibisectRequest)
[NinjaEdit]
Comment 35 Joel Madero 2015-12-14 15:19:37 UTC
@Kevin - it would be great if you could bibisect this considering it requires a pretty specific setup that I don't think many of us who do bibisects regularly have.
Comment 36 Kevin Suo 2016-01-24 04:49:18 UTC
Close as WORKSFORME as I do not reproduce this in the most recent versions of LibreOffice under Ubuntu 15.10.