Bug 94378 - Runtime error when clicking on a push button after changing between read-only and edit mode
Summary: Runtime error when clicking on a push button after changing between read-only...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Stephan Bergmann
URL:
Whiteboard: target:5.3.0
Keywords: regression
Depends on:
Blocks:
 
Reported: 2015-09-20 12:56 UTC by Volker Lenhardt
Modified: 2016-10-25 18:54 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Writer document with 1 push button (11.18 KB, application/vnd.oasis.opendocument.text)
2015-09-20 12:56 UTC, Volker Lenhardt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Lenhardt 2015-09-20 12:56:47 UTC
Created attachment 118872 [details]
Writer document with 1 push button

Whenever I open a file containing a push button in read-only mode and change into edit mode via the toolbar button "Edit file", a runtime error is thrown:
"com.sun.star.uno.RuntimeException".

This error keeps popping up, when I change back to read-only and vice versa.

The same thing happens, when I open the document in normal mode and change via the "Edit file" button into read-only mode.

Please note that the button works as expected after opening the document without any change of mode.

This behaviour is not limited to Writer but to Calc and Draw as well.

Tested with openSUSE 13.2 (LO 4.3.7.2), Ubuntu 14.04 (LO 4.4.5.2), Windows 7 (LO 4.4.5.2).

There is no such bug in LO 3.3.0 under Windows XP.
Comment 1 Buovjaga 2015-09-20 16:59:37 UTC
No error here as I set it to read-only and open.

Please test with 5.0.x.

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 2 Volker Lenhardt 2015-09-21 12:07:41 UTC
The problem persists with LO 5.0.1.2 in openSUSE 13.2 as well as in Windows 7.

Beluga: Please test again: Open the attached document, try the button. Then switch to edit mode (i.e. Menu Edit|Edit Mode or Ctrl-Shift-M), try the button again.

Another way: Open the document in read-only mode, try the button. Then switch to Edit mode (the same way as above or click on the button "Edit document"), try the button again.
Comment 3 Volker Lenhardt 2015-09-21 12:41:02 UTC
Sorry, I have to beg your pardon for having described the problem inappropriately in the first place. (Blushing I read the first post again.)

To make it clear: the runtime error comes up when you click on the push button in the attached file.
Comment 4 Buovjaga 2015-09-21 12:57:38 UTC
Ok, now I could repro. After opening read-only document:

1. Click push button & OK
2. Click Edit document
3. Click push button again

Note: LibO doesn't crash.

I tried also with 3.5.0, but when I clicked the Edit button in the toolbar, it wanted to open a copy of the document due to missing access rights. So I add regression, but not bibisectRequest as we don't know, if it worked in 3.5.0.

Not sure about the component, but I can't think of a better one to replace the current (UI).

Win 7 Pro 64-bit, Version: 5.0.1.2 (32-bit)
Build ID: 81898c9f5c0d43f3473ba111d7b351050be20261
Locale: fi-FI (fi_FI)
Comment 5 raal 2016-01-10 19:06:36 UTC
Reproducible wit LibreOffice 3.5.0 
Build ID: d6cde02
Comment 6 Stephan Bergmann 2016-07-04 15:57:19 UTC
(with current master towards LO 5.3)
the relevant exception is a DisposedException thrown at

