Bug Hunting Session
Bug 59670 - RuntimeExceptionScriptProtocolHandler::createScriptProvider protected documents with password
Summary: RuntimeExceptionScriptProtocolHandler::createScriptProvider protected documen...
Status: RESOLVED DUPLICATE of bug 45313
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-21 17:42 UTC by Maxime de Roucy
Modified: 2017-02-24 13:57 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
a simple bugged document (9.96 KB, application/vnd.oasis.opendocument.text)
2013-01-21 17:42 UTC, Maxime de Roucy
Details
error when closing the document (13.91 KB, image/png)
2013-01-22 10:31 UTC, Maxime de Roucy
Details
Tool → Macros → run Macro (151.58 KB, image/png)
2013-01-22 10:32 UTC, Maxime de Roucy
Details
how to unlock the document (9.14 KB, image/png)
2013-01-22 10:33 UTC, Maxime de Roucy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime de Roucy 2013-01-21 17:42:03 UTC
Created attachment 73393 [details]
a simple bugged document

Hello,

I encounter a strange bug involving BASIC macro, event and protected documents with password.

I attached a simple writer documents that bug.
* activate the macros in your security settings
* open the document
* unlock the document (click on "Edit File")
* close the document or libreoffice
→ com.sun.star.uno.RuntimeExceptionScriptProtocolHandler::createScriptProvider(),  /home/max/libreoffice/nightly_build/package/source/xstor/xstorage.cxx:5069: 

The document contains :
* a simple text "test", which as nothing to do with the bug
* a macro : "Standard.test.aaa" which call msgbox("aaa").
  The msgbox function as nothing to do with the bug.
* events "Open Document" and "Document is going to be closed" are linked to the
  "Standard.test.aaa" macro.

Interesting facts :
* this bug is also present on 3.6 version.
* no bug on documents protected without password (documents which are just open in read-only)
* no bug if the document is modified (saved or not) before closing
* if the "Open Document" event link is removed the bug only appear the second time the document is closed (without restarting libreoffice)
* after unlocking the document, try "Tool → Macros → run Macro", the document macro isn't present and libreoffice debug output show :

warn:legacy.osl:26473:1:/home/max/libreoffice/nightly_build/scripting/source/provider/BrowseNodeFactoryImpl.cxx:355: caught an exception!
in function:com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::script::browse::XBrowseNode> > browsenodefactory::{anonymous}::getAllBrowseNodes(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>&)
type: com.sun.star.uno.RuntimeException
message: unsatisfied query for interface of type com.sun.star.frame.XModel!

Does anyone have an idea ?

Regards
Comment 1 Maxime de Roucy 2013-01-21 18:51:55 UTC
I forgot to give the password of the document : test
Comment 2 Joel Madero 2013-01-21 22:44:59 UTC
I'm not following the steps. I can open the file without a password but it opens read-only, then I don't have an "edit file" option. Can you give me a bit more detail about how to reproduce this issue. Also does it exist with 3.6? Thanks!
Comment 3 Stephan Bergmann 2013-01-22 09:33:40 UTC
What do you mean with "→ com.sun.star.uno.RuntimeExceptionScriptProtocolHandler::createScriptProvider(),  /home/max/libreoffice/nightly_build/package/source/xstor/xstorage.cxx:5069:"?  Does LO print that on stdout/stderr (but otherwise work fine), or does it crash there, or...?
Comment 4 Maxime de Roucy 2013-01-22 10:31:18 UTC
Created attachment 73441 [details]
error when closing the document
Comment 5 Maxime de Roucy 2013-01-22 10:32:10 UTC
Created attachment 73442 [details]
Tool → Macros → run Macro
Comment 6 Maxime de Roucy 2013-01-22 10:33:02 UTC
Created attachment 73443 [details]
how to unlock the document
Comment 7 Maxime de Roucy 2013-01-22 10:34:41 UTC
> I can open the file without a password but it opens read-only
It's the edit mode that is protected. sorry, I didn't mention it in my first post.

> I don't have an "edit file" option
I added a screenshot showing the icon for unlocking the document.

> Also does it exist with 3.6?
Yes

> What do you mean with "→ com.sun.star…
> Does LO print that on stdout/stderr (but otherwise work fine), or does it crash there, or...?

LO (compiled with debug flags) print it on stdout/stderr, it doesn't crash.
Also the document macro aren't there.
I added a screenshot showing what happen when I go to "Tool → Macros → run Macro" after unlocking the document.

I also added a screenshot showing the error I get when I close the document after unlocking it.
Comment 8 Joel Madero 2013-01-27 18:20:27 UTC
As it exists in 3.6 I am changing the version to reflect this, version is the oldest version that the bug is seen on. We use comments to reflect tests done on later versions.

I'll try to find someone to confirm this behavior. Thanks!
Comment 9 raal 2014-08-01 17:04:28 UTC
Reproducible with Version: 4.4.0.0.alpha0+
Build ID: 7d06a0601ddccc50185ea97fddcdf2ea39299096
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-07-28_06:17:50

error msgbox after close LO:
com.sun.star.uno.RuntimeExceptionScriptProtocolHandler::createScriptProvider(),  


Reproducible with version LibreOffice 3.5.0 
error msgbox:
com.sun.star.uno.RuntimeExceptionScriptProtocolHandler::createScriptProvider(),xstorage.cxx:5098;
Comment 10 QA Administrators 2015-09-04 02:49:47 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2016-09-20 10:29:45 UTC Comment hidden (obsolete)
Comment 12 Luis 2017-02-24 13:57:12 UTC

*** This bug has been marked as a duplicate of bug 45313 ***