Bug 105207 - Crash while calling MRI when it is not loaded.
Summary: Crash while calling MRI when it is not loaded.
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.2.3.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-09 12:37 UTC by Peter Toye
Modified: 2019-01-16 15:14 UTC (History)
4 users (show)

See Also:
Crash report or crash signature: ["frm::OGroup::GetControlModels()"]


Attachments
Test document (9.90 KB, application/vnd.oasis.opendocument.text)
2017-01-12 16:08 UTC, Peter Toye
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Toye 2017-01-09 12:37:10 UTC
I added a "Start Application" event to load the MRI library. For some reason (not yet investigated) LO can't find the library and I got an error message to that effect. Continuing I called a macro which had a call to MRI. LO crashed with this crash report 

http://crashreport.libreoffice.org/stats/crash_details/d1b33e49-6009-4ff4-82d3-3ac3fc14198a


This occurred in Base, but I suspect it is common to all LO apps.
Comment 1 Xisco Faulí 2017-01-12 10:06:09 UTC
Hello Peter,

Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 2 Peter Toye 2017-01-12 16:08:00 UTC
Created attachment 130363 [details]
Test document
Comment 3 Peter Toye 2017-01-12 16:08:50 UTC
This is quite difficult to reproduce, as you need a copy of LO which has an incorrect folder name for the macro which loads MRI. Also, it does not give an LO crash report 100% of the time - most of the time (on Windows 7) I get a window saying that LO has stopped working with the reason of APPCRASH.

I am not sure if you need to have an MRI macro library present to reproduce this. My machine has one in "My Macros"

To reproduce:

1) Load this document. You will see the "Start Application" event is assigned to a macro to load the MRI library stored in the document (it should of course have been stored in LibreOffice).

2) Run the TestMRILoad.Standard.Main macro. This will try to call MRI, which will not have been loaded. You get an error message. Terminate LO normally.

3) Either the crash report or the Windows error message pops up.
Comment 4 Peter Toye 2017-01-12 16:11:08 UTC
Correction to 1st paragraph of my previous comment:

This is quite difficult to reproduce, as it does not give an LO crash report 100% of the time - most of the time (on Windows 7) I get a window saying that LO has stopped working with the reason of APPCRASH.
Comment 5 Peter Toye 2017-01-19 15:52:57 UTC
I have another crash report at http://crashreport.libreoffice.org/stats/crash_details/265913bb-3818-4f5f-862d-fbe114715e79 which I think is the same bug. Hope this helps.

This one happened after another LO crash (no crash report produced) when I was debugging a macro with MRI. After the crash the MRI library disappeared from My Macros - I hadn't realised this when recovering the documents. SO there are probably two bugs here - one when debugging the macro (not been able to reproduce this yet) and the current bug.
Comment 6 Jean-Baptiste Faure 2018-06-19 19:59:14 UTC
What is MRI library ? Is it cross-platform or Windows only?

Status set to NEEDINFO, please set it back to UNCONFIRMED once requested
informations are provided.

Best regards. JBF
Comment 7 Peter Toye 2018-06-20 08:30:16 UTC
I refer you to https://extensions.libreoffice.org/extensions/mri-uno-object-inspection-tool

As it's written in Python, I assume it's OS-independent.
Comment 8 Jean-Baptiste Faure 2018-06-22 07:37:29 UTC
I imagine you are aware that this extension is very old (last release in 2013) and seems have not been tested with LO 4 and LO 5. Perhaps you should try to contact its author.
That said, LO shouldn't crash.

