Issue 122885 - AOO 4.x crash with extension "Readability Report" 2.0.x or older
Summary: AOO 4.x crash with extension "Readability Report" 2.0.x or older
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: open-import (show other issues)
Version: 4.0.0
Hardware: All All
: P3 Blocker (vote)
Target Milestone: 4.0.1
Assignee: hdu@apache.org
QA Contact:
URL:
Keywords: crash, regression
Depends on:
Blocks:
 
Reported: 2013-07-29 16:09 UTC by sbarta
Modified: 2017-05-20 10:34 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.0.0
Developer Difficulty: ---
jsc: 4.0.1_release_blocker+


Attachments
Opening doc crash report (75.77 KB, text/plain)
2013-07-30 15:19 UTC, sbarta
no flags Details
opening odt crash report (76.36 KB, text/plain)
2013-07-30 15:20 UTC, sbarta
no flags Details
Extensions that may cause crash (387 bytes, text/plain)
2013-07-31 15:41 UTC, sbarta
no flags Details
prevent crash by catching the thrown exception (967 bytes, patch)
2013-08-01 12:30 UTC, hdu@apache.org
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description sbarta 2013-07-29 16:09:01 UTC
Tried opening two different existing files. Both were created/editing using the latest AOO OpenOffice.org 3.4.1 AOO341m1(Build:9593). One file had a ".doc" extension, the other an ".odt" extension.

I haven't tried any of the other components or file formats. (not worth my time)

I have a Macbook Pro 5.1 running Mac OS X 10.8.4 (12E55), 8 GB 1067 MHz DDR3, 2.4 GHz Intel Core 2 Duo

I installed the latest Java from Apple Support to make sure that wasn't the problem.
I tried three downloads and installations to make sure there wasn't a problem with the file transfer.

My system reported the crash to Apple each time it happened

