Bug 120382 - A ODP fails to save as PPT
Summary: A ODP fails to save as PPT
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: bibisected, bisected, filter:ppt, regression
: 120381 (view as bug list)
Depends on:
Blocks: PPT
  Show dependency treegraph
Reported: 2018-10-07 16:03 UTC by Mike Kaganski
Modified: 2021-05-07 04:22 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

An ODP that fails to save as PPT(X) (16.15 KB, application/vnd.oasis.opendocument.presentation)
2018-10-07 16:03 UTC, Mike Kaganski
error (27.96 KB, image/jpeg)
2018-10-08 08:46 UTC, BogdanB

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2018-10-07 16:03:19 UTC
Created attachment 145448 [details]
An ODP that fails to save as PPT(X)

Saving this document (a minimized document from https://ask.libreoffice.org/en/question/167707/write-error-while-exporting-odp-as-pptx-formatted-file/) as PPT(X) gives error:
For Save a Copy:
> Error saving the document PPTFail:
> General Error.
> General input/output error.
For Save As:
> Error saving the document PPTFail:
> Write Error.
> The file could not be written.

Fails with current master, and with Version: (x64)
Build ID: 65905a128db06ba48db947242809d14d3f9a93fe
CPU threads: 12; OS: Windows 10.0; UI render: GL; 
Locale: ru-RU (ru_RU); Calc: CL

and with LibreOffice 20m0(Build:2)
Linux niggahme 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux
(as reported in original AskLibO question).

Also fails with Version:
Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0

But saves OK with Version:
Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71

The problem is the "Title2" master page, deleting which resolves the issue, and assigning which to a page gives failed assertions in master build:

Microsoft Visual C++ Runtime Library
Assertion failed!

Program: C:\lo\src\core\instdir\program\svllo.dll
File: C:/lo/src/core/svl/source/notify/lstner.cxx
Line: 103

Expression: !(bListeningAlready && eDuplicateHanding == DuplicateHandling::Unexpected) && "duplicate listener, try building with DBG_UTIL to find the other insert site."

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts

(Press Retry to debug the application - JIT must be enabled)
Abort   Retry   Ignore   
Comment 1 Mike Kaganski 2018-10-07 16:10:08 UTC
A code pointer: returning the error happens in PPTWriterBase::exportPPT (sd/source/filter/eppt/pptx-epptbase.cxx), in the code

>    for ( i = 0; i < mnMasterPages; i++ )
>    {
>        if ( !CreateSlideMaster( i ) )
>            return;
>    }

which later calls SdMasterPage::getBackground (sd/source/ui/unoidl/unopage.cxx), where

>             rValue <<= Reference< beans::XPropertySet >( xFamily->getByName( aStyleName ), UNO_QUERY_THROW );

Comment 2 MM 2018-10-07 17:52:46 UTC
*** Bug 120381 has been marked as a duplicate of this bug. ***
Comment 3 MM 2018-10-07 17:56:02 UTC
Confirmed on windows 7 x64 with Version: (x64)
Build ID: 5d2cb2a5dd04fe174b336488731eb50bbb5faed3
CPU threads: 3; OS: Windows 6.1; UI render: default

Only saving to ppt gives the error, not when saving to pptx.
Comment 4 BogdanB 2018-10-08 08:46:10 UTC
Created attachment 145466 [details]

With LO Versiune: I could opened the file and save as PPTX. And then open the pptx file. No error.
Identificator construire: 1:6.0.6-0ubuntu0.18.04.1
Fire CPU: 4; OS: Linux 4.15; Redare UI: implicit; VCL: gtk3; 
Setări regionale: ro-RO (ro_RO.UTF-8); Calc: group threaded

With LO Version: I could opened the file, save as PPTX, but get an error after opening PPTX file. See the image.
Build ID: e539a492597c7312a8d0cccb4b386341bd4ec84a
CPU threads: 4; OS: Linux 4.15; UI render: GL; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-10-05_00:43:34
Locale: ro-RO (ro_RO.UTF-8); Calc: threaded
Comment 5 MM 2018-10-08 22:38:02 UTC
(In reply to BogdanB from comment #4)
> Created attachment 145466 [details]
> error
> With LO Version: I could opened the file, save as PPTX, but
> get an error after opening PPTX file. See the image.
> Build ID: e539a492597c7312a8d0cccb4b386341bd4ec84a
> CPU threads: 4; OS: Linux 4.15; UI render: GL; VCL: gtk2; 
> TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time:
> 2018-10-05_00:43:34
> Locale: ro-RO (ro_RO.UTF-8); Calc: threaded

Yes, with v6.0.7.1 i'm getting an error when trying to load the pptx file.
Which is a different problem then getting the error when saving as ppt.
Comment 6 Mike Kaganski 2018-10-09 04:55:11 UTC
Yes, sorry for the noise about PPTX - my fault, assumed that the description on the Ask site is accurate, and only tested PPT part.

As MM stated in comment 5, the error on opening should be treated as a different problem. It might happen that it would be fixed by fixing this, though, but until then, let's concentrate here on the PPT part.
Comment 7 raal 2018-12-29 13:12:19 UTC
This seems to have begun at the below commit.
Adding Cc: to  Tobias Lippert; Could you possibly take a look at this one?
 4d136132a55af35f66dd60d33d5c767cb29404af is the first bad commit
commit 4d136132a55af35f66dd60d33d5c767cb29404af
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Thu May 28 20:04:07 2015 +0800

    commit 0c17ccc493d0c7a80f37600dae76a09a119bef78
    Author:     Tobias Lippert <drtl@fastmail.fm>
    AuthorDate: Wed Mar 5 20:06:39 2014 +0100
    Commit:     Caolán McNamara <caolanm@redhat.com>
    CommitDate: Tue Mar 11 08:54:37 2014 -0500
        fdo#30770 - Speed up xslx import
        Change-Id: Ie3d855923c651b6e05c0054c8e30155218279045
        Reviewed-on: https://gerrit.libreoffice.org/8485
        Reviewed-by: Caolán McNamara <caolanm@redhat.com>
        Tested-by: Caolán McNamara <caolanm@redhat.com>
Comment 8 Tobias Lippert 2019-01-07 08:22:45 UTC
I will. But I am currently involved in another project. It will probably be in the magnitude of 6 weeks before I get to it. If this is urgent, someone else should have a look.
Comment 9 Xisco Faulí 2019-04-09 12:03:06 UTC
Dear Tobias Lippert,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assigned it back to yourself if you're still working on this.
Comment 10 Timur 2021-04-19 10:20:09 UTC
Linux 6.3:

commit b81a5ee5e44183146fc1114ca3fd491081b46407
Date:   Thu Mar 14 06:22:38 2019 +0100
    source 362082b57b2d6e9119acb3fb033aefcbce8cf8bb
    previous sha: ed901c336ff0b99291ffe53be6bd762abcccf55c
author	Mike Kaganski <mike.kaganski@collabora.com>	2019-03-13 22:44:44 +0100
committer	Mike Kaganski <mike.kaganski@collabora.com>	2019-03-14 06:16:23 +0100
commit 362082b57b2d6e9119acb3fb033aefcbce8cf8bb (patch)
tree d913efdef9556e1d8c90e1b3a1141f43618038a4
parent ed901c336ff0b99291ffe53be6bd762abcccf55c (diff)
Only return elements with both name and predicate matching arguments
... otherwise, after first stylesheet with matching name but failing
predicate, next stylesheet that matches predicate is returned, regardless
what is its name.

See commit b37b299d5228beeecb913980780f463756c5a878.

So, Mike reported and fixed for PPT. I don't repro for PPTX.
Comment 11 BogdanB 2021-05-07 04:22:27 UTC
working well in
Version: / LibreOffice Community
Build ID: 1a99b4e44190e182d56a04678850d62635d74c65
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded