Bug 115041 - Wrong SwXParagraph object from uno-Api
Summary: Wrong SwXParagraph object from uno-Api
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: lowest normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-16 12:57 UTC by Juergen Funk (CIB)
Modified: 2018-12-05 16:10 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Funk (CIB) 2018-01-16 12:57:10 UTC
For testing Required: WollMux <= 17.10, Debugger

When WollMux is active, then switch on: View -> Toolbars -> Sachleitende Verfügungen (WollMux)  

Press button "Copy" on the WollMux-Toolbar three times

Now select "I.  Copy von I." to "II.  Copy von I."

In Debugger set a Breakpoint at https://opengrok.libreoffice.org/xref/core/sw/source/core/unocore/unoparagraph.cxx#1334 (aa02ed306f7c633bbffede16e44e8e736977ace4)

Press the "Copy"-Button on the WollMux-Toolbar again.

The third call of the methode "OUString SAL_CALL SwXParagraph::getString()", then the "pTextNode = NULL" and the "m_pImpl->IsDescriptor() = false" but the variable 
was set with m_bIsDecriptor(pTextNode = NULL) and should be true, what is wrong here.
Comment 1 Xisco Faulí 2018-02-16 10:17:59 UTC
Hello Juergen Funk,
Should it be asked in the dev mailing list as well ?
Moving to NEW for the time being...
Comment 2 Vasily Melenchuk (CIB) 2018-12-05 16:10:49 UTC
I've checked situation deeper. In described case  SwXParagraph is gone into disposing state: object is still exist, but content was moved to another nodes after previous call of setString(): it was setting value for a range of paragraphs, so current one became invalidated.

Anyway this seems not a problem that should be reported to UNO user, so exception in this case was replaced by returning empty string and simple warning into log. 

Fix for master is here: https://gerrit.libreoffice.org/plugins/gitiles/core/+/dae741a2418f1d1dd35d364ec416516cc50f5054%5E%21