Bug 96245 - Frames are deleted from document that doesn't contain the draw:name property in draw:frame elements
Summary: Frames are deleted from document that doesn't contain the draw:name property ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.0.0.beta1
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0 target:5.1.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2015-12-04 13:32 UTC by Iandol
Modified: 2016-10-25 19:01 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot comparison (1.16 MB, image/png)
2015-12-04 13:32 UTC, Iandol
Details
screenshot comparison (333.09 KB, image/png)
2015-12-04 13:45 UTC, Iandol
Details
Test FODT document (20.64 KB, application/vnd.oasis.opendocument.text-flat-xml)
2015-12-04 13:46 UTC, Iandol
Details
screenshot comparison (341.87 KB, image/png)
2015-12-04 13:55 UTC, Iandol
Details
Simplified Test FODT (19.16 KB, application/xml)
2015-12-04 14:29 UTC, Iandol
Details
Testcase saved in LO5.0.4 now works in LO5.1 (34.07 KB, application/xml)
2015-12-04 14:34 UTC, Iandol
Details
Updated screenshot comparison (125.74 KB, image/png)
2015-12-04 15:02 UTC, Iandol
Details
Testcase edited to remove draw:name from draw:frame elements (34.07 KB, application/xml)
2015-12-06 12:51 UTC, Iandol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Iandol 2015-12-04 13:32:52 UTC
Created attachment 121013 [details]
screenshot comparison

