I use a debug build Version: 6.1.0.0.alpha0+ (x64) Build ID: 76349ea956c527e3a16023acd287f9d984ecfd8e CPU threads: 8; OS: Windows 10.0; UI render: GL; Locale: de-DE (de_DE); Calc: CL Open the document http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.odt and go some pages down below the TOC. Mark some lines and then press Ctrl+C to copy them to clipboard. I get an assertion failed in sw/source/core/layout/atrfrm.cxx, line 2626. There seems to be something special with this document. The bug does not occur with a simple dummy text and not with part 1 of the spec.
Created attachment 138352 [details] gdb backtrace
Reproduced in Version: 6.1.0.0.alpha0+ Build ID: 2392238e480ecc1d1a5e2e69789e79c10f142d6c CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk2; TinderBox: Linux-rpm_deb-x86_64@70-TDF-dbg, Branch:master, Time: 2017-12-05_23:58:29 Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded
Assertion introduced by https://cgit.freedesktop.org/libreoffice/core/commit/sw/source/core/layout/atrfrm.cxx?id=eed046433a847d3005e52c38963fb883322a39e6
the styles.xml has a bunch of styles with text:anchor-type attribute: <style:style style:name="Frame" style:family="graphic"> <style:graphic-properties text:anchor-type="paragraph" svg:x="0in" svg:y="0in" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content"/> </style:style> <style:style style:name="Graphics" style:family="graphic"> <style:graphic-properties text:anchor-type="paragraph" svg:x="0in" svg:y="0in" style:wrap="none" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/> </style:style> <style:style style:name="OLE" style:family="graphic"> <style:graphic-properties text:anchor-type="paragraph" svg:x="0in" svg:y="0in" style:wrap="none" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/> </style:style> <style:style style:name="Formula" style:family="graphic"> <style:graphic-properties text:anchor-type="as-char" svg:y="0in" style:vertical-pos="top" style:vertical-rel="baseline"/> </style:style> was this ever intentional? document was written by OOo 3.3 but of course this would likely be round-tripped so we have no idea what version created it...
oh no, the styles are *created* like that: case RES_POOLFRM_GRAPHIC: case RES_POOLFRM_OLE: { aSet.Put( SwFormatAnchor( RndStdIds::FLY_AT_PARA )); ... } break; case RES_POOLFRM_FORMEL: { aSet.Put( SwFormatAnchor( RndStdIds::FLY_AS_CHAR ) ); ... } break; how did i manage to miss that before... probably this needs to be restricted to only forbid anchor positions, not the entire RES_ANCHOR item.
(In reply to Michael Stahl from comment #4) > the styles.xml has a bunch of styles with text:anchor-type attribute: > was this ever intentional? That are the default styles from the "Frame" category. The anchor-settings are not available in the UI, see bug 32484; and they handling has an error, see bug 113381.
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=1e70464c380ecc0756ea29098632c503a60aec71 tdf#114396 sw: overly strict assertions in SwFrameFormat::Modify() It will be available in 6.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.
okay there's a bug about that; i was thinking the missing editing of the anchor on styles implied that it shouldn't exist, but in principle there's no problem with anchor type on styles, as long as styles don't have anchor positions. fixed on master.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=0c8a30ba47c6ed64c45063a060356e61e82a789f&h=libreoffice-6-0 tdf#114396 sw: overly strict assertions in SwFrameFormat::Modify() It will be available in 6.0.0.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.