Bug 84199 - particular EMF with bezier curves wrongly displayed
Summary: particular EMF with bezier curves wrongly displayed
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
3.6.7.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:docx, filter:emf, regression
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2014-09-22 20:57 UTC by Yousuf Philips (jay) (retired)
Modified: 2017-11-12 11:01 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
sample doc (94.01 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-09-22 20:57 UTC, Yousuf Philips (jay) (retired)
Details
pdf export of the sample file in Word 2007 (66.97 KB, application/pdf)
2014-09-22 20:59 UTC, Yousuf Philips (jay) (retired)
Details
3.6.6.2 vs 3.6.7.2 screenshot (59.04 KB, image/png)
2014-10-20 20:43 UTC, tommy27
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-09-22 20:57:38 UTC
Created attachment 106692 [details]
sample doc

Steps:
1) Open attached file
2) Notice that it is blank
3) Test same file in MS Word

Tested in 4.4 master on Linux.
Comment 1 Yousuf Philips (jay) (retired) 2014-09-22 20:59:06 UTC
Created attachment 106693 [details]
pdf export of the sample file in Word 2007
Comment 2 Yousuf Philips (jay) (retired) 2014-09-23 10:37:40 UTC
The author of the document stated that they created these hand writing objects using a Windows PC tablet with active digitizer pen, but that this could also be achieved with any touch screen using Word's pen tools.
Comment 3 tommy27 2014-10-20 20:42:06 UTC
tested under Win7x64
DocX reader 1.0 can read the file which is shown as blank in LibO 4.4.0.0+ master, 4.3.2.2 

I tested older releases and I can tell that image looks almost fine in 3.6.6.2, then image starts disappearing in 3.6.7.2 and is definitively gone in 4.0.4.2 (I don't have early 4.0.x releases to test)

here's the list of bugfixes in 3.6.7.2:
https://wiki.documentfoundation.org/Releases/3.6.7/RC1
https://wiki.documentfoundation.org/Releases/3.6.7/RC2

maybe we can see something suspect that caused the regression
Comment 4 tommy27 2014-10-20 20:43:17 UTC
Created attachment 108136 [details]
3.6.6.2 vs 3.6.7.2 screenshot
Comment 5 Yousuf Philips (jay) (retired) 2014-10-20 22:36:04 UTC
Thanks for checking older versions as that didnt come to mind when i filed this one. Just assumed it never was able to render it. :)
Comment 6 Xisco Faulí 2014-10-21 10:37:28 UTC
bibisected:

3c257431da2650bf0d4ca7460af1b082c773816d is the first bad commit
commit 3c257431da2650bf0d4ca7460af1b082c773816d
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Wed Nov 27 14:49:38 2013 +0000

    source-hash-1581b1fc3ac82a7bd62df968226e98604a4ca52d
    
    commit 1581b1fc3ac82a7bd62df968226e98604a4ca52d
    Author:     Miklos Vajna <vmiklos@collabora.co.uk>
    AuthorDate: Mon Nov 25 17:24:39 2013 +0100
    Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
    CommitDate: Mon Nov 25 17:32:36 2013 +0100
    
        CppunitTest_sw_ooxmlexport: make it possible to use ..._TEST_ONLY with -Werror
    
        Change-Id: I451f81495a8e8535c8e0194198602ee5732164c6

:100644 100644 c290891590efa4fb28a6f86ef0cbe29a4b8baeff 8a8a92069ddd70a98210a44a33f652a4c3d06df4 M	ccache.log
:100644 100644 d0fcf4dc73a5a91def3e71fad9035807fbe84906 34c3ffcb2c754173b10dd0b1766dc5e2daecf91e M	commitmsg
:100644 100644 95386163339b3b232c8b0232a7d819ff40328f91 60671c4bff3b778b99dccbb9ca02b6d06a34b333 M	make.log
:040000 040000 8758436160d305aca069f7ba2a13436b30690d61 3a872c6b5794222bcd89d77b1ee2c7f6f75cac7d M	opt

# bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [e02439a3d6297a1f5334fa558ddec5ef4212c574] source-hash-6b8393474974d2af7a2cb3c47b3d5c081b550bdb
git bisect good e02439a3d6297a1f5334fa558ddec5ef4212c574
# bad: [4850941efe43ae800be5c76e1102ab80ac2c085d] source-hash-980a6e552502f02f12c15bfb1c9f8e6269499f4b
git bisect bad 4850941efe43ae800be5c76e1102ab80ac2c085d
# skip: [a043626b542eb8314218d7439534dce2fc325304] source-hash-9379a922c07df3cdb7d567cc88dfaaa39ead3681
git bisect skip a043626b542eb8314218d7439534dce2fc325304
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# good: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect good c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# good: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect good c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# bad: [30cde618212ecaf5725321372bd1b8339f8e2b9f] source-hash-137f872aa8e6e598e7c7ed1ffa4d21e580e22bdb
git bisect bad 30cde618212ecaf5725321372bd1b8339f8e2b9f
# bad: [30cde618212ecaf5725321372bd1b8339f8e2b9f] source-hash-137f872aa8e6e598e7c7ed1ffa4d21e580e22bdb
git bisect bad 30cde618212ecaf5725321372bd1b8339f8e2b9f
# good: [c8a5658505930ebcd7ac5bc6057a6f7204f4e1d3] source-hash-547750e8c2d001f92e3e303ebfda9b395538e741
git bisect good c8a5658505930ebcd7ac5bc6057a6f7204f4e1d3
# good: [c8a5658505930ebcd7ac5bc6057a6f7204f4e1d3] source-hash-547750e8c2d001f92e3e303ebfda9b395538e741
git bisect good c8a5658505930ebcd7ac5bc6057a6f7204f4e1d3
# good: [3f7dffadbdabcc8730fd19598afa9f5f70dca5b5] source-hash-2abcff25137c7c9af007554c97a4512319ec2e4d
git bisect good 3f7dffadbdabcc8730fd19598afa9f5f70dca5b5
# good: [3f7dffadbdabcc8730fd19598afa9f5f70dca5b5] source-hash-2abcff25137c7c9af007554c97a4512319ec2e4d
git bisect good 3f7dffadbdabcc8730fd19598afa9f5f70dca5b5
# bad: [641c999c8334a92273589d1a7931e8733fb265ef] source-hash-22029c7e17b4cb48acb058d47ec9c3b6b8b6b294
git bisect bad 641c999c8334a92273589d1a7931e8733fb265ef
# bad: [641c999c8334a92273589d1a7931e8733fb265ef] source-hash-22029c7e17b4cb48acb058d47ec9c3b6b8b6b294
git bisect bad 641c999c8334a92273589d1a7931e8733fb265ef
# good: [281e169052453119b46507f37bbb6cdebc45904c] source-hash-6ab3148d965be12592e8927b4c7868634e714932
git bisect good 281e169052453119b46507f37bbb6cdebc45904c
# good: [281e169052453119b46507f37bbb6cdebc45904c] source-hash-6ab3148d965be12592e8927b4c7868634e714932
git bisect good 281e169052453119b46507f37bbb6cdebc45904c
# bad: [3c257431da2650bf0d4ca7460af1b082c773816d] source-hash-1581b1fc3ac82a7bd62df968226e98604a4ca52d
git bisect bad 3c257431da2650bf0d4ca7460af1b082c773816d
# first bad commit: [3c257431da2650bf0d4ca7460af1b082c773816d] source-hash-1581b1fc3ac82a7bd62df968226e98604a4ca52d
Comment 7 Matthew Francis 2014-12-29 11:07:56 UTC
The behaviour appears to have changed across the below two commits

Adding Cc: to kendy@collabora.com. Could you possibly take a look at this? Thanks


commit 9d3c0aa1e64ae97ddc305df3873f977051f0b317
Author: Jan Holesovsky <kendy@collabora.com>
Date:   Wed Nov 20 21:17:50 2013 +0100

    Related fdo#61272: Revert "wmf-mm-text.diff: Fix WMF rendering, n#417818"
    
    This approach to WMF breaks EMF reading, need to revert it, and fix a
    different way.
    
    This reverts commit db1b08d217ebbdd1b0296e1da260bf314a77acf5.
    
    Conflicts:
        vcl/source/filter/wmf/winmtf.cxx
        vcl/source/filter/wmf/winmtf.hxx
    
    Change-Id: I8f779791153f2e1faa086c91b82b3e8b93304f3b

commit 198b17dc5e182dfb2e5c930458764c7b3e6c914f
Author: Jan Holesovsky <kendy@collabora.com>
Date:   Wed Nov 20 21:11:24 2013 +0100

    Related fdo#61272: Revert "wmf-mm-text-1.diff: Fix WMF rendering, n#417818"
    
    This approach to WMF breaks EMF reading, need to revert it, and fix a
    different way.
    
    This reverts commit 16eaa5e7c1208034bb3244fea9e6d9491ccb5501.
    
    Conflicts:
        vcl/source/filter/wmf/winmtf.cxx
    
    Change-Id: I59076d0a65d91ba3a1f3ebb48d8f7a542859d351
Comment 8 Chris Sherlock 2014-12-29 14:19:45 UTC
The Beziers in some of the embedded EMFs have 12 points! That's just not possible, because the number of points must be:

(number of curves x 3) + 1

As per the spec in [MS-EMF], see section 2.3.5.17.

Whether that is the issue, I don't know. But it does tend to indicate some issues with the EMF file, however we should actually just detect this and ignore the extraneous points in the Bezier.
Comment 9 Chris Sherlock 2014-12-29 14:27:40 UTC
Oh, I see. After that record there is a close figure record. Good to know about this, because I'll quote what Microsoft say in their own documentation about MS-EMF:

  2.3.5.17 EMR_POLYBEZIER16 Record

  Count (4 bytes): A 32-bit unsigned integer that specifies the total number of
  points. This value MUST be one more than three times the number of curves to be
  drawn, because each Bezier curve requires two control points and an endpoint,
  and the initial curve requires an additional starting point.

They neglected to mention that if you have this close figure record directly after then it acts as the extra point they mentioned - you need to use the first point as the end-point.
Comment 10 Robinson Tryon (qubit) 2015-12-10 07:40:10 UTC Comment hidden (obsolete)
Comment 11 Xisco Faulí 2016-09-10 15:57:35 UTC
Hi Chris,
I'm setting this ticket back to NEW as it has been inactive for more than 3
months.
Feel free to assign it back to you if you're still working on this.
Regards
Comment 12 Xisco Faulí 2016-09-26 17:09:06 UTC
Adding Cc: Jan Holesovsky
Comment 13 QA Administrators 2017-11-12 11:01:32 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug