Bug 129524

Summary: CRASH: Setting anchor for a formcontrol to paragraph of pageheader leads to crash
Product: LibreOffice Reporter: Robert Großkopf <robert>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED    
Severity: critical CC: caolan.mcnamara, michael.stahl, oliver.brinzing, serval2412, vmiklos, xiscofauli
Priority: medium Keywords: haveBacktrace
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=129542
https://crashreport.libreoffice.org/stats/signature/SwDoc::ChgAnchor(SdrMarkList%20const%20&,RndStdIds,bool,bool)
Whiteboard:
Crash report or crash signature: ["SwDoc::ChgAnchor(SdrMarkList const &,RndStdIds,bool,bool)"] Regression By:
Bug Depends on:    
Bug Blocks: 87740, 133092    
Attachments: Try to set the anchor for the formcontrol to pageheader - crashes LO.
bt with debug symbols
bt with debug symbols

Description Robert Großkopf 2019-12-20 15:40:41 UTC
Created attachment 156698 [details]
Try to set the anchor for the formcontrol to pageheader - crashes LO.

Open the attached Writer-file.
Set design-mode of the form to "yes".
Mark the listfield and set Anchor > To Paragraph.
Move the listfield a littel bit, because it doesn't change from page to paragraph.
LO crashes directly.

Tested with OpenSUSE 15.1 64bit rpm Linux and different LO-versions, also LO 6.3.4.2.
Comment 1 Oliver Brinzing 2019-12-20 19:16:04 UTC
reproducible with:

Version: 6.5.0.0.alpha0+ (x64)
Build ID: 4b7b6993134a48c850608c758f7b7283bed27fec
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

Version: 6.3.4.2 (x64)
Build-ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: 

Version: 6.0.7.3 (x64)
Build-ID: dc89aa7a9eabfd848af146d5086077aeed2ae4a5
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: 

AOO 4.1.5 crashes with a SEH Exception: ACCESS VIOLATION
Comment 2 Julien Nabet 2019-12-21 16:20:14 UTC
Created attachment 156722 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 3 Julien Nabet 2019-12-21 18:20:40 UTC
Even worst, change anchor to character, it crashes :-(

// OD 26.06.2003 - allow drawing objects in header/footer.
// But don't allow control objects in header/footer
https://opengrok.libreoffice.org/xref/core/sw/source/core/txtnode/thints.cxx?r=568b820b#1358
Comment 4 Julien Nabet 2019-12-21 18:41:20 UTC
I created a new bugtracker for the other one (tdf#129542 put in see also)
Comment 5 Julien Nabet 2020-05-02 09:03:58 UTC
Created attachment 160215 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could still reproduce the crash.
The bt is very similar but the goal was to provide an update after 5 months.
Comment 6 Xisco Faulí 2020-05-04 09:12:51 UTC
It also crashes with this steps:
1. Enable Design Mode
2. Change Anchor to To Paragraph
3. Change Anchor to To Character
Comment 7 Julien Nabet 2020-05-04 09:25:42 UTC
Let's increase the priority since:
- it's a crash
- it can be reproduce for any env
- not a corner case (at least when using anchors)

Miklos/Michael: thought you might be interested in this one.
Comment 8 Xisco Faulí 2020-05-07 13:51:24 UTC
not so many crashes in https://crashreport.libreoffice.org/stats/signature/SwDoc::ChgAnchor(SdrMarkList%20const%20&,RndStdIds,bool,bool) and inherit from OOo.
Le'ts adjust priority/severity a bit
Comment 9 Caolán McNamara 2020-08-20 14:29:35 UTC
its possible that https://git.libreoffice.org/core/commit/6e0c7591ab86a893be85087d3caee0328e9411dd fixes this if someone would like to get it a test
Comment 10 Julien Nabet 2020-08-20 16:01:31 UTC
In reply to Caolán McNamara from comment #9)
> its possible that
> https://git.libreoffice.org/core/commit/
> 6e0c7591ab86a893be85087d3caee0328e9411dd fixes this if someone would like to
> get it a test

I confirm I don't reproduce this now, let's put this one to FIXED too.

Robert: don't hesitate to reopen this tracker if you can reproduce this with master sources build which includes quoted commit.