Opened 6 years ago

Closed 4 years ago

#8972 closed defect (fixed)

Write Activity (v. 60) freeze with .doc and .odt documents

Reported by: jasg Owned by: tomeu
Priority: high Milestone: 10.1.3
Component: write-activity (abiword) Version: not specified
Keywords: cjbfor9.1.0 Cc: rgs1, reuben, gregorio, joe, cjb, morgs, tomeu, uwog, greenfeld
Blocked By: Blocking:
Deployments affected: Paraguay Action Needed: no action
Verified: no

Description

Write version: 60 Build: 767 Firmware: Q2E18

Open with Write activity a document with .doc or .odt format and after a while time (10-15 minutes) of work on it the write activity freeze the entire XO and the only way that you got to get out of that is restarting with the power button.
Worst of all is that the latest modifications made on the document (changes made 10 or 15 minutes ago) is not automatically saved lost all this.

Attachments (6)

utilizacion_xo.doc (41.0 KB) - added by rgs1 6 years ago.
This file works well when first used but it crashed the XO when trying to resume from the Journal. The second time I tried to resume (after rebooting) it opened the XML without interpretating it correctly
0001--8972-Save-to-OpenDocument-if-we-cannot-export-in-th.patch (1.1 KB) - added by tomeu 6 years ago.
utilizacion_xo.odt (5.3 KB) - added by rgs1 6 years ago.
Open Document file created by Write when saving the Word document resumed from the Journal
org.laptop.AbiWordActivity-4.log (5.2 KB) - added by rgs1 6 years ago.
Log file when Write crashed after trying to resume the Open Document file created from a Word file
0001-OLPC-8972-Open-rtf-and-html-files-like-rich-text.patch (2.5 KB) - added by godiard 4 years ago.
0001-OLPC-8972-Open-rtf-and-html-files-like-rich-text-v2.patch (2.5 KB) - added by godiard 4 years ago.
This patch replace the first. The mime type must be text/rtf, not text/plain

Download all attachments as: .zip

Change History (30)

comment:1 Changed 6 years ago by reuben

  • Cc reuben gregorio added
  • Owner changed from kimquirk to tomeu

comment:2 Changed 6 years ago by tomeu

Some notes about how we could make this ticket more useful:

  • laptop freeze points to an out of memory condition, we should check before the laptop freezes if the memory consumption of the system is growing and if there's a single process that takes most memory.
  • on a resource constrained system as the XO, we need to check if we are putting more load on the machine than it can handle. So we should get more details about the document and, ideally, a sample would be attached to the ticket so we have greater chances of reproducing here.

After we do this, we'd have enough information to open a ticket upstream: http://bugzilla.abisource.com/

Changed 6 years ago by rgs1

This file works well when first used but it crashed the XO when trying to resume from the Journal. The second time I tried to resume (after rebooting) it opened the XML without interpretating it correctly

comment:3 Changed 6 years ago by rgs1

To get Write to open the file as pure text (so it shows the XML of what an abiword file is made) do the following steps:

  • open up http://dev.laptop.org/ticket/8972 with Browse
  • download the attached file in this ticket and add it to the journal
  • resume the (ms word) file from the Journal and add a new line to it or move part of it around (for example move the first 5 lines of text to the end of the file)
  • press the keep button and then exit the activity
  • go back to the journal and resume it again, should see XML

comment:4 Changed 6 years ago by joe

  • Cc joe added

comment:5 Changed 6 years ago by tomeu

Ok, so looks like there's some screwage when Write saves a document that was originally a .doc.

Opening the xml file as a text document means a lot of text and that can cause a significant use of memory that can lead to OOM.

I will investigate a bit more later.

comment:6 Changed 6 years ago by reuben

Bump. Do we have a resolution insight?

RGS, what is your needed timeline for this?

comment:7 Changed 6 years ago by cjb

  • Cc cjb added

Oh, is rgs1 part of a deployment? If so, maybe we should set the "Deployments affected" field.

(If not, I don't think we've ever asked end-users to give us deadlines/timelines before, so I wouldn't understand why that's happening.)

comment:8 Changed 6 years ago by reuben

  • Deployments affected set to Paraguay
  • Priority changed from normal to high

Deployments affected added.

RGS is the technical lead for Paraguay.

CJB can you grab me a quick discussion regarding this when you have a chance.

comment:9 Changed 6 years ago by cjb

Thanks, will do.

comment:10 Changed 6 years ago by tomeu

So, the issue seems to be that Write can read MS Word documents but cannot write in that format, so it falls back to abiword's native format but the mime-type property is not correctly updated, which causes it to be interpreted as (a big chunk of) plain text and that leads to high memory usage.

The patch attached will write in OpenDocument format and correctly update the mime-type property, which should fix this issue.

It's a bit hacky, but please try it and say if this solves the issue.

comment:11 Changed 6 years ago by cjb

  • Cc morgs added
  • Owner changed from tomeu to morgs

Cool, thanks!

Not sure who's handling Write releases at the moment -- Morgs, is it you? Sounds like we should roll a release after some testing.

comment:12 Changed 6 years ago by rgs1

  • Cc tomeu added

I tried this patch with build 767 and Write Activitiy version 60 (acording to ~/Activities/Write.activity/activity/activity.info).

I used the following steps to see if it solves the problem (of opening the document as plain text and/or crashing):

1) downloaded to the journal the word file attached to this ticket

2) I resumed the file with Write and without doing any changes to it I closed the Write Activity

3) I tried to re-resume the file from the journal and I got the following error in /var/log/messages:

Nov 21 15:37:07 localhost kernel: [ 4455.261663] Escribir <8d807[2300]: segfault at 34 ip b5e5922b sp bff7c0f8 error 4 in libabiword-2.6.so[b59af000+5bd000]

After that I found the .odt file in the datastore directory and I copied it to my regular laptop and tried to open it with Open Office (using Ubuntu). When trying to open it I got a "General Error" message but the file finally got opened and I got a badly constructed version of the file (you can read some parts of it).

I am attaching the .odt file copied from the datastore (in case anyone wants to take a look at it, I am not familiar with the inner structure of odt files to tell what went wrong) and Write's log.

Changed 6 years ago by rgs1

Open Document file created by Write when saving the Word document resumed from the Journal

Changed 6 years ago by rgs1

Log file when Write crashed after trying to resume the Open Document file created from a Word file

comment:13 Changed 6 years ago by rgs1

Tomeu, did you have some time to check your patch and my previous comments? Sorry for the insistance, we really want to help iron out whatever bugs might be in Write.. Thanks!

comment:14 Changed 6 years ago by tomeu

This seems to mean that the abiword installed in 767 crashes when trying to convert that .doc file to OpenDocument. That suggests that we would need to fix the C++ part of Write and this would require a new 8.2.1 release.

Nov 21 15:37:07 localhost kernel: [ 4455.261663] Escribir <8d807[2300]: segfault at 34 ip b5e5922b sp bff7c0f8 error 4 in libabiword-2.6.so[b59af000+5bd000]

Reuben, Greg, what should we do here?

comment:15 Changed 6 years ago by morgs

  • Cc uwog added
  • Owner changed from morgs to tomeu

comment:16 Changed 6 years ago by uwog

@tomeu: that would be from the .doc conversion to abiword's internal model. Can you reproduce it with a normal AbiWord 2.6.5? Ifso, any stack trace?

comment:17 Changed 6 years ago by mstone-xmlrpc

  • Keywords cjbfor9.1.0 added
  • Milestone changed from 8.2.1 to 9.1.0

Pushing out to 9.1.0, per edmcnierney's request.

comment:18 Changed 4 years ago by godiard

  • Action Needed changed from never set to test in build
  • Milestone changed from 9.1.0-cancelled to 10.1.3

comment:19 Changed 4 years ago by godiard

Will be in 353.

comment:20 Changed 4 years ago by greenfeld

  • Action Needed changed from test in build to diagnose
  • Cc greenfeld added

Tested with Write 63.1 and the utilizacion_xo.doc attachment to this ticket on an XO-1 with 10.1.3 os353.

Opening the document for the first time (copied or started from a USB stick) worked as expected. I did not see a hang looking at it, but I did see that closing Write and attempting to resume this document from the Journal failed to work properly.

Write showed raw RTF data instead of the actual document.

Since this bug is about the wrong mime time being saved after initially opening a document and not necessarily just freezes, I am putting it back to diagnose.

comment:21 Changed 4 years ago by godiard

  • Action Needed changed from diagnose to add to build

Ok. The problem is the rtf mime types have plain/text in their mime parents and i was opening it like plain text files.

I have a fix, but I need to define how we want to open the text/html files, because is the same case. If I save a html file and i open it in Write, I want to see the html source or a formatted text?

Changed 4 years ago by godiard

This patch replace the first. The mime type must be text/rtf, not text/plain

comment:22 Changed 4 years ago by godiard

  • Action Needed changed from add to build to package

comment:23 Changed 4 years ago by erikos

  • Action Needed changed from package to test in build

Is in 354.

comment:24 Changed 4 years ago by greenfeld

  • Action Needed changed from test in build to no action
  • Resolution set to fixed
  • Status changed from new to closed

Write 63.3 can open odt and MS Word doc documents and then resave them in the XO's internal journal without issue in 10.1.3 os355.

Note: See TracTickets for help on using tickets.