Bug 1192732 - Javascript macro script editor broken (java null pointer exception)
Summary: Javascript macro script editor broken (java null pointer exception)
Alias: None
Product: Fedora
Classification: Fedora
Component: libreoffice
Version: 21
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Stephan Bergmann
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2015-02-14 19:37 UTC by Nelson Benitez
Modified: 2015-04-10 08:35 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-04-10 08:35:46 UTC
Type: Bug

Attachments (Terms of Use)
Java error console (backtrace) (1.37 KB, text/plain)
2015-02-14 19:37 UTC, Nelson Benitez
no flags Details

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

Note You need to log in before you can comment on or make changes to this bug.