Bug 32939 - python macro in extension crashes LibO
Summary: python macro in extension crashes LibO
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.3.0 RC2
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-09 06:47 UTC by Rene Engelhard
Modified: 2012-08-31 10:06 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
the extension (185.86 KB, application/vnd.openofficeorg.extension)
2011-01-09 06:51 UTC, Rene Engelhard
Details
extension, that can't be installed on Windows with LibO/OOo 3.3.0 rc3/rc9 (47.86 KB, application/vnd.openofficeorg.extension)
2011-01-18 12:44 UTC, clio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rene Engelhard 2011-01-09 06:47:07 UTC
From http://bugs.debian.org/608732:

"[...] a macro in an extension i'm working at crashes libreoffice.          
i will attach the extension and instructions to reproduce problem."

and

"this extension i'm making responds ok on ooo3.2.1 but crashes on lo3.3.0rc[12].

the offending macro: dynamicDialog/createDialog. it fails to run, and lo crashes
on exit.

i have a quite similar script in .../user/Scripts/python that does run, but lo
also crashes on exit."

unfortunately no more info, except the attachement, which I am also going to attach here.
Comment 1 Rene Engelhard 2011-01-09 06:51:15 UTC
Created attachment 41801 [details]
the extension
Comment 2 Michael Meeks 2011-01-13 04:36:56 UTC
I can't install this extension; I get an error dialog from the Extension Manager:

(com.sun.star.uno.RuntimeException) { { Message = "<type 'exceptions.AttributeError'>: 'module' object has no attribute 'writeRegistryInfo', traceback follows\X000a /data/opt/.../pythonloader.py:138 in function writeRegistryInfo() [ return mod.writeRegistryInfo( self.ctx.ServiceManager, regKey )]\X000a Context = (com.sun.star.uno.XInterface )@0 } }

(manually transcribed FWIW) ;-)
Comment 3 Michael Meeks 2011-01-13 04:55:19 UTC
Well; the built-in python sample runs fine, so it is not some super-profound problem.
Similarly - I installed the ooconfig extension: http://wiki.services.openoffice.org/wiki/OoConfig which (it seems) is under-maintained. That failed to install any menu items I could use - but at least installed without errors [ it appears to register its component properly ].

So - this really looks like some error in the developers' component to me.
Comment 4 manj_k 2011-01-15 14:25:50 UTC
CC
Comment 5 Michael Meeks 2011-01-17 02:45:26 UTC
no stack / valgrind trace (as asked), supplied extension will not install - missing the registration hooks it needs, other python extensions install, and the included python sample works fine so ... un-marking as a blocker.
Comment 6 clio 2011-01-18 12:35:24 UTC
The extension in the attachment installs with an error on WinXP+LibO3.3.orc3.
Comment 7 clio 2011-01-18 12:44:52 UTC
Created attachment 42184 [details]
extension, that can't be installed on Windows with LibO/OOo 3.3.0 rc3/rc9

Try also this extension extracted from here http://wiki.services.openoffice.org/wiki/Extensions_Packager#A_sophisticated_extension
(see attachment)
With OOo3.3.0rc9 and LibO3.3.0rc3 on Windows it installs with errors. On Linux all is fine. Also , on Windows, with OOo3.3.0rc9, it's impossible to run Python macro by going to menu Tools/Macros/Organize macros.../Python - choose macro - Run. With LibO there are no preinstalled Python macroses, not so easy to check. But the extension in the attachment have Java, JavaScript, Python nd Basic macroses. After installing it, restart, open Writer, go to Tools/Add-ons/Calling scripts menu. But the problem is, that yo can't install it on Windows XP and Vista (they are tested).
Comment 8 clio 2011-01-18 12:50:17 UTC
Other python extensions having <manifest:file-entry manifest:full-path="OptionsDialogHandler.py" manifest:media-type="application/vnd.sun.star.uno-component;type=Python"/> in manifest.xml install fine. (MRI, DefaultBrowser etc)
But if the extension has 	<manifest:file-entry manifest:media-type="application/vnd.sun.star.framework-script"
		manifest:full-path="RESHETEVAAutoContractScripts/"/> in manifest.xml - the installation fails.
I.e., python scripts can't be registered. Only Python uno-components can.
(imho, this is a stopper)
Comment 9 clio 2011-01-18 13:19:51 UTC
Maybe this has something to do with http://qa.openoffice.org/issues/show_bug.cgi?id=116035 ? One person says the problem with python scripts is solved if msvcr90.dll and the manifest is copied to the python folder (?)
Comment 10 Björn Michaelsen 2011-12-23 11:33:18 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 11 sasha.libreoffice 2012-02-23 02:54:36 UTC
In version 3.5.0 problem still exist?
Comment 12 Florian Reisinger 2012-08-14 14:03:03 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 13 Florian Reisinger 2012-08-14 14:03:58 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 14 Florian Reisinger 2012-08-14 14:08:32 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 15 Florian Reisinger 2012-08-14 14:10:34 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian