Page 1 of 1

Crashes with javafx extension in Linux

PostPosted: Sat Jan 10, 2015 8:11 am
by arch
Hello
I got an extension which works fine on windows systems, but openoffice crushes when i try to use in on linux, tested it on Arch,CentOs,fedora results are same... There is no exception thrown in logs, also no exception happens when debugging from source code.What may be the reason?

Re: OO Crashes when trying to use extension in Linux

PostPosted: Sat Jan 10, 2015 8:44 am
by RoryOF
What extension? Name and URL, please.

Re: OO Crashes when trying to use extension in Linux

PostPosted: Sat Jan 10, 2015 12:04 pm
by arch
RoryOF wrote:What extension? Name and URL, please.

Unfortunately can't link the extension.
Its custom extension, it just loads javafx window to connect to other software, can see the addon in openoffice menu but when it tries to load javafx openoffice freezes. Is there any known issue with openoffice & javafx in linux?

Re: Crashes with javafx extension in Linux

PostPosted: Sat Jan 10, 2015 6:43 pm
by RoryOF
I don't know of any problem. If it works when compiled in debug mode it may be a timing problem and some carefully inserted delays may help.

Re: Crashes with javafx extension in Linux

PostPosted: Sun Jan 11, 2015 1:16 pm
by arch
No it's same when i run it in debug mode, the problem is that there is no exception thrown whatsoever, no errors in openoffice logs, but it freezes. Cant understand what causes the crush, os java or oo.

Re: Crashes with javafx extension in Linux

PostPosted: Tue Jan 13, 2015 12:09 pm
by bankadmin
Thank you for your reply RoryOF,

Link to extension will be provided soon , but it is really does not meter . Even "Hello World" on JavaFX crashes same way.

Re: Crashes with javafx extension in Linux

PostPosted: Tue Jan 20, 2015 9:44 am
by bankadmin
Problem was resolved.
Java FX works perfectly for AOO Extensions on Linux

Re: Crashes with javafx extension in Linux

PostPosted: Tue Jan 20, 2015 9:48 am
by RoryOF
Will you please expand on what caused the problem?

Re: Crashes with javafx extension in Linux

PostPosted: Tue Jan 20, 2015 10:38 am
by arch
RoryOF wrote:Will you please expand on what caused the problem?


Managed to catch exception, it had problem with loading resources and class initialization. I think there is some problem which bugs classloader when javafx launched from oo. So, manualy setting classloader in init methods solved the problem.

ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (cl == null) {
cl = ClassLoader.getSystemClassLoader();
Thread.currentThread().setContextClassLoader(cl);
}

Re: Crashes with javafx extension in Linux

PostPosted: Tue Jan 20, 2015 11:11 am
by RoryOF
I don't know enough about Java to comment sensibly, except to say that when a program/macro works in manual mode and not in installed mode, there can often be some form of timing problem. A delay loop inserted might cure the problem - there was a recent case of this reported on the Forum when a macro was being used.