Bug 123293 - FILEOPEN: (from stream) shows a warning "Not all Attributes could be read."
Summary: FILEOPEN: (from stream) shows a warning "Not all Attributes could be read."
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.1.5.2 release
Hardware: All All
: medium normal
Assignee: Samuel Mehrbrodt (allotropia)
URL:
Whiteboard: target:6.3.0 target:6.2.3
Keywords: bibisected, bisected, regression
: 118708 (view as bug list)
Depends on:
Blocks: File-Opening
  Show dependency treegraph
 
Reported: 2019-02-09 15:10 UTC by Oliver Brinzing
Modified: 2020-10-16 20:09 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
SCWARN_IMPORT_FEATURES_LOST (14.49 KB, image/png)
2019-02-09 15:10 UTC, Oliver Brinzing
Details
java code (2.51 KB, text/plain)
2019-02-09 15:12 UTC, Oliver Brinzing
Details
Beanshell script exposing the bug (2.28 KB, text/plain)
2019-02-15 16:15 UTC, Samuel Mehrbrodt (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Brinzing 2019-02-09 15:10:24 UTC
Created attachment 149048 [details]
SCWARN_IMPORT_FEATURES_LOST

opening a calc file via "private:stream" will show a warning 
"SCWARN_IMPORT_FEATURES_LOST".

this seems to start with lo 6.1, i can not reproduce it in lo 6.0.7.3.

i think the problem is in "sc\source\filter\xml\xmlwrap.cxx", imho "createBaseURI" could fail, cause there is no "aBaseURL" available?

bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCode& rError )
[...]
bool bOasis = ( SotStorage::GetVersion( xStorage ) > SOFFICE_FILEFORMAT_60 );

if ((nMode & ImportFlags::Metadata) && bOasis)
    {
        // RDF metadata: ODF >= 1.2
        try
        {
            const uno::Reference< rdf::XDocumentMetadataAccess > xDMA(
                xModel, uno::UNO_QUERY_THROW );
            const uno::Reference< rdf::XURI > xBaseURI(
                ::sfx2::createBaseURI( xContext, xStorage, aBaseURL, aName ) );
            uno::Reference<task::XInteractionHandler> xHandler =
                mrDocShell.GetMedium()->GetInteractionHandler();
            xDMA->loadMetadataFromStorage( xStorage, xBaseURI, xHandler );
        }
        catch ( const lang::WrappedTargetException & e)
        {
            ucb::InteractiveAugmentedIOException iaioe;
            if ( e.TargetException >>= iaioe )
            {
                rError = SCERR_IMPORT_UNKNOWN;
            }
            else
            {
                rError = SCWARN_IMPORT_FEATURES_LOST;
            }
        }
        catch ( const uno::Exception &)
        {
            rError = SCWARN_IMPORT_FEATURES_LOST;
        }
    }
Comment 1 Oliver Brinzing 2019-02-09 15:12:49 UTC
Created attachment 149049 [details]
java code
Comment 2 Oliver Brinzing 2019-02-09 15:30:50 UTC
seems to have started with:

commit e873ce870c8d81c842ca5f211e07e42a51fb7cbf	[log]
author	Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>Tue Jun 19 11:47:08 2018 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>Fri Jun 22 13:29:26 2018+0200
tree e47f7d0a37d709132a019695595a015590cc2e84
parent 8a66650dccb94b6e79a345a383f6a7f955bfa600 [diff]

tdf#118238 Only disable UI interaction when loading document as hidden

The "quiet" interaction handler was used unconditionally
when loading a document via the loadComponentFromURL API method.
So no dialog was shown asking the user whether he wants to enable macros.

With this patch, the "quiet" interaction handler is only used,
when the document was loaded with the "Hidden" property set.

Change-Id: Idd522d0bf605499b071390fb58312181b755dfca
Reviewed-on: https://gerrit.libreoffice.org/56086
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 1115a60e6d825c049680e7f2caf318e36d481b12)
Reviewed-on: https://gerrit.libreoffice.org/56094
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>