Hi, i have a workflow where FODT files are generated from multimarkdown to FODT. These include images marked up in text frames. 5.2 nightly (can't use the 5.1beta1 as there is a 100% CPU bug) simply removes the second text frame in the test document, whereas 5.0.4 does as I expect and displays both text frames. This is a substantial regression from V5.0x. Please see screenshot comparison.

Note if I SAVE the file in V5.0.4, then I can open it and see the second frame in V5.1, so this regression seems to be related to the specific formatting of the text frames in the XML of the original document.
Comment 1 Iandol 2015-12-04 13:45:51 UTC
Created attachment 121015 [details]
screenshot comparison
Comment 2 Iandol 2015-12-04 13:46:26 UTC
Created attachment 121016 [details]
Test FODT document

Here is the FODT document
Comment 3 Iandol 2015-12-04 13:55:00 UTC
Created attachment 121017 [details]
screenshot comparison
Comment 4 m_a_riosv 2015-12-04 13:56:39 UTC
Not reproducible.
Win10x64
Version: 5.2.0.0.alpha0+ (x64) Build ID: b33236bfd25333513823e69fac1bc833ee4b5f6e
Threads 4; Ver: Windows 6.19; Render: GL;
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-11-27_11:30:47

Even after save and reopen the file with 5.2.

Test if change the OpenGL in Menu/Tools/Options/LibreOffice/View, has some effect.
Comment 5 steve 2015-12-04 14:21:34 UTC
OSX 10.11.1 + Version: 5.2.0.0.alpha0+
Build ID: 1fd41f43eb73c373cb94d32d82c5fb7a7e243367
Threads 4; Ver: -; Render: default; 

TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2015-12-03_23:48:44
Locale: de-DE (de.UTF-8)

I see the same result as Iandol showing on the right side of the screenshot. Thus setting to NEW.

Probably OSX only?
Comment 6 Iandol 2015-12-04 14:27:02 UTC
Here is a gist comparing the broken to working flat XML: https://gist.github.com/iandol/99469b06863faf0d84a3 — the XML structure is identical, but XML properties are different between the two...
Comment 7 Iandol 2015-12-04 14:29:19 UTC
Created attachment 121018 [details]
Simplified Test FODT
Comment 8 Iandol 2015-12-04 14:34:21 UTC
Created attachment 121019 [details]
Testcase saved in LO5.0.4 now works in LO5.1
Comment 9 Iandol 2015-12-04 15:02:24 UTC
Created attachment 121020 [details]
Updated screenshot comparison

I have tried OpenGL enabled (restart) and disabled (restart) without any change, I can still reproduce this bug.
Comment 10 Iandol 2015-12-06 12:49:24 UTC
OK, I've narrowed this down to the FODT XML property for the <draw:frame> elements draw:name="#"

If I take the working testcase (a fodt saved in 5.0.4)  https://bugs.documentfoundation.org/attachment.cgi?id=121019 and simply remove draw:name="1|2|3" from lines 326 338 and 341 then the file fails to show the second frame in 5.1 but still works fine in 5.0.4.

So 5.1 needs to have successively named draw:frame elements where 5.0.x does not. The bizarre point is this doesn't affect windows...
Comment 11 Iandol 2015-12-06 12:51:42 UTC
Created attachment 121076 [details]
Testcase edited to remove draw:name from draw:frame elements

This is testcase attachment 121019 [details] where I've simply removed the draw:name property. This shows the broken behaviour in 5.1, working fine in 5.0.4
Comment 12 Iandol 2015-12-28 21:26:45 UTC
Still broken in nightly, it would be great if someone on *nix could try to reproduce:

Version: 5.2.0.0.alpha0+
Build ID: 4c4f096a81e1643646f72cab17fb94610a346961
CPU Threads: 8; OS Version: -; UI Render: GL; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2015-12-28_11:01:25
Locale: en-US (en.UTF-8)
Comment 13 Iandol 2015-12-28 21:28:55 UTC
Still broken in nightly, great to know if this is broken on *nix...
Version: 5.2.0.0.alpha0+
Build ID: 4c4f096a81e1643646f72cab17fb94610a346961
CPU Threads: 8; OS Version: -; UI Render: GL; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2015-12-28_11:01:25
Locale: en-US (en.UTF-8)
Comment 14 raal 2016-01-15 07:57:38 UTC
 36819a8a88302af3a9b955eb7190aad1ef571a38 is the first bad commit
commit 36819a8a88302af3a9b955eb7190aad1ef571a38
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Thu Nov 19 06:59:42 2015 -0800

    source de0432a9256188c7b5cd1a83858311e68c890ebf

    source de0432a9256188c7b5cd1a83858311e68c890ebf

:040000 040000 08a0eb5b60b0a427b3f9d59f4cee3ffe680dbe98 30eee4aa1b33e06217795c5274cff1602eb6d8b1 M      instdir

author	Caolán McNamara <caolanm@redhat.com>	2015-11-11 13:34:43 (GMT)
committer	Caolán McNamara <caolanm@redhat.com>	2015-11-19 09:31:00 (GMT)
commit de0432a9256188c7b5cd1a83858311e68c890ebf (patch)
Incredible slowness and crashes with document with vast num of frame dups

 git bisect log
# bad: [91e9e2012e13c47548965e3b0626eb9ca9ba68d1] source ff2bdd52f54db24f867957a3293fae08e6a431a3
# good: [c1efd324c6ad448ac9edb030dc9738b9e6899e4d] source ab465b90f6c6da5595393a0ba73f33a1e71a2b65
git bisect start 'origin/master' 'c1efd324c6ad448ac9edb030dc9738b9e6899e4d'
# good: [99ec4939f7e2ca3f43b4c7c5b077abfbe676d128] source a01a0785e61d230cc8e2fb15cc1936f1fd29458a
git bisect good 99ec4939f7e2ca3f43b4c7c5b077abfbe676d128
# good: [fccddebc34192799edfd8c8f84e68ceef9997515] source 9d2a3acf40697776453e27c00a07db6d81f1e28f
git bisect good fccddebc34192799edfd8c8f84e68ceef9997515
# good: [ae2304ea19a993afe15f3184843a24da3087f8bc] source 4d6b9053a437dc128d186f8d100ef4a351136f54
git bisect good ae2304ea19a993afe15f3184843a24da3087f8bc
# good: [037e6c7eaff1d5a8811ebbb1ea1bb8bca02f7843] source 97ce93ec6481fc6d90eb6fc11b5fcc8c448f92ed
git bisect good 037e6c7eaff1d5a8811ebbb1ea1bb8bca02f7843
# bad: [50336eab2c597f5b9edcf10b432f0bc414ceb4e5] source 626bf18d7d4aec975f635b0dfe3894082e7ec487
git bisect bad 50336eab2c597f5b9edcf10b432f0bc414ceb4e5
# good: [8749995a04caa9e5f911d6cbd893c2ca0083b025] source 50d31b204fc39765f57737587ed9792c4fc97c00
git bisect good 8749995a04caa9e5f911d6cbd893c2ca0083b025
# good: [5f65337eceaba6fe1595644e76a96ae774e678dd] source e3ad062229c95a5cf987d562613d01738bb7fd81
git bisect good 5f65337eceaba6fe1595644e76a96ae774e678dd
# good: [90a9e9dec044fc35db0062ba88aa6b845eacdccb] source c0e04644a1703f4c6529e88b7c208126d2a2b1ec
git bisect good 90a9e9dec044fc35db0062ba88aa6b845eacdccb
# good: [95c0a9953941936d594f21580e78f7de06329845] source 2554efabb6d7cd2ad9f7cfdddd0712c25cdca1cd
git bisect good 95c0a9953941936d594f21580e78f7de06329845
# bad: [179ce594887adf39f57a3d04abe4c7df0c0a7a85] source 5319def848e855068512f0f895086ff7a1f9e44f
git bisect bad 179ce594887adf39f57a3d04abe4c7df0c0a7a85
# good: [81cb95a484797b34965600df88a258d5873827b9] source c8a7887846754ee76a5558f4dd1e89994704ea2c
git bisect good 81cb95a484797b34965600df88a258d5873827b9
# good: [98d00792aec616b4c65341d1ff213be676374ee1] source 49c5b9a98c45cd082e7fa6b6e399c39cd664ed66
git bisect good 98d00792aec616b4c65341d1ff213be676374ee1
# bad: [36819a8a88302af3a9b955eb7190aad1ef571a38] source de0432a9256188c7b5cd1a83858311e68c890ebf
git bisect bad 36819a8a88302af3a9b955eb7190aad1ef571a38
# good: [dee525d2053607f9651075bead2f32ca32d6c40b] source 526bbbbd2f8eb227bc0dacd755a6c72511adf976
git bisect good dee525d2053607f9651075bead2f32ca32d6c40b
# first bad commit: [36819a8a88302af3a9b955eb7190aad1ef571a38] source de0432a9256188c7b5cd1a83858311e68c890ebf
Comment 15 Commit Notification 2016-01-19 15:35:25 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=86963c2e23aebfa7b9df4e2d28278dfb581974d3

Resolves: tdf#96245 relax test for duplicate frame names

It will be available in 5.2.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 16 Commit Notification 2016-01-19 21:23:20 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

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

Resolves: tdf#96245 relax test for duplicate frame names

It will be available in 5.1.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.
Comment 17 Caolán McNamara 2016-01-19 21:23:52 UTC
you should set a unique name on each frame, that's the best course of action. I'll relax the current test to continue to allow empty frames for now though.
Comment 18 Iandol 2016-01-20 00:01:44 UTC
Thanks to raal for the bisect and Caolán for the fix. I've informed the owner of the tool that generated the unnamed draw:frame elements to add names to his output for future compatibility.