Bug Hunting Session
Bug 87663 - CRASH when attempting to add ToC to document
Summary: CRASH when attempting to add ToC to document
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.1 rc
Hardware: Other All
: medium major
Assignee: Caolán McNamara
URL:
Whiteboard: (target:4.4.0.1) target:4.5.0 target:...
Keywords:
Depends on:
Blocks: mab4.4
  Show dependency treegraph
 
Reported: 2014-12-24 03:22 UTC by Robinson Tryon (qubit)
Modified: 2015-02-22 16:26 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
GDBtrace.log from LibreOffice (22.40 KB, text/x-log)
2014-12-24 03:27 UTC, Robinson Tryon (qubit)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robinson Tryon (qubit) 2014-12-24 03:22:25 UTC
USING LO 4.4.0.1 + Ubuntu 14.04

I discovered this problem while trying to repro bug 87604.

REPRO Steps:
1) Open Writer
2) I initially wrote some text and converted it to Style 'Heading 1', but that doesn't seem to always be necessary for repro
3) Insert -> Indexes and Tables -> Indexes and Tables

RESULT: LO crashes

If the dialog for Indexes and Tables actually appears and LO doesn't immediately crash, close the dialog and try typing some more text. Then try to open the dialog again.
Comment 1 Robinson Tryon (qubit) 2014-12-24 03:26:04 UTC
(In reply to Robinson Tryon (qubit) from comment #0)
> REPRO Steps:
> 1) Open Writer
> 2) I initially wrote some text and converted it to Style 'Heading 1', but
> that doesn't seem to always be necessary for repro

Consistent repro: Type some text, then wait for the Updater notification to appear before trying to open the Indexes and Tables dialog.

I can't repro with a 4.5-build from the master branch, perhaps because there's no update notification?
Comment 2 Robinson Tryon (qubit) 2014-12-24 03:27:49 UTC
Created attachment 111255 [details]
GDBtrace.log from LibreOffice
Comment 3 Julien Nabet 2014-12-24 11:22:18 UTC
On pc Debian x86-64 with 4.4. sources updated yesterday + brand new file, I don't reproduce this.
Robinson: Could you attach the file so I could give it a try?
Comment 4 sophie 2014-12-24 14:26:10 UTC
Hi, confirmed using Version: 4.4.0.1
Build ID: 1ba9640ddd424f1f535c75bf2b86703770b8cf6f
Locale: fr_FR - Ubuntu 14.10
Julien: to reproduce, just write : New title, set it to Heading one, enter blabla below, then Insert > Index and tables > Index on a new line ==> crash. I can reproduce it each time I tried.
Set as New - Sophie
Comment 5 Julien Nabet 2014-12-24 14:37:15 UTC
Sophie: I failed to reproduce this :-( Perhaps is it because I use a build from 4.4 sources updated yesterday?
Comment 6 sophie 2014-12-24 14:48:40 UTC
Julien, I just tested with an old master I had at hand Version: 4.5.0.0.alpha0+
Build ID: 317b5bc5f801135b027e02d5acfc407cc2d05689
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-12-01_00:15:34
Locale: fr_FR 
I was not able to reproduce with this one, the TOC is created with no problem. I'll try with master 4.4. Sophie
Comment 7 sophie 2014-12-24 14:57:22 UTC
works great with this one Version: 4.4.0.1.0+
Build ID: a7f76a197900e7ece5d09fed2bf7920a42425e9c
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:libreoffice-4-4, Time: 2014-12-23_15:24:54
Locale: fr_FR - Sophie
Comment 8 Julien Nabet 2014-12-24 15:00:29 UTC
Thank you Sophie for your feedback, let's put this to WFM.
Comment 9 Robinson Tryon (qubit) 2014-12-24 20:22:08 UTC
(In reply to Robinson Tryon (qubit) from comment #1)
> Consistent repro: Type some text, then wait for the Updater notification to
> appear before trying to open the Indexes and Tables dialog.
> 
> I can't repro with a 4.5-build from the master branch, perhaps because
> there's no update notification?

Julien: I'm inclined to just toss this one on the 'done' heap, but is there any reason to suspect the updater?
Comment 10 Julien Nabet 2014-12-25 00:53:38 UTC
(In reply to Robinson Tryon (qubit) from comment #9)
> (In reply to Robinson Tryon (qubit) from comment #1)
> > Consistent repro: Type some text, then wait for the Updater notification to
> > appear before trying to open the Indexes and Tables dialog.
> > 
> > I can't repro with a 4.5-build from the master branch, perhaps because
> > there's no update notification?
> 
> Julien: I'm inclined to just toss this one on the 'done' heap, but is there
> any reason to suspect the updater?

I just realized that I had missed the "updater" part. I must recognize I don't know what's the "updater" in LO :-(
Comment 11 Robinson Tryon (qubit) 2014-12-25 06:40:51 UTC
(In reply to Julien Nabet from comment #10)
> I just realized that I had missed the "updater" part. I must recognize I
> don't know what's the "updater" in LO :-(

The updater is the tool that notifies users if an update is available for a given version:
https://wiki.documentfoundation.org/Updater


More Testing:

I deleted my UserProfile and disabled the network on my machine, and then tried to repro again:
- I added text
- I changed the styles of text
- etc..

Each time I tried to add ToC, the dialog opened without a crash. I then re-enabled the network and restarted LibreOffice (I waited for a while, but never got a prompt about an available update; it's possible that the program only checks once, shortly after startup).

I poked at text/styles, and was successful at opening the ToC dialog. Then the second I saw the updater message appear, I tried again and got the crash.

If there's some brittle code in LibreOffice that's crashing here, it might be worth it for us to track it down, especially if the bug might still be lurking in master.
Comment 12 Julien Nabet 2014-12-25 11:17:54 UTC
I can't use master sources for the moment since I can't build it anymore with dbgutil (which seems to me mandatory to find a bug), see http://nabble.documentfoundation.org/Build-fails-with-master-sources-td4133670.html .
I'll try to give a new try with 4.4 sources once it will be built with the last commits.
Comment 13 Per 2015-01-16 02:58:13 UTC
(In reply to Robinson Tryon (qubit) from comment #1)
> (In reply to Robinson Tryon (qubit) from comment #0)
> > REPRO Steps:
> > 1) Open Writer
> > 2) I initially wrote some text and converted it to Style 'Heading 1', but
> > that doesn't seem to always be necessary for repro
> 
> Consistent repro: Type some text, then wait for the Updater notification to
> appear before trying to open the Indexes and Tables dialog.
> 
> I can't repro with a 4.5-build from the master branch, perhaps because
> there's no update notification?

Nobody asked, but can confirm this bug also appears in win7 ultimate 64 bit (AMD) on 4.4.0.2. LO waits for a few secs then just dissappers without a trace. /Per
Comment 14 Robinson Tryon (qubit) 2015-01-16 08:56:44 UTC
(In reply to Per from comment #13)
> (In reply to Robinson Tryon (qubit) from comment #1)
> > (In reply to Robinson Tryon (qubit) from comment #0)
> > > REPRO Steps:
> > > 1) Open Writer
> > > 2) I initially wrote some text and converted it to Style 'Heading 1', but
> > > that doesn't seem to always be necessary for repro
> > 
> > Consistent repro: Type some text, then wait for the Updater notification to
> > appear before trying to open the Indexes and Tables dialog.
> > 
> > I can't repro with a 4.5-build from the master branch, perhaps because
> > there's no update notification?
> 
> Nobody asked, but can confirm this bug also appears in win7 ultimate 64 bit
> (AMD) on 4.4.0.2. LO waits for a few secs then just dissappers without a
> trace. /Per

Hmm, hmm... that's dangerous news, as my guess about the Updater was predicated on the (accidentally set) upgrade path from 4.4.0.1 -> 4.3.5.2 in the server-side of the Updater.

AFAIK, there's no upgrade path yet set for 4.4.0.2 rc, so maybe there's an underlying bug that *wasn't* fixed by 4.4.0.2?

(I TESTED with LO 4.4.0.2 + Ubuntu 14.04, but couldn't repro. There's no prompt from the updater to update the build, but I waited a minute or so after I wrote some text before I opened the Indexes and Tables dialog.)
Comment 15 Per 2015-01-16 15:55:35 UTC
(In reply to Robinson Tryon (qubit) from comment #14)
> (In reply to Per from comment #13)
> > (In reply to Robinson Tryon (qubit) from comment #1)
> > > (In reply to Robinson Tryon (qubit) from comment #0)
> > > > REPRO Steps:
> > > > 1) Open Writer
> > > > 2) I initially wrote some text and converted it to Style 'Heading 1', but
> > > > that doesn't seem to always be necessary for repro
> > > 
> > > Consistent repro: Type some text, then wait for the Updater notification to
> > > appear before trying to open the Indexes and Tables dialog.
> > > 
> > > I can't repro with a 4.5-build from the master branch, perhaps because
> > > there's no update notification?
> > 
> > Nobody asked, but can confirm this bug also appears in win7 ultimate 64 bit
> > (AMD) on 4.4.0.2. LO waits for a few secs then just dissappers without a
> > trace. /Per
> 
> Hmm, hmm... that's dangerous news, as my guess about the Updater was
> predicated on the (accidentally set) upgrade path from 4.4.0.1 -> 4.3.5.2 in
> the server-side of the Updater.
> 
> AFAIK, there's no upgrade path yet set for 4.4.0.2 rc, so maybe there's an
> underlying bug that *wasn't* fixed by 4.4.0.2?
> 
> (I TESTED with LO 4.4.0.2 + Ubuntu 14.04, but couldn't repro. There's no
> prompt from the updater to update the build, but I waited a minute or so
> after I wrote some text before I opened the Indexes and Tables dialog.)

I have tried to find a workaround (not a good one - just one that works) and if you do not add _anything_ into your document before insert-> index and tables, you get the dialog and are able to specify your details. If you after that add all of your paragraphs and headings it seems ok. so "nil" input data to the "indexer" works, but "any" data kills LO...
Comment 16 Per 2015-01-27 07:05:07 UTC
(In reply to Robinson Tryon (qubit) from comment #14)
> (In reply to Per from comment #13)
> > (In reply to Robinson Tryon (qubit) from comment #1)
> > > (In reply to Robinson Tryon (qubit) from comment #0)
> > > > REPRO Steps:
> > > > 1) Open Writer
> > > > 2) I initially wrote some text and converted it to Style 'Heading 1', but
> > > > that doesn't seem to always be necessary for repro
> > > 
> > > Consistent repro: Type some text, then wait for the Updater notification to
> > > appear before trying to open the Indexes and Tables dialog.
> > > 
> > > I can't repro with a 4.5-build from the master branch, perhaps because
> > > there's no update notification?
> > 
> > Nobody asked, but can confirm this bug also appears in win7 ultimate 64 bit
> > (AMD) on 4.4.0.2. LO waits for a few secs then just dissappers without a
> > trace. /Per
> 
> Hmm, hmm... that's dangerous news, as my guess about the Updater was
> predicated on the (accidentally set) upgrade path from 4.4.0.1 -> 4.3.5.2 in
> the server-side of the Updater.
> 
> AFAIK, there's no upgrade path yet set for 4.4.0.2 rc, so maybe there's an
> underlying bug that *wasn't* fixed by 4.4.0.2?
> 
> (I TESTED with LO 4.4.0.2 + Ubuntu 14.04, but couldn't repro. There's no
> prompt from the updater to update the build, but I waited a minute or so
> after I wrote some text before I opened the Indexes and Tables dialog.)

I also tested this  using the new 4.4.0.3 It still dies exacly the same way (LO just gone - no message) as 4.4.0.2 on win 7 64 bit Ultimate! 
/Per
Comment 17 Caolán McNamara 2015-02-12 17:21:46 UTC
I think the updater wants to put an icon into the top most menubar. The insert toc dialog has a preview which is an embedded writer window. I bet the menubar belongs to the preview, but is not visible/live or whatever so its pWindow is NULL and this dies because of the refactoring of http://cgit.freedesktop.org/libreoffice/core/commit/?id=fdffaef6ea21d165f1026940d5150a694dc85c46 which assumed that pWindow was always non-NULL and that it is always a MenuBarWindow.
Comment 18 Commit Notification 2015-02-12 17:42:34 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#87663 update checker tries to add icon to toc preview toolbar

It will be available in 4.5.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 19 Commit Notification 2015-02-12 21:22:47 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

Resolves: tdf#87663 update checker tries to add icon to toc preview toolbar

It will be available in 4.4.2.

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-02-20 12:01:37 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=21e6d5e42204e5a3e10de43a2b3ef880f4934aa0&h=libreoffice-4-4-1

Resolves: tdf#87663 update checker tries to add icon to toc preview toolbar

It will be available in 4.4.1.

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 Per 2015-02-21 04:27:02 UTC
Hi, I tested the
libo-44~2015-02-19_23.54.56_LibreOfficeDev_4.4.2.0.0_Win_x86.msi
and it worked without issues om win7 ultimate 64bit Swedish
/per
Comment 22 Julien Nabet 2015-02-21 08:30:06 UTC
Following last comment, I'll put to VERIFIED
Comment 23 Robinson Tryon (qubit) 2015-02-21 16:32:52 UTC
(In reply to Per from comment #21)
> Hi, I tested the
> libo-44~2015-02-19_23.54.56_LibreOfficeDev_4.4.2.0.0_Win_x86.msi
> and it worked without issues om win7 ultimate 64bit Swedish
> /per

(In reply to Julien Nabet from comment #22)
> Following last comment, I'll put to VERIFIED

Does the 4.4.2.0.0 build above try to run the updater?

Reason: Caolán McNamara described the problem in comment #17:
> I think the updater wants to put an icon into the top most menubar. The
> insert toc dialog has a preview which is an embedded writer window.
> ...
Comment 24 Julien Nabet 2015-02-21 18:13:01 UTC
(In reply to Robinson Tryon (qubit) from comment #23)
> (In reply to Julien Nabet from comment #22)
> > Following last comment, I'll put to VERIFIED
> 
> Does the 4.4.2.0.0 build above try to run the updater?
> 
> Reason: Caolán McNamara described the problem in comment #17:
I don't know at all, I was just updating the bugtracker following last comment.
Comment 25 Robinson Tryon (qubit) 2015-02-22 16:26:28 UTC
(In reply to Julien Nabet from comment #24)
> (In reply to Robinson Tryon (qubit) from comment #23)
> > (In reply to Julien Nabet from comment #22)
> > > Following last comment, I'll put to VERIFIED
> > 
> > Does the 4.4.2.0.0 build above try to run the updater?
> > 
> > Reason: Caolán McNamara described the problem in comment #17:
> I don't know at all, I was just updating the bugtracker following last
> comment.

Okay, I just wanted to make sure that we were testing the new (hopefully fixed) build of LibreOffice in an environment that had the potential to trigger the bug. If we never hit the codepath to put an updater icon in the menubar, then it seems possible that the bug could easily remain.