Best regards. JBF
Comment 9 Drew Jensen 2018-06-29 21:53:07 UTC
(In reply to Jean-Baptiste Faure from comment #8)
> I imagine you are aware that this extension is very old (last release in
> 2013) and seems have not been tested with LO 4 and LO 5. Perhaps you should
> try to contact its author.
> That said, LO shouldn't crash.
> 
> Best regards. JBF

It was updated the end of 2016 v1.3.3 is available and I've installed it without a problem under versions up through 6.2, successfully.

https://extensions.openoffice.org/en/project/mri-uno-object-inspection-tool

The URL in the earlier comment goes to an older listing for the extension.

As for the issue, using Ubuntu 18.04 and 6.2 Alpha0 build.

Calling MRI when it is not installed does not crash the application, in fact it is totally silent. I used a python script embedded in an attachment from an issue here, ran it with a call back enabled and mri installed it was called and ran properly. 
Closed the file, removed MRI, restarted Libo, ran the same file with the same script and it was fine, it just ignored the MRI call as far as I could tell. I didn't look to check that the script isn't handling the error silently, which is what I expect but either way it doesn't crash the application with this script.

The oldest version I have installed now is 5.4.7 and will check it there also.
Comment 10 Drew Jensen 2018-06-29 22:11:20 UTC
So, I tried the attached file from this issue under both the latest 6.2 and Version: 5.4.7.2, both under Ubuntu.

With no MRI installed there is no crash.

With the latest MRI installed it is called without problem.

Then I installed one of the old versions MRI, under these newer Libo version that doesn't install properly, what you get is a grayed out entry under extensions. 

With that setup, running the macro in the test file here at first seemed to be, it threw an error, but didn't crash immediately; it did however hang when I went to close the odt file.  

Still given that it didn't crash if MRI really wasn't installed but only when a broken (old) version of MRI was installed, though disabled, I would say this not an open issue or should go to WorksForMe.
Comment 11 Buovjaga 2018-07-13 19:30:14 UTC
Thanks for the thorough testing, Drew. I agree, let's close.
Comment 12 Peter Toye 2018-07-14 11:21:53 UTC
As I'm running Windows, it may be a Windows-specific bug. 

Drew - thanks for your work, but have you any way of testing it with Windows? I don't have a Linux machine so can't confirm your findings - sorry.
Comment 13 Buovjaga 2018-07-14 11:39:09 UTC
(In reply to Peter Toye from comment #12)
> As I'm running Windows, it may be a Windows-specific bug. 
> 
> Drew - thanks for your work, but have you any way of testing it with
> Windows? I don't have a Linux machine so can't confirm your findings - sorry.

Before we do anything else, Peter, does it crash for you with the latest version of MRI (1.3.3): https://extensions.openoffice.org/en/project/mri-uno-object-inspection-tool ?
Comment 14 Peter Toye 2018-07-16 12:05:06 UTC
Thanks. I'll do that, but I'm very busy at the moment so it may be a few days - it takes a bit of time to set it up and I don't know when I'll next have a couple of uninterrupted hours.

I'm not sure whether the non-existence of MRI 1.3.3 will give any different result from the non-existence of 1.2.3, but it's worth the try.
Comment 15 Buovjaga 2018-07-16 15:15:20 UTC
(In reply to Peter Toye from comment #14)
> Thanks. I'll do that, but I'm very busy at the moment so it may be a few
> days - it takes a bit of time to set it up and I don't know when I'll next
> have a couple of uninterrupted hours.
> 
> I'm not sure whether the non-existence of MRI 1.3.3 will give any different
> result from the non-existence of 1.2.3, but it's worth the try.

Right, sorry about the brainfart.

I did the procedure from comment 3 in Win 10 now with LibreOffice 6.0.4 and latest master, but did not get a crash.
Comment 16 Peter Toye 2018-07-18 11:32:09 UTC
(In reply to Buovjaga from comment #15)

> Right, sorry about the brainfart.
> 
> I did the procedure from comment 3 in Win 10 now with LibreOffice 6.0.4 and
> latest master, but did not get a crash.

Thanks. I don't think is was a brainfart, but still....

I'm having difficulty in remembering just how to make the crash happen after 18 months! It's a bit odd - I deleted the MRI library from "My Macros" to try to get the load to fail, but the "start App" event still seems to load it - no idea where it finds it. I don't know where LO stores its "my macros".

So the only thing I can suggest is to close this off unless, by accident, I can get it to happen again.

My main reason for reporting this was to bring an application crash to the notice of the dev team, because such things (as opposed to controlled error messages saying that LO has lost a library) are sometimes an indicator of a deeper failing such as a memory leak, which may have ramifications elsewhere.
Comment 17 Buovjaga 2018-07-18 11:37:28 UTC
Hmm, we still seem to be getting crash reports for this, albeit rarely: http://crashreport.libreoffice.org/stats/signature/frm::OGroup::GetControlModels()

Maybe we should leave this open for now.
Comment 18 Peter Toye 2018-07-18 13:41:30 UTC
(In reply to Buovjaga from comment #17)
> Hmm, we still seem to be getting crash reports for this, albeit rarely:
> http://crashreport.libreoffice.org/stats/signature/frm::OGroup::
> GetControlModels()
> 
> Maybe we should leave this open for now.

OK. I didn't know that. The link doesn't work, unfortunately. Maybe someone else who's reported the issue can help. Sorry my brain doesn't work after 18 months.
Comment 19 Peter Toye 2018-07-18 13:42:20 UTC
(In reply to Peter Toye from comment #18)
> (In reply to Buovjaga from comment #17)
> > Hmm, we still seem to be getting crash reports for this, albeit rarely:
> > http://crashreport.libreoffice.org/stats/signature/frm::OGroup::
> > GetControlModels()
> > 
> > Maybe we should leave this open for now.
> 
> OK. I didn't know that. The link doesn't work, unfortunately. Maybe someone
> else who's reported the issue can help. Sorry my brain doesn't work after 18
> months.

/doesn't/didn't/
Comment 20 Buovjaga 2018-07-18 13:48:58 UTC
Ah the Bugzilla linkification did not understand it. I can be reached through your original crash report, click the entry next to "Signature": http://crashreport.libreoffice.org/stats/crash_details/d1b33e49-6009-4ff4-82d3-3ac3fc14198a
Comment 21 Peter Toye 2018-07-18 14:10:17 UTC
(In reply to Buovjaga from comment #20)
> Ah the Bugzilla linkification did not understand it. I can be reached
> through your original crash report, click the entry next to "Signature":
> http://crashreport.libreoffice.org/stats/crash_details/d1b33e49-6009-4ff4-
> 82d3-3ac3fc14198a

Thanks. Not sure I understand the technical details - I'm not an LO developer!

Interesting - they're all Windows systems. So maybe testing on Linux isn't relevant. Unless they're all my own crashes, in which case a statistical sample of one is useless.
Comment 22 Xisco Faulí 2019-01-15 13:11:18 UTC
Hello Peter Toye,
A new major release of LibreOffice is available since this bug was reported.
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 23 Peter Toye 2019-01-16 15:13:05 UTC
(In reply to Xisco Faulí from comment #22)

As I said in my comment 16, I'm having difficulty after (now) 2 years remembering exactly how I got the crash. I've tried renaming the folder which contains the macros which call MRI and I get error messages but no crashes.

I think it's better to close it, and if I get get it to happen again, we can always re-open it.
Comment 24 Xisco Faulí 2019-01-16 15:14:46 UTC
Ok, let's close this as RESOLVED WORKSFORME.
Please, put it back to UNCONFIRMED if you manage to reproduce it