Bug 31199 - Click on specific paragraph will freeze Writer.
Summary: Click on specific paragraph will freeze Writer.
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version: Inherited From OOo
Hardware: x86 (IA32) All
: medium critical
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
: 31201 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-28 07:40 UTC by winlin0330
Modified: 2014-10-24 23:57 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Attachments
The odt file that could reproduce the problem. (13.51 KB, application/vnd.oasis.opendocument.text)
2010-10-28 07:40 UTC, winlin0330
Details
The strace.log (606.26 KB, application/x-bzip2)
2010-10-28 07:42 UTC, winlin0330
Details
backtrace (6.23 KB, text/plain)
2010-11-24 13:13 UTC, Thorsten Behrens
Details
MacOS X log file created on forced quit of frozen LibreOffice 3.5.3.2 (153.86 KB, text/plain)
2012-05-07 11:29 UTC, Roman Eisele
Details
Screenshot of the text (30.07 KB, image/png)
2012-08-18 06:42 UTC, winlin0330
Details
bt on master on console trace (6.50 KB, text/plain)
2012-08-18 09:11 UTC, Julien Nabet
Details
The second file that freezed Writer. (15.72 KB, application/vnd.oasis.opendocument.text)
2012-08-24 00:14 UTC, winlin0330
Details
The third file that freezed Writer. (15.68 KB, application/vnd.oasis.opendocument.text)
2012-08-24 00:16 UTC, winlin0330
Details
gdb info (97.60 KB, text/plain)
2013-05-15 12:03 UTC, minhsien0330
Details
bt finish + console logs (11.92 KB, text/plain)
2013-05-15 19:06 UTC, Julien Nabet
Details

Description winlin0330 2010-10-28 07:40:42 UTC
Created attachment 39857 [details]
The odt file that could reproduce the problem.

Hi~
I am a traditional chinese user (locale: zh-TW).
I found Writer will be freezed when I click on some location in a odt file.
Please open the attachment with Writer, scroll down to the end of file, and click the words "CLICK HERE WILL FREEZE WRITER".

ps. 
The odt file applied this chinese font.
http://cle.linux.org.tw/fonts/cwttf/center/cwheib.ttf 

Thank you.
Comment 1 winlin0330 2010-10-28 07:42:27 UTC
Created attachment 39863 [details]
The strace.log

I have uploaded a strace.log, Thanks again~
Comment 2 Cédric Bosdonnat 2010-10-28 08:32:29 UTC
*** Bug 31201 has been marked as a duplicate of this bug. ***
Comment 3 Thorsten Behrens 2010-11-18 16:15:12 UTC
Cedric, were you able to reproduce this? Could it be this is related to the toolbar docking crash? WinLin, do you have the table toolbar docked, or floating?
Comment 4 Thorsten Behrens 2010-11-24 13:13:48 UTC
Created attachment 40557 [details]
backtrace

