Bug 1192732

Summary: Javascript macro script editor broken (java null pointer exception)
Product: [Fedora] Fedora Reporter: Nelson Benitez <nbenitezl>
Component: libreofficeAssignee: Stephan Bergmann <sbergman>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: caolanm, dtardon, erack, ltinkl, mstahl, nbenitezl, sbergman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-10 08:35:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Java error console (backtrace) none

Description Nelson Benitez 2015-02-14 19:37:33 UTC
Created attachment 991776 [details]
Java error console (backtrace)

Description of problem:


Updated libreoffice in fedora 21, then installed javascript suppport by installing libreoffice-rhino package, but when trying to Edit a macro in the Javascript Macros dialog, the script editor will fail to start and a java null pointer exception along a backtrace is printed on the console.

Comment 1 Stephan Bergmann 2015-02-16 11:04:07 UTC
I cannot reproduce.  I observe a slightly different NullPointerException on stderr, but which in itself is somewhat harmless and will be fixed with upstream <http://cgit.freedesktop.org/libreoffice/core/commit/?id=3336a5071bdf56f112f866a714a19ec70fc7e55c> "rhbz#1192732: Revert 'From the context of the code, this field should..."  The editor window opens and shows the requested JavaScript code for me regardless of that exception.

There must be something else broken for you, which then leads to the NullPointerException of attachment 991776 [details].  There is some logging mechanism in LibreOffice's scripting framework that could be used to get more information about your true problem, if only that logging mechanism were not completely broken (cf. upstream <http://cgit.freedesktop.org/libreoffice/core/commit/?id=f1f6edaae13c9591e391d52856c31c6cdc303f3e> "Make LogUtils.getTrace actually work.")

I put a modified ScriptFramework.jar for Fedora 21 at <people.redhat.com/~sbergman/ScriptFramework.jar> that includes the above LogUtils.getTrace fix and enables the logging by default (so you'll see quite some output to stdout).

Nelson, please temporarily replace your /usr/lib64/libreoffice/program/classes/ScriptFramework.jar with the above and try again to edit a JavaScript macro.  Just prior to the backtrace of attachment 991776 [details] there should now be another backtrace printed to stdout, which hopefully gives us a clue what's going wrong for you.

Comment 2 Nelson Benitez 2015-02-17 17:15:47 UTC
Thanks for the quick feedback!

and sorry for the trouble, but it could be an error on my part, because now it's working fine both with your jar and the original jar, though the nullpointer exception is printed anyway but should be harmless as the script window is now working.

I can't be sure 100% but problem could be that when I installed libreoffice-rhino package I didn't close libreoffice application and open it again.. but can't recall it (although I remember after installing rhino the javascript option appeard on macros).

Comment 3 Stephan Bergmann 2015-04-10 08:35:46 UTC
so closing as WORKSFORME per comment 2