> #0  0x00007fffb77e0e69 in OStorage::getPropertyValue(rtl::OUString const&) (this=0x7fffb41ec298, aPropertyName="OpenMode") at package/source/xstor/xstorage.cxx:4832
> #1  0x00007fffb77e1eb3 in non-virtual thunk to OStorage::getPropertyValue(rtl::OUString const&) () at package/source/xstor/xstorage.cxx:4822
> #2  0x00007fff26ac9351 in tdoc_ucp::StorageElementFactory::queryStorage(com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&, rtl::OUString const&, tdoc_ucp::StorageAccessMode) (this=0x4992320, xParentStorage=empty uno::Reference, rUri="vnd.sun.star.tdoc:/1", eMode=tdoc_ucp::READ) at ucb/source/ucp/tdoc/tdoc_storage.cxx:427
> #3  0x00007fff26ac8119 in tdoc_ucp::StorageElementFactory::createStorage(rtl::OUString const&, tdoc_ucp::StorageAccessMode) (this=0x4992320, rUri="vnd.sun.star.tdoc:/1", eMode=tdoc_ucp::READ) at ucb/source/ucp/tdoc/tdoc_storage.cxx:164
> #4  0x00007fff26abbe92 in tdoc_ucp::ContentProvider::queryStorage(rtl::OUString const&, tdoc_ucp::StorageAccessMode) const (this=0x7fffbc1b1030, rUri="vnd.sun.star.tdoc:/1", eMode=tdoc_ucp::READ) at ucb/source/ucp/tdoc/tdoc_provider.cxx:327
> #5  0x00007fff26a7c1f3 in tdoc_ucp::Content::loadData(tdoc_ucp::ContentProvider*, tdoc_ucp::Uri const&, tdoc_ucp::ContentProperties&) (pProvider=0x7fffbc1b1030, rUri=..., rProps=...) at ucb/source/ucp/tdoc/tdoc_content.cxx:2275
> #6  0x00007fff26a7bef8 in tdoc_ucp::Content::create(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, tdoc_ucp::ContentProvider*, com::sun::star::uno::Reference<com::sun::star::ucb::XContentIdentifier> const&) (rxContext=uno::Reference to (cppu::ComponentContext *) 0x7ffff7e3ed80, pProvider=0x7fffbc1b1030, Identifier=uno::Reference to (ucbhelper::ContentIdentifier *) 0x7fff64755d30) at ucb/source/ucp/tdoc/tdoc_content.cxx:103
> #7  0x00007fff26abadf4 in tdoc_ucp::ContentProvider::createDocumentContent(com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&) (this=0x7fffbc1b1030, Model=uno::Reference to (SwXTextDocument *) 0x7ffff7eb2430) at ucb/source/ucp/tdoc/tdoc_provider.cxx:183
> #8  0x00007fff26abb383 in non-virtual thunk to tdoc_ucp::ContentProvider::createDocumentContent(com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&) () at ucb/source/ucp/tdoc/tdoc_provider.cxx:157
> #9  0x00007fff26ab7230 in tdoc_ucp::DocumentContentFactory::createDocumentContent(com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&) (this=0x7fffbc736c58, Model=uno::Reference to (SwXTextDocument *) 0x7ffff7eb2430) at ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx:117
> #10 0x00007fff26ab73b3 in non-virtual thunk to tdoc_ucp::DocumentContentFactory::createDocumentContent(com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&) () at ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx:101
> #11 0x00007fff26d2288a in sf_misc::MiscUtils::xModelToTdocUrl(com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (xModel=uno::Reference to (SwXTextDocument *) 0x7ffff7eb2430, xContext=uno::Reference to (cppu::ComponentContext *) 0x7ffff7e3ed80) at scripting/source/inc/util/MiscUtils.hxx:90
> #12 0x00007fff26d1fbe2 in func_provider::ActiveMSPList::getMSPFromAnyContext(com::sun::star::uno::Any const&) (this=0x7fff64744cd8, aContext=uno::Any("com.sun.star.document.XScriptInvocationContext": {
>   <com::sun::star::uno::XInterface> = {
>     _vptr$XInterface = 0x7ffff7eb25c0
>   }, <No data fields>})) at scripting/source/provider/ActiveMSPList.cxx:121
> #13 0x00007fff26d5fe14 in func_provider::MasterScriptProviderFactory::createScriptProvider(com::sun::star::uno::Any const&) (this=0x7fffbc736bb8, context=uno::Any("com.sun.star.document.XScriptInvocationContext": {
>   <com::sun::star::uno::XInterface> = {
>     _vptr$XInterface = 0x7ffff7eb25c0
>   }, <No data fields>})) at scripting/source/provider/MasterScriptProviderFactory.cxx:49
> #14 0x00007fff26d60043 in non-virtual thunk to func_provider::MasterScriptProviderFactory::createScriptProvider(com::sun::star::uno::Any const&) () at scripting/source/provider/MasterScriptProviderFactory.cxx:47
> #15 0x00007ffff3096687 in SfxBaseModel::getScriptProvider() (this=0x7ffff7eb2538) at sfx2/source/doc/sfxbasemodel.cxx:3395
> #16 0x00007ffff3096853 in non-virtual thunk to SfxBaseModel::getScriptProvider() () at sfx2/source/doc/sfxbasemodel.cxx:3382
> #17 0x00007ffff301b070 in SfxObjectShell::CallXScript(com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Any&, com::sun::star::uno::Sequence<short>&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&, bool, com::sun::star::uno::Any const*) (_rxScriptContext=uno::Reference to (SwXTextDocument *) 0x7ffff7eb25c8, _rScriptURL="vnd.sun.star.script:Standard.Module1.Main?language=Basic&location=document", aParams=uno::Sequence of length 1 = {...}, aRet=uno::Any(void), aOutParamIndex=empty uno::Sequence, aOutParam=empty uno::Sequence, bRaiseError=true, pCaller=0x7fffffffc508) at sfx2/source/doc/objmisc.cxx:1470
> #18 0x00007ffff301bc53 in SfxObjectShell::CallXScript(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Any&, com::sun::star::uno::Sequence<short>&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&, bool, com::sun::star::uno::Any const*) (this=0x22c0da0, rScriptURL="vnd.sun.star.script:Standard.Module1.Main?language=Basic&location=document", aParams=uno::Sequence of length 1 = {...}, aRet=uno::Any(void), aOutParamIndex=empty uno::Sequence, aOutParam=empty uno::Sequence, bRaiseError=true, pCaller=0x7fffffffc508) at sfx2/source/doc/objmisc.cxx:1529
> #19 0x00007ffff1c6708a in svxform::(anonymous namespace)::NewStyleUNOScript::invoke(com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Any&) (this=0x8cff670, _rArguments=uno::Sequence of length 1 = {...}, _rSynchronousResult=uno::Any(void)) at svx/source/form/fmscriptingenv.cxx:1003
> #20 0x00007ffff1c65acf in svxform::FormScriptingEnvironment::doFireScriptEvent(com::sun::star::script::ScriptEvent const&, com::sun::star::uno::Any*) (this=0x2309000, _rEvent=..., _pSynchronousResult=0x0) at svx/source/form/fmscriptingenv.cxx:1083
> #21 0x00007ffff1c6525a in svxform::FormScriptListener::impl_doFireScriptEvent_nothrow(osl::ClearableGuard<osl::Mutex>&, com::sun::star::script::ScriptEvent const&, com::sun::star::uno::Any*) (this=0x7fffb41eb7f8, _rGuard=..., _rEvent=..., _pSynchronousResult=0x0) at svx/source/form/fmscriptingenv.cxx:722
> #22 0x00007ffff1c661ed in svxform::FormScriptListener::OnAsyncScriptEvent(void*) (this=0x7fffb41eb7f8, p=0x48b44b0) at svx/source/form/fmscriptingenv.cxx:890
> #23 0x00007ffff1c65ed8 in svxform::FormScriptListener::LinkStubOnAsyncScriptEvent(void*, void*) (instance=0x7fffb41eb7f8, data=0x48b44b0) at svx/source/form/fmscriptingenv.cxx:877
> #24 0x00007fffee437608 in Link<void*, void>::Call(void*) const (this=0x8d108a8, data=0x48b44b0) at include/tools/link.hxx:84
> #25 0x00007fffee43478c in ImplHandleUserEvent(ImplSVEvent*) (pSVEvent=0x8d108a0) at vcl/source/window/winproc.cxx:1954
> #26 0x00007fffee431a90 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) (_pWindow=0x19def00, nEvent=SalEvent::UserEvent, pEvent=0x8d108a0) at vcl/source/window/winproc.cxx:2522
> #27 0x00007fffeead354e in SalFrame::CallCallback(SalEvent, void const*) const (this=0x19df910, nEvent=SalEvent::UserEvent, pEvent=0x8d108a0) at vcl/inc/salframe.hxx:282
> #28 0x00007fffeeae7178 in SalGenericDisplay::DispatchInternalEvent() (this=0x15371c0) at vcl/unx/generic/app/gendisp.cxx:86
> #29 0x00007fffd3cc5116 in GtkData::userEventFn(void*) (data=0x6d4700) at vcl/unx/gtk3/gtk3gtkdata.cxx:819
> #30 0x00007fffd3cc524b in call_userEventFn(void*) (data=0x6d4700) at vcl/unx/gtk3/gtk3gtkdata.cxx:829
> #31 0x00007ffff5b48703 in g_main_context_dispatch (context=0x63a520) at gmain.c:3154
> #32 0x00007ffff5b48703 in g_main_context_dispatch (context=context@entry=0x63a520) at gmain.c:3769
> #33 0x00007ffff5b48ab0 in g_main_context_iterate (context=context@entry=0x63a520, block=block@entry=0, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3840
> #34 0x00007ffff5b48b5c in g_main_context_iteration (context=0x63a520, may_block=0) at gmain.c:3901
> #35 0x00007fffd3cc3d74 in GtkData::Yield(bool, bool) (this=0x6d4700, bWait=false, bHandleAllCurrentEvents=false) at vcl/unx/gtk3/gtk3gtkdata.cxx:477
> #36 0x00007fffd3cc7951 in GtkInstance::DoYield(bool, bool, unsigned long) (this=0x6d4570, bWait=false, bHandleAllCurrentEvents=false, nReleased=0) at vcl/unx/gtk3/../gtk/gtkinst.cxx:413
> #37 0x00007fffee935fa5 in ImplYield(bool, bool, unsigned long) (i_bWait=false, i_bAllEvents=false, nReleased=0) at vcl/source/app/svapp.cxx:509
> #38 0x00007fffee930c98 in Application::Yield() () at vcl/source/app/svapp.cxx:556
> #39 0x00007fffee930c23 in Application::Execute() () at vcl/source/app/svapp.cxx:473
> #40 0x00007ffff779eec9 in desktop::Desktop::DoExecute() () at desktop/source/app/app.cxx:1319
> #41 0x00007ffff77a0fc2 in desktop::Desktop::Main() (this=0x7fffffffe378) at desktop/source/app/app.cxx:1641
> #42 0x00007fffee943029 in ImplSVMain() () at vcl/source/app/svmain.cxx:172
> #43 0x00007fffee944888 in SVMain() () at vcl/source/app/svmain.cxx:210
> #44 0x00007ffff7802feb in soffice_main() () at desktop/source/app/sofficemain.cxx:165
> #45 0x000000000040094d in sal_main () at desktop/source/app/main.c:48
> #46 0x0000000000400927 in main (argc=1, argv=0x7fffffffe528) at desktop/source/app/main.c:47
Comment 7 Commit Notification 2016-07-05 12:29:36 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8f216e36f351fccd4cff05b142c5ba589c419000

tdf#94378: Respond to OnStorageChanged

It will be available in 5.3.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.