backtrace of layout loop.
Comment 5 Thorsten Behrens 2010-11-24 13:14:36 UTC
Cedric: confirmed. put cursor into first paragraph of second page. Could you have a look please?
Comment 6 winlin0330 2010-11-25 23:23:53 UTC
(In reply to comment #3)
> Cedric, were you able to reproduce this? Could it be this is related to the
> toolbar docking crash? WinLin, do you have the table toolbar docked, or
> floating?

 I have the table toolbar floating.
Here is the screenshot :
https://bugs.freedesktop.org/attachment.cgi?id=39874

My friend found this problem happened only when using the following chinese truetype font:
http://cle.linux.org.tw/fonts/cwttf/center/cwheib.ttf 

If clicking on the yellow area did not freeze writer, type something on there might make it. 

Thank you.
Comment 7 winlin0330 2011-05-13 06:11:54 UTC
Dear all,
This problem still bother me when using Libreoffice 3.4 beta4.
Would you fix this prolem please?
Thank you so much.
Comment 8 winlin0330 2012-04-26 21:46:36 UTC
I package the font and odt into a 7-zip file:
https://bugs.freedesktop.org/attachment.cgi?id=60648

This bug is annoying to me for 2+ years, I lost lots of data again and again,
please help me.

I found the download link of the truetype font was broken, so I  package the
font and odt into a 7-zip file. (Don't worry, the font is licensed with GPL.)
If you need any information about this bug, please let me know, I will do my
best to test it. Thank you~
Comment 9 Roman Eisele 2012-05-03 04:18:07 UTC
This is a Writer bug, right?! Therefore changed 'Component'.
Comment 10 winlin0330 2012-05-03 20:34:43 UTC
Hi~ Roman Eisele:
Thanks for your help. I also change the version to 3.5.3, because I found Writer of version 3.5.3 still crashed due to this bug.
Comment 11 Roman Eisele 2012-05-07 11:13:36 UTC
@winlin0330:
> I also change the version to 3.5.3, because I found
> Writer of version 3.5.3 still crashed due to this bug.
Thank you for your help. But I'm afraid to say that the version field should contain the number of the FIRST version which is known to contain the bug, not the last one. So, could you please change the version field to the first version in which you found that bug? Is it 3.3.0 release? Thank you very much!

First idea:
I wanted to check first if the bug has something to do with some corruption of the font file ('cwheib.ttf'). But Apple's FontBook did not find any errors in this font, and FontLab 5.0.4 opens the font file without any problems. So the font seems OK.
Comment 12 Roman Eisele 2012-05-07 11:26:14 UTC
REPROCUBILE with LibreOffice 3.5.3.2 (Build-ID: 235ab8a-3802056-4a8fed3-2d66ea8-e241b80), German UI installed, on MacOS X 10.6.8. I will attach the MacOS X log file.

Reproducible also on MacOS -> changed Platform to 'All'.

Observations:

1) There is no influcene of the Table toolbar status to the freeze -- the freeze occurs both when the toolbar is floating and when it is docked.

2) But I can reproduce the freeze ONLY when and if the font 'cwheib.ttf' is installed. If I de-install it again, NO freeze occurs, I can even edit the yellow text 'CLICK HERE WILL FREEZE WRITER'.

Therefore, although the font file is not damaged, corrupted, invalid etc. (see my comment #11), this font definitely has some influcene on the problem.
Comment 13 Roman Eisele 2012-05-07 11:29:47 UTC
Created attachment 61166 [details]
MacOS X log file created on forced quit of frozen LibreOffice 3.5.3.2

Note: in my previous comment, I wanted to type [REPRODUCIBLE]; please forgive the strange typo ;-)
Comment 14 winlin0330 2012-05-07 18:14:53 UTC
Dear Roman Eisele:

Version before 3.4.6 is not available to download, but I can reproduce this bug on OpenOffice.org 3.3.0, I think this bug may be inherited from OpenOffice.org. Should I test any earlier version of OpenOffice.org?
A difference should be noted, in OpenOffice 3.3.0., click " CLICK HERE WILL FREEZE WRITER " won't freeze Writer, but typing any character in that yellow area still freeze Writer.

Additionally, using other chinese truetype font sometimes meet this bug, it occurs while inserting some chinese words in page one. But it's hard to find the way to reproduce so far. 
Roughly, I think this problem involved:
(1) a table splits across pages;
(2) a table cell contains chinese characters, some paragraphs in the table cell go across pages.