$ git bisect log
# bad: [1d66cc00ca6fd2e562cbed88704051b2f5d989e3] source 8d2abb388b0a2423c9b7e1f52373e1b06dd9786f
# good: [29d08f54c2f71ffee4fe12dbb24c5f5cbedecfd2] source 6eeac3539ea4cac32d126c5e24141f262eb5a4d9
git bisect start 'master' 'oldest'
# good: [3ac46f6c41b5044f162a451b10af0dc5afdcc113] source 22c7c3f54dbb93f856190c561b2540064c5a767d
git bisect good 3ac46f6c41b5044f162a451b10af0dc5afdcc113
# good: [63fc3e0d41dd91f9fb3fe9891e009451285d9619] source 13a1bc409d9b2f0d14f4d316b7977b1fc2eb3c8a
git bisect good 63fc3e0d41dd91f9fb3fe9891e009451285d9619
# good: [6a75149c2bee2fa1c01b36aef4b734ceee7bc025] source 91d8af2c5cf4e8ec0f1ce0e532e0c896de77750b
git bisect good 6a75149c2bee2fa1c01b36aef4b734ceee7bc025
# bad: [6440df548810a3adf5f7d125fe738467a5db7891] source 76c0b3c516f6b0d43136522b4d476eb60211cec1
git bisect bad 6440df548810a3adf5f7d125fe738467a5db7891
# good: [5ccea235927056bab13cc3166fa1213af86c385f] source 22b34bda2193464f766c2d9b3e51f7d558aa43a1
git bisect good 5ccea235927056bab13cc3166fa1213af86c385f
# good: [262896f3035c6b02aae3ad28245c1c44c3ba4af8] source 61f794af9bcebeab3aa399fe02fb5f4976c176ba
git bisect good 262896f3035c6b02aae3ad28245c1c44c3ba4af8
# bad: [04f54515201ecd488785d8aed9cadd8216eb9e7a] source 9ac5100cd3c9d7767067a3421c736b99b76670ed
git bisect bad 04f54515201ecd488785d8aed9cadd8216eb9e7a
# good: [f29f9db4b875384add5072db5c246f2e2cf38395] source b61975a16b534c8a4557e13bc364a2198783f677
git bisect good f29f9db4b875384add5072db5c246f2e2cf38395
# good: [7ee9f0665bc96bcfa34506bef9b1569e6b368708] source 22c451df33b733440f24c1feb6380d31240d55e6
git bisect good 7ee9f0665bc96bcfa34506bef9b1569e6b368708
# bad: [c131e86b4b969402644ce2ec93618fc16c830f67] source 565f5d40c83ca30fcd2f28359e0f1df0b4cbb9fe
git bisect bad c131e86b4b969402644ce2ec93618fc16c830f67
# bad: [171ee4fae038e6c34234686499636c500b979c5d] source e873ce870c8d81c842ca5f211e07e42a51fb7cbf
git bisect bad 171ee4fae038e6c34234686499636c500b979c5d
# good: [0e5c410ef388937cf9d347cabe2041f75c00ee80] source baf2c3216d4276840526726b9cdb7d5158f22708
git bisect good 0e5c410ef388937cf9d347cabe2041f75c00ee80
# good: [58ab5cc60dc06dac55644986ee410f343d1ba017] source 8a66650dccb94b6e79a345a383f6a7f955bfa600
git bisect good 58ab5cc60dc06dac55644986ee410f343d1ba017
# first bad commit: [171ee4fae038e6c34234686499636c500b979c5d] source e873ce870c8d81c842ca5f211e07e42a51fb7cbf
Comment 3 raal 2019-02-09 19:28:02 UTC
(In reply to Oliver Brinzing from comment #2)
> seems to have started with:
> 
> commit e873ce870c8d81c842ca5f211e07e42a51fb7cbf	[log]
> author	Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>Tue Jun 19 11:47:08 2018
> +0200
> committerThorsten Behrens <Thorsten.Behrens@CIB.de>Fri Jun 22 13:29:26
> 2018+0200
> tree e47f7d0a37d709132a019695595a015590cc2e84
> parent 8a66650dccb94b6e79a345a383f6a7f955bfa600 [diff]
> 
> tdf#118238 Only disable UI interaction when loading document as hidden
> 

adding cc to Samuel Mehrbrodt
Comment 4 Xisco Faulí 2019-02-12 16:16:34 UTC
Moving to NEW as the issue has been bisected.

@Samuel, could you please take a look at this issue ?
Comment 5 Samuel Mehrbrodt (allotropia) 2019-02-15 15:35:32 UTC
@Oliver Brinzing, how do you run that code?
Comment 6 Samuel Mehrbrodt (allotropia) 2019-02-15 16:10:34 UTC
(In reply to Samuel Mehrbrodt (CIB) from comment #5)
> @Oliver Brinzing, how do you run that code?

Nevermind, I created a beanshell script out of it.
Comment 7 Samuel Mehrbrodt (allotropia) 2019-02-15 16:15:24 UTC
Created attachment 149316 [details]
Beanshell script exposing the bug
Comment 8 Oliver Brinzing 2019-02-15 18:02:30 UTC
(In reply to Samuel Mehrbrodt (CIB) from comment #6)
> Nevermind, I created a beanshell script out of it.

thanks, now i know how to run beanshell scripts :-)
seems to be much easier than connecting remote with java 
or creating a demo extension ;-)
Comment 9 Commit Notification 2019-02-20 06:55:46 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/0a5ca5768f56db481dd3b947b3dddaab7ed96450%5E%21

tdf#123293 sfx2: fix metadata loss when loading from stream

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2019-03-13 14:47:43 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/e9ce7acaf5cc87a4fb40f12ea0aac8cb9df3562f%5E%21

tdf#123293 Add test

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2019-03-13 16:00:14 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/98b99ef61c6d725962cdbaa05ff90c9d1aa72d57%5E%21

tdf#123293 sfx2: fix metadata loss when loading from stream

It will be available in 6.2.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2019-03-14 09:18:35 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/ed85a358d4aed976ec19578fbfbe00d31c6430fe%5E%21

tdf#123293 Add test

It will be available in 6.2.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Oliver Brinzing 2019-03-14 20:29:17 UTC
can not longer reproduce this issue with beanshell script and my dev build:

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

is it possible to backport to lo 6.1.6 ?
Comment 14 Xisco Faulí 2019-03-14 20:36:45 UTC
(In reply to Oliver Brinzing from comment #13)
> can not longer reproduce this issue with beanshell script and my dev build:
> 
> Version: 6.3.0.0.alpha0+ (x64)
> Build ID: 4aa8a6ab08b755e3d82860e8dbc294f854336477
> CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
> Locale: de-DE (de_DE); UI-Language: en-US
> Calc: threaded
> 
> is it possible to backport to lo 6.1.6 ?

Please check the comments in https://gerrit.libreoffice.org/#/c/69101/
Comment 15 NISZ LibreOffice Team 2020-10-16 20:09:15 UTC
*** Bug 118708 has been marked as a duplicate of this bug. ***