Note: I also filed a report (122876) describing problems editing/saving with AOO 4.x crashing
Comment 1 hdu@apache.org 2013-07-30 09:14:27 UTC
(In reply to sbarta from comment #0)
> My system reported the crash to Apple each time it happened

We cannot access the reports sent to Apple. Please do this instead:
- copy the long text shown the Mac Crash Reporter
- paste it into a text editor
- save that to a file
- attach the resulting file to this issue
Comment 2 sbarta 2013-07-30 15:19:29 UTC
Created attachment 81206 [details]
Opening doc crash report
Comment 3 sbarta 2013-07-30 15:20:43 UTC
Created attachment 81207 [details]
opening odt crash report
Comment 4 Ariel Constenla-Haile 2013-07-30 15:22:23 UTC
@sbarta: do you have a Smart Tag extension installed?
Comment 5 sbarta 2013-07-30 15:28:12 UTC
I haven't knowingly installed one. Wasn't aware I needed to do so.
Comment 6 Ariel Constenla-Haile 2013-07-30 15:33:41 UTC
(In reply to sbarta from comment #5)
> I haven't knowingly installed one. Wasn't aware I needed to do so.

You don't to install anything. I just asked because of the backtraces, in both cases you can find SmartTagMgr::RecognizeString(), though this doesn't imply you have installed a Smart Tag extension.
Comment 7 sbarta 2013-07-30 15:39:15 UTC
Is the smart tag extension a problem?

Have to tell you that I appreciate your help!
Comment 8 hdu@apache.org 2013-07-31 10:50:40 UTC
Thanks for providing the crash reports. The offset of the frame addresses to their symbols is small enough so the stack make sense and as Ariel pointed out the SmartTagMgr is our prime suspect.

Please try to disable each extension that uses the SmartTag functionality. Click in the menu bar on "Tools", then "ExtensionManager" and then select the first extension that could be related to smart tags (e.g. Simple Calculator, Latitude, etc.). When you select an extension a "Disable" button appears which you should use. Please also disable all other suspect extensions.
Comment 9 sbarta 2013-07-31 15:41:13 UTC
Created attachment 81218 [details]
Extensions that may cause crash
Comment 10 sbarta 2013-07-31 15:46:56 UTC
See also bug report: [Bug 122876] AOO 4.x crash on Mac OS X 10.8.4 (12E55) editing or saving

I disabled all but one of the extensions (see file under attachment "Extensions that may cause crash).

I tested a couple of documents after I disabled the extensions and everything seems to be fine. I think that they may have also caused AOO 4.x to crash on editing and saving.

I'll enable the extensions one at a time to see which one caused the crash. I may even get brave enough to try Calc, etc.

FYI, before I disabled the extensions, AOO crashed while trying to recover one of the documents. The document opened without problems after I disabled the extensions.

(In reply to hdu@apache.org from comment #8)
> Thanks for providing the crash reports. The offset of the frame addresses to
> their symbols is small enough so the stack make sense and as Ariel pointed
> out the SmartTagMgr is our prime suspect.
> 
> Please try to disable each extension that uses the SmartTag functionality.
> Click in the menu bar on "Tools", then "ExtensionManager" and then select
> the first extension that could be related to smart tags (e.g. Simple
> Calculator, Latitude, etc.). When you select an extension a "Disable" button
> appears which you should use. Please also disable all other suspect
> extensions.
Comment 11 hdu@apache.org 2013-08-01 09:11:08 UTC
Confirming the problem after installing the "Readability Report". A wonderful and highly recommended extension by the way. It indeed uses smarttags ("The extension also uses SmartTags to highlight difficult words and phrases in your text"). Still analyzing...
Comment 12 hdu@apache.org 2013-08-01 11:09:49 UTC
The problem is an exception "java.lang.NoSuchMethodError" caused for the method
   com.sun.star.text.XTextMarkup.commitTextMarkup( String, XStringKeyMap)
that does no longer exist. Issue 121734 and its revision 1458881 are suspects.

java stack trace:
java.lang.NoSuchMethodError: com.sun.star.text.XTextMarkup.commitTextMarkup(ILjava/lang/String;IILcom/sun/star/container/XStringKeyMap;)
at com.surrey.SimpleTextRecognizer.recognize(SimpleTextRecognizer.java:333)
Comment 13 hdu@apache.org 2013-08-01 12:30:26 UTC
Created attachment 81227 [details]
prevent crash by catching the thrown exception

Simply catching the NoSuchMethodError makes the application usable again. This can only be a short term solution to change the bad stability problem into a missing functionality inconvenience.

The best solution would be to reintroduce the old API method or have the extension recompiled for AOO>=4.0 and have the old extension automatically be marked as incompatible.
Comment 14 jsc 2013-08-01 12:36:23 UTC
the extensions have to be updated, we changed a not yet published API.
The area where we failed is to document and communicate API changes. And that is something that we have to improve.

The changes were discussed on the dev list and nobody complained.
Comment 15 SVN Robot 2013-08-02 07:59:31 UTC
"hdu" committed SVN revision 1509576 into trunk:
#i122885# handle SmartTag related exceptions gracefully
Comment 16 hdu@apache.org 2013-08-02 08:02:03 UTC
The commit above fixes the crash and provides diagnostics to stderr.
Comment 17 SVN Robot 2013-08-05 14:14:57 UTC
"hdu" committed SVN revision 1510489 into trunk:
#i122885# tone down SmartTag exception error reporting to a DBG_WARNING
Comment 18 jsc 2013-08-13 11:56:45 UTC
approve showstopper request
Comment 19 SVN Robot 2013-08-13 14:37:47 UTC
"hdu" committed SVN revision 1513510 into branches/AOO401:
#i122885# handle SmartTag related exceptions gracefully
Comment 20 liuping 2013-09-11 06:41:07 UTC
Don't reproduce this defect , can someone give some suggestion for steps

on AOO400m1(Build:9700)  -  Rev. 1467605
on Mac 10.8 

Try to repoduce , the Steps below:

1.Add Extension :Readability Report(readablilityreport.oxt) and enable this extension and disable other extensiongs

2.Open file .doc and .odt created by AOO3.4.1 ,

But pass and no crash on AOO 4.0 

Are there some other specially step to help to reproduce this defect ?
Comment 21 hdu@apache.org 2013-09-11 08:35:27 UTC
In reply to liupingtan from comment #20)
> Are there some other specially step to help to reproduce this defect ?

The crash is reproducible with readability report 2.0.4 [1] and with almost any text document. What may be important is that this SmartTags extension runs when Writer does its "idle layouting", so it may take a couple of seconds after the document is created/loaded.

[1] http://extensions.openoffice.org/en/node/2659/releases
Comment 22 liuping 2013-09-18 03:36:46 UTC
thanks hdu

I still can't reproduce on AOO400m1(Build:9700)-Rev 1467605 on Mac10.8 

Can anybody with Mac 10.8 verify the fix with the latest snapshot