Thank you.
Comment 15 Roman Eisele 2012-05-08 00:12:24 UTC
(In reply to comment #14)
> ... I can reproduce this bug on OpenOffice.org 3.3.0,
> I think this bug may be inherited from OpenOffice.org.

Thank you very much for testing!

> Should I test any earlier version of OpenOffice.org?

No, for now it is sufficicent to know that this bug is present since 3.3.0 and may be interited from OOo. -> We set the Version field to the oldest available version (3.3.0b2) to indicate this.

> A difference should be noted, in OpenOffice 3.3.0., click " CLICK HERE WILL
> FREEZE WRITER " won't freeze Writer, but typing any character in that yellow
> area still freeze Writer.

This difference may be important, thank you for poiting to it!

> Additionally, using other chinese truetype font sometimes meet this bug, it
> occurs while inserting some chinese words in page one. But it's hard to find
> the way to reproduce so far. 
> Roughly, I think this problem involved:
> (1) a table splits across pages;
> (2) a table cell contains chinese characters, some paragraphs in the
> table cell go across pages.

This sounds very reasonable to me.
Comment 16 Julien Nabet 2012-08-17 22:33:16 UTC
On pc Debian x86-64 with 3.5 sources updated some days ago I don't reproduce the pb.

(I installed the font by following these steps in root mode:
- cp <download directory>/cwheib.ttf /usr/local/share/fonts
- fc-cache -r
)
Did I miss anything during font install?
Then I:
- clicked on the catchphrase
- double clicked on a word then several words of this catchphrase
- type something inside it
nothing special, no specific logs on console.
Anyone to retest on newer LO version (3.5.5 or 3.6.0)?
Comment 17 winlin0330 2012-08-18 06:42:06 UTC
Created attachment 65725 [details]
Screenshot of the text
Comment 18 winlin0330 2012-08-18 06:45:08 UTC
Hi~Julien Nabet:

I am happy to hear that this bug is possible solved.
But when I tried 3.6.0(downloaded from official site of Libreoffice), Writer was still freezed when I scrolled down and clicked the yellow area.

Would you check cwheib.ttf is successfully installed?
If cwheib.ttf is installed:
(1) you will find "cwTeX粗黑體" in the fonts list of Writer, and 
(2) you can see  "cwTeX 粗黑體" after you execute command " fc-list | grep cw" in terminal.
(3) you will see the odt file is looked like this:
https://bugs.freedesktop.org/attachment.cgi?id=65725

Note:
Would you try to install the cwheib.ttf to ~/.fonts and restart Libreoffice to try it again?
If you are using Libreoffice that come from Debian repository, remember to close the quickstarter for ensuring Libreoffice is "really" restarted.

Thanks for your testing~
Comment 19 Julien Nabet 2012-08-18 07:50:23 UTC
Thank you for your feedback winlin.
Sorry for my mistake, I reproduced the problem with master sources.

In fact the link http://cle.linux.org.tw/fonts/cwttf/center/cwheib.ttf is broken.
I installed the Debian package fonts-cwtex-heib

and runned fc-list,
# fc-list | grep cw
/usr/share/fonts/truetype/cwtex/cwheib.ttf: cwTeX 粗黑體,cwTeXHeiBold:style=Medium

Noticed on console, this log repeated endlessly:
warn:legacy.osl:11193:1:/home/julien/compile-libreoffice/libo/sw/source/core/text/frmform.cxx:298: SwTxtFrm::CalcFollow: cheesy follow
Comment 20 Roman Eisele 2012-08-18 07:58:52 UTC
Also still REPRODUCIBLE with MacOS X:
LibreOffice 3.6.1.1 (Build ID: 4db6344), German langpack installed, on MacOS X 10.6.8 (Intel), still freezes when I click the words "CLICK HERE WILL FREEZE WRITER", if and only if the font 'cwheib.ttf' is installed.
Comment 21 Roman Eisele 2012-08-18 08:02:21 UTC
@Caolán:

This long-standing issue seems related to font handling: I can reproduce the freeze only if the font 'cwheib.ttf' is installed. I insert you into the CC list because you have fixed many font-related bugs. Maybe you could take a look at this issue? This would be very much appreciated!

Thank you very much in advance!
Comment 22 Julien Nabet 2012-08-18 09:11:41 UTC
Created attachment 65727 [details]
bt on master on console trace

If it can help, I attached bt from console trace.
Comment 23 Julien Nabet 2012-08-18 12:23:48 UTC
From bt, I tried to compare the paths used, so I put a break frmform.cxx:576 (SwTxtFrm::FormatAdjust) and click each time just in front of "C", the first letter of catchphrase to be in exactly the same conditions.

When the font isn't used:
it never enter in this if:

    208     if( !pMyFollow->GetOfst() || pMyFollow->GetOfst() != nTxtOfst ||
    209         bFollowFld || pMyFollow->IsFieldFollow() ||
    210         ( pMyFollow->IsVertical() && !pMyFollow->Prt().Width() ) ||
    211         ( ! pMyFollow->IsVertical() && !pMyFollow->Prt().Height() ) )

pMyFollow->GetOfst() = 88 and nTxtOfst = 88 and all the cond are false so we don't enter in the if and so SwTxtFrm::CalcFollow isn't called

When the font is used:
it enters in the if as soon as first time
pMyFollow->GetOfst() = 0
nTxtOfst = 137

I'll try to dig more but I must recognize I don't know the meaning of all that.
Comment 24 winlin0330 2012-08-24 00:14:45 UTC
Created attachment 66038 [details]
The second file that freezed Writer.

Dear all:

I uploaded the second and third file (freeze2.odt and freeze3.odt) that would freeze Writer.

In freeze2.odt, delete the red area and click the yellow area, you will see a  freezed Writer.
Please take a look at the Paragraph 7 on page 3. There is only one line in table on page 3 after you deleted the red area of Paragraph 6, the "only one line in table on page 3" may make Writer get into the loop of creating and deleting a new page for the large table. I guess this is why Writer freezed.

On the other hand, the file freeze3.odt show us a different example.
The freeze3.odt had no page3, but if you add any character in Paragraph 6 or Paragraph 7 to make a new line for pushing Writer to creat page 3, Writer will freeze.

In freeze2.odt and freeze3.odt, we all see the "only one line in table on page 3" make Writer freeze. So I guess this maybe a problem of table behavior. But I think this may involve something wrong about chinese (or CJK) paragraph dealing mechanism in table, because I only meet this problem when I typing Chinese characters in a very long table ( and this table must goes across many pages).

Thanks a lot~
Comment 25 winlin0330 2012-08-24 00:16:05 UTC
Created attachment 66039 [details]
The third file that freezed Writer.
Comment 26 Julien Nabet 2013-05-11 18:41:32 UTC
On pc Debian x86-64 with master sources updated today, I gave a try to first file, we still have the same.
Comment 27 Michael Meeks 2013-05-15 09:52:45 UTC
Hi Julien:

Thanks so much for helping to debug this; I guess it's a layout loop - but ... ;-) anyhow - the best way to find where something is hanging in gdb is (after breaking) to type:

'finish'

repeatedly until it hangs - then you know it hung in that method.

Then break it again, and go up to that method and get the states of all the variables you can find in that loop.

Thanks anyhow ! :-)
Comment 28 minhsien0330 2013-05-15 12:03:26 UTC
Created attachment 79341 [details]
gdb info

Dear Julien and Michael Meeks:
I run gdb and got some output information(attachment: gdb.txt).
But I am not sure it will help or not.
Thanks.
Comment 29 Julien Nabet 2013-05-15 19:06:26 UTC
Created attachment 79359 [details]
bt finish + console logs

Michael: Hope you'll find something interesting in this.
Comment 30 Cédric Bosdonnat 2014-01-20 08:57:43 UTC
Restricted my LibreOffice hacking area
Comment 31 QA Administrators 2014-10-23 17:32:10 UTC
Please read this message in its entirety before responding.

Your bug was confirmed at least 1 year ago and has not had any activity on it for over a year. Your bug is still set to NEW which means that it is open and confirmed. It would be nice to have the bug confirmed on a newer version than the version reported in the original report to know that the bug is still present -- sometimes a bug is inadvertently fixed over time and just never closed.

If you have time please do the following:
1) Test to see if the bug is still present on a currently supported version of LibreOffice (preferably 4.2 or newer).
2) If it is present please leave a comment telling us what version of LibreOffice and your operating system.
3) If it is NOT present please set the bug to RESOLVED-WORKSFORME and leave a short comment telling us your version and Operating System

Please DO NOT
1) Update the version field
2) Reply via email (please reply directly on the bug tracker)
3) Set the bug to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link:
https://wiki.documentfoundation.org/QA/BugTriage

There are also other ways to get involved including with marketing, UX, documentation, and of course developing -  http://www.libreoffice.org/get-help/mailing-lists/. 

Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
Comment 32 minhsien0330 2014-10-24 23:57:03 UTC
Hi~
I tested this bug on Version: 4.3.4.0.0+, and this bug is still there.
My OS is Debian.
Thanks.

The Libreoffice version information is :
Version: 4.3.4.0.0+
Build ID: bea74d73f4782b17f5286327f15db60ab3ae85de
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:libreoffice-4-3, Time: 2014-10-15_05:34:17


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.