Bug 112732 - Navigator Promote Demote of last entry in Header outline causes crash (debug)
Summary: Navigator Promote Demote of last entry in Header outline causes crash (debug)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:6.0.0 target:5.4.3
Keywords:
Depends on:
Blocks: Crash-Assert
  Show dependency treegraph
 
Reported: 2017-09-28 21:03 UTC by Jim Raykowski
Modified: 2017-10-03 15:20 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
navigator test document (177.83 KB, application/vnd.oasis.opendocument.text)
2017-09-28 21:03 UTC, Jim Raykowski
Details
gdbtrace.log (19.47 KB, text/plain)
2017-09-28 23:43 UTC, Jim Raykowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Raykowski 2017-09-28 21:03:44 UTC
Created attachment 136597 [details]
navigator test document

Attached is a test document to reproduce this bug.

1. open attached 'navigator test doc1.odt' in Writer
2. click on Sidebar Navigator icon
3. click on 'Heading on page 22'
4. click on 'Promote Chapter' icon
5. click on 'Demote Chapter' icon
6. CRASH

Version 5.4.1.2 does not result in crash
Comment 1 Xisco Faulí 2017-09-28 21:38:59 UTC
I can't reproduce it in

Version: 6.0.0.0.alpha0+
Build ID: 8d2a287da3abb0576512406227d0a3acd602123e
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

nor in

Version: 6.0.0.0.alpha0+
Build ID: 1047b426ed7ab0ee7a1b3ecf01adab18eb040de2
CPU threads: 1; OS: Windows 6.1; UI render: default; 
Locale: es-ES (es_ES); Calc: group

could you please paste the info from Help - About LibreOffice?
Comment 2 Jim Raykowski 2017-09-28 22:30:37 UTC
Xisco, here is the information requested.

Version: 6.0.0.0.alpha0+
Build ID: 38b26ed66ae9793244dd5281b157e44d62034c83
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group  

I have reported another bug that has to do with the Navigator and no one can reproduce that one either.
Comment 3 Xisco Faulí 2017-09-28 22:32:32 UTC
To be certain the reported issue is not related to corruption in the user profile, could you please reset your Libreoffice profile ( https://wiki.documentfoundation.org/UserProfile ) and re-test?
Comment 4 Jim Raykowski 2017-09-28 23:02:22 UTC
Ok, did the reset of my profile and tried in safe mode and got the same results. Forgot to specify that the Promote and Demote is the Chapter kind with the up and down arrows icons.

I can replicate with other test documents. It only occurs for the last entry in the headings outline.    

soffice.bin: /home/lo/Dev/LO/core/sw/source/uibase/utlui/content.cxx:2445: void SwContentTree::ExecCommand(const rtl::OUString&, bool): Assertion `pEntry == nullptr || dynamic_cast<SwOutlineContent*>(static_cast<SwTypeNumber*>(pEntry->GetUserData()))' failed.
Comment 5 Xisco Faulí 2017-09-28 23:17:59 UTC
Could you please provide a backtrace as described here? https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#GNU.2FLinux:_How_to_get_a_backtrace
Comment 6 Jim Raykowski 2017-09-28 23:43:33 UTC
Created attachment 136599 [details]
gdbtrace.log

Attached above is the requested gdbtrace.log
Comment 7 Xisco Faulí 2017-09-29 00:36:20 UTC
Oh, I see, I can't reproduce it because I'm not using a debug build.

@Michael, the assert from the log was introduced by you in b673ddb7d7a7b. Could you please take a look at it when you have a moment ?
Comment 8 Michael Stahl (allotropia) 2017-09-29 20:19:12 UTC
fixed in master
Comment 9 Commit Notification 2017-09-29 20:19:44 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#112732 sw: fix conditions in SwContentTree::ExecCommand()

It will be available in 6.0.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 10 Commit Notification 2017-10-03 15:20:11 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

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

tdf#112732 sw: fix conditions in SwContentTree::ExecCommand()

It will be available in 5.4.3.

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.