Bug 63214 - EDITING: ~SwIndexReg assertion failure on Undo with specific odt document
Summary: EDITING: ~SwIndexReg assertion failure on Undo with specific odt document
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.5.2 release
Hardware: Other All
: high major
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: BSA target:4.4.0
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-06 21:37 UTC by Julien Nabet
Modified: 2015-07-09 15:26 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
File which triggers the crash (16.52 KB, application/vnd.oasis.opendocument.text)
2013-04-06 21:37 UTC, Julien Nabet
Details
console + bt with symbols on master sources (13.41 KB, text/plain)
2013-04-06 21:38 UTC, Julien Nabet
Details
Crash message (16.39 KB, image/jpeg)
2013-08-28 12:50 UTC, Timur
Details
Crash debug WinDbg.txt (48.06 KB, text/plain)
2013-08-28 16:16 UTC, Timur
Details
bt with symbols (11.46 KB, text/plain)
2014-01-20 22:09 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Nabet 2013-04-06 21:37:57 UTC
Created attachment 77539 [details]
File which triggers the crash

Problem description:
On pc Debian (testing updated today) x86-64 with master sources updated today + brand new LO directory profile, no specific fonts or extensions. English UI

Steps to reproduce:
1. Open the attached file
2. Put the cursor at the beginning of the line "Master 4.1 - Confirmed Bug" (at the end of the first page)
3. Type Enter (=> you'll see lots of newlines)
4. Click Undo

Current behavior:
Crash
Expected behavior:
No crash
Operating System: Debian
Version: 4.1.0.0.alpha0+ Master
Comment 1 Julien Nabet 2013-04-06 21:38:43 UTC
Created attachment 77540 [details]
console + bt with symbols on master sources
Comment 2 Julien Nabet 2013-04-06 21:39:32 UTC
Comment on attachment 77539 [details]
File which triggers the crash

Mimetype fixed
Comment 3 Julien Nabet 2013-04-07 07:30:17 UTC
On Win7 with LO 4.0.2, I don't reproduce this.
Master only?
Comment 4 Jorendc 2013-04-08 16:50:20 UTC
(In reply to comment #0)
> Steps to reproduce:
> 1. Open the attached file
> 2. Put the cursor at the beginning of the line "Master 4.1 - Confirmed Bug"
> (at the end of the first page)
> 3. Type Enter (=> you'll see lots of newlines)
Pushing the Enter button doesn't do anything. I can create new line when I disable the protection by:
* right click on the table of contents
* Edit index/Table
* uncheck "Protect against manual changes"

But doing this, only type 1 enter result in 1 new line
> 4. Click Undo
No crash

Tested using Linux Mint 14 x64 with LibreOffice Version: 4.1.0.0.alpha0+
Build ID: 7b515a57eb6a644860715018656ac0b843b62ba (build today).

@Julien: is "turning of the protection" the good way to reproduce this?

Kind regards,
Joren
Comment 5 Julien Nabet 2013-04-08 19:17:03 UTC
Jorendc: I didn't put the cursor in TOC, I put it at the beginning of the line "Master 4.1 - Confirmed Bug" at the end of the page.
Comment 6 Jorendc 2013-04-08 19:39:39 UTC
Okay ... :s I feel quite ashamed right now :o.
/me smashes head on the table

I can reproduce this behavior by following the correct steps ;-).
Tested using Linux Mint 14 x64 with LibreOffice Version: 4.1.0.0.alpha0+
Build ID: 7b515a57eb6a644860715018656ac0b843b62ba (build today).

Kind regards,
Joren
Comment 7 Julien Nabet 2013-04-08 19:47:34 UTC
(In reply to comment #6)
> Okay ... :s I feel quite ashamed right now :o.
> /me smashes head on the table
I stopped long time ago to count the number of times when I felt the same :-)

> 
> I can reproduce this behavior by following the correct steps ;-).
> Tested using Linux Mint 14 x64 with LibreOffice Version: 4.1.0.0.alpha0+
> Build ID: 7b515a57eb6a644860715018656ac0b843b62ba (build today).
Thank you for your quick feedback.

Cédric/Michael: one for you?
Comment 8 Timur 2013-08-28 12:50:49 UTC
Created attachment 84789 [details]
Crash message

I confirm the bug with with LO 4.0.5.2 on On Win7. It doesn't occur in 3.6.5. 
So I'll change from LO 4.1 to LO 4.0.5 for now and from Linux to All platform.
Comment 9 Timur 2013-08-28 13:35:11 UTC
Looks to me that problem also doesn't occur in 4.0.1.2 on Win7 and 4.0.4.2 on Ubuntu 12.04.
Comment 10 Timur 2013-08-28 16:16:52 UTC
Created attachment 84799 [details]
Crash debug WinDbg.txt

Please confirm that this crash debug is correct.
Comment 11 Julien Nabet 2013-08-28 20:12:21 UTC
Timur: yes it's the equivalent of the one I got.

For the record, with master sources updated today, I still reproduce the problem with this same line:
sw/source/core/bastyp/index.cxx:227: virtual SwIndexReg::~SwIndexReg(): Assertion `!m_pFirst && !m_pLast' failed.
Comment 12 Timur 2013-08-30 17:39:36 UTC
(In reply to comment #8)
> Created attachment 84789 [details]
> Crash message
> 
> I confirm the bug with with LO 4.0.5.2 on On Win7. It doesn't occur in
> 3.6.5. 
> So I'll change from LO 4.1 to LO 4.0.5 for now and from Linux to All
> platform.

Actually, I tested with libreoffice-4-0~2013-08-14_10.04.34_LibO-Dev_4.0.6.0_Win_x86 and libreoffice-4-1~2013-08-27_09.28.10_LibreOfficeDev_4.1.2.0.0_Win_x86. Problem doesn't occur in 4.0.5.2 and 4.1.1.2.
Comment 13 Timur 2013-09-16 11:55:03 UTC
I tested with libreoffice-4-1~2013-09-14_14.29.02_LibreOfficeDev_4.1.3.0.0_Win_x86.msi and it doesn't happen.
Comment 14 Jean-Baptiste Faure 2013-12-22 13:50:28 UTC
Tested on Ubuntu 13.10 x86-64 with version 4.0.6, 4.1.4 and 4.2.0.1+
==> no crash

@Julien, Jorendc, Timur : do you still encounter this crash with current stable or development versions?

Best regards. JBF
Comment 15 retired 2013-12-22 17:21:23 UTC
another NoRepro with 4.2.0.1 from jmadero.

I myself cannot test this bug since document opens read-only for me for whatever reason.

So setting to WORKSFORME since I don't have a commit. Please re-open if I'm mistaken.
Comment 16 Julien Nabet 2014-01-20 22:09:32 UTC
Created attachment 92491 [details]
bt with symbols

On pc Debian x86-64 with master sources updated today, I can still reproduce the crash.
I attached a brand new bt.
Comment 17 Julien Nabet 2014-01-20 22:10:57 UTC
Joren: would you have some time to give it a new try?
Comment 18 Jorendc 2014-01-20 22:20:25 UTC
(In reply to comment #17)
> Joren: would you have some time to give it a new try?

Sure :-)!

Failed to reproduce tested using Linux Mint 16 x64 with LibreOffice:

Version: 4.3.0.0.alpha0+
Build ID: 3f150d2601a5eaec579816bc30a19fc4a446d571
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-01-20_01:32:33

and version provided by PPA packages (https://launchpad.net/~libreoffice/+archive/libreoffice-4-1):
Version: 4.1.4.2
Build ID: 410m0(Build:2)

Strange bug :|

Kind regards,
Joren
Comment 19 Julien Nabet 2014-01-20 22:34:53 UTC
The pb seems to appear in debug mode only since it fails in a assert:
/home/julien/compile-libreoffice/libo/sw/source/core/bastyp/index.cxx

    225 SwIndexReg::~SwIndexReg()
    226 {
    227     assert(!m_pFirst && !m_pLast); // There are still indices registered
    228 }
Comment 20 Joel Madero 2014-11-02 16:20:31 UTC
We need fresh confirmation of this bug. Moving back to UNCONFIRMED as REOPENED is saved for bugs that are currently assigned to developers who have submitted a patch that did not fix the problem.
Comment 21 Timur 2014-11-03 11:29:18 UTC
I cannot reproduce it with LO 4.2.7 and 4.4.0 master on Win64.
Comment 22 Michael Stahl (allotropia) 2014-11-03 17:05:23 UTC
that was a bug in cross-reference bookmarks

fixed on master
Comment 23 Michael Stahl (allotropia) 2014-11-03 17:08:18 UTC
http://cgit.freedesktop.org/libreoffice/core/commit/?id=a3fb06a0a9d03e31a8472dcc3cc994faeb59718c

has wrong bug number unfortunately so adding it manually...
Comment 24 Commit Notification 2015-06-24 22:05:18 UTC
Varun committed a patch related to this issue.
It has been pushed to "master":

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

Add Test for tdf#63214 CrossRefBookmark undo crash

It will be available in 5.1.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.