Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » FXSceneHolder doesn't open Main scene. Not on FX application thread; currentThread = main(SWT-GTK3 error)
FXSceneHolder doesn't open Main scene. Not on FX application thread; currentThread = main [message #1574882] Tue, 20 January 2015 13:47 Go to next message
Alex Franz is currently offline Alex FranzFriend
Messages: 5
Registered: January 2015
Junior Member
Q: I installed last version of RPC (Luna Release (4.4.0) Build id: 20140612-0600), configured my project (see details in attachments), and it doesn't work. Something tells me, that it is a software problem on my workstation. But i checking my configuration again and again and i really have no idea what is it. All errors are in attachment file ("stack trace.551").

Info:

JavaFX was installed by maven.
(mvn com.zenjava:javafx-maven-plugin:2.0:fix-classpath)

[Sys params]
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

index.php/fa/20501/0/
index.php/fa/20502/0/
index.php/fa/20503/0/

[reglament.editor.eclipse.core.views.ReglamentViewPart]:

...
public void openReglament(String reglamentName, String projectPath){
FXSceneHolder.getInstance().getReglamentEditor().openReglament(reglamentName, projectPath);
}
...

[reglament.editor.eclipse.core.views.FXSceneHolder]:

...
import ru.td.x.reglament.editor.jfx.gui.Main;
...
private FXSceneHolder(){
Platform.setImplicitExit(false);
reglamentEditor = new Main();
try {
scene = reglamentEditor.createScene();
} catch (Exception e) {
logger.error("FX Scene creation error: ", e);
}
}

public Main getReglamentEditor(){
return this.reglamentEditor;
}
...
public static FXSceneHolder getInstance(){
return InstanceHolder.INSTANCE;
}
...

[Updated on: Wed, 21 January 2015 11:54]

Report message to a moderator

Re: FXSceneHolder doesn't open Main scene. Not on FX application thread; currentThread = main [message #1575038 is a reply to message #1574882] Tue, 20 January 2015 15:42 Go to previous messageGo to next message
Thomas Elskens is currently offline Thomas ElskensFriend
Messages: 159
Registered: September 2014
Location: Brussels - Belgium
Senior Member
Is there any special reason you want to use Java 1.7 and, hence, JavaFX 2.2 ?

If I'm not mistaken, Efxclipse targets only Java 1.8 (and JavaFX Cool.
Re: FXSceneHolder doesn't open Main scene. Not on FX application thread; currentThread = main [message #1575039 is a reply to message #1575038] Tue, 20 January 2015 15:43 Go to previous messageGo to next message
Thomas Elskens is currently offline Thomas ElskensFriend
Messages: 159
Registered: September 2014
Location: Brussels - Belgium
Senior Member
and JavaFX 8 ).
Re: FXSceneHolder doesn't open Main scene. Not on FX application thread; currentThread = main [message #1575188 is a reply to message #1575039] Tue, 20 January 2015 17:34 Go to previous messageGo to next message
Alex Franz is currently offline Alex FranzFriend
Messages: 5
Registered: January 2015
Junior Member
Cause it is quite an old project and earlier it worked with this preferences.

And i'm sure it doesn't matter what java version it is. Because it gave quite a same result with java.version=1.8.0_25 for me (some problems were gone, however main problem still here). See "stack trace.557".

And i really don't want to change JFX version yet, because suddenly this would lead to big problems.
Re: FXSceneHolder doesn't open Main scene. Not on FX application thread; currentThread = main [message #1575255 is a reply to message #1575188] Tue, 20 January 2015 18:21 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Did you do a package import for javafx.scene.embed.swt?
Re: FXSceneHolder doesn't open Main scene. Not on FX application thread; currentThread = main [message #1575262 is a reply to message #1575038] Tue, 20 January 2015 18:26 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
The hook bundle still aupports java7 - only the higherlevel runtime stuff is java8 which IMHO was a good decision which payed of in the 1.2 release already where we've be able to evolve interfaces with break the API contract wohoo java8 rocks
Re: FXSceneHolder doesn't open Main scene. Not on FX application thread; currentThread = main [message #1576405 is a reply to message #1575255] Wed, 21 January 2015 09:43 Go to previous messageGo to next message
Dmitry Bychkov is currently offline Dmitry BychkovFriend
Messages: 1
Registered: January 2015
Junior Member
Hi Thomas, thank you for you reply. I working with Alex on the same project.

Thomas Schindl wrote on Tue, 20 January 2015 18:21
Did you do a package import for javafx.scene.embed.swt?

No, we didn't. We used extension of org.eclipse.fx.ui.workbench3.FXViewPart
Re: FXSceneHolder doesn't open Main scene. Not on FX application thread; currentThread = main [message #1576406 is a reply to message #1575255] Wed, 21 January 2015 09:43 Go to previous messageGo to next message
Alex Franz is currently offline Alex FranzFriend
Messages: 5
Registered: January 2015
Junior Member
[reglament.editor.eclipse.core.views.ReglamentViewPart]

>>
import org.eclipse.fx.ui.workbench3.FXViewPart;
...
public class ReglamentViewPart extends FXViewPart {
...
public void openReglament(String reglamentName, String projectPath){
FXSceneHolder.getInstance().getReglamentEditor().openReglament(reglamentName, projectPath);
}
...
<<

If you mean "javafx.embed.swt", FXViewPart (org.eclipse.fx.ui.workbench3.FXViewPart) already imported it.
Re: FXSceneHolder doesn't open Main scene. Not on FX application thread; currentThread = main [message #1576445 is a reply to message #1576406] Wed, 21 January 2015 10:11 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

Could you try starting with -Defxclipse.osgi.hook.debug=true. This
should give you some debug information on the OSGi-Hook.

One thing that could be on Linux is that you are launching with SWT-Gtk3
which is not supported by JavaFX and so we refuse to load the
swt-embedding code but this should have led to another exception which I
can't find in your stacktrace

Anyways turn on this option and provide us the output which start with

FXModuleClassloader...... or FXClassLoader......

The rest of the output is not important.

Tom

On 21.01.15 10:43, Alex Franz wrote:
> [reglament.editor.eclipse.core.views.ReglamentViewPart]
>
>>>
> import org.eclipse.fx.ui.workbench3.FXViewPart;
> ..
> public class ReglamentViewPart extends FXViewPart {
> ..
> public void openReglament(String reglamentName, String projectPath){
> FXSceneHolder.getInstance().getReglamentEditor().openReglament(reglamentName,
> projectPath);
> }
> ..
> <<
> If you mean "javafx.embed.swt", FXViewPart
> (org.eclipse.fx.ui.workbench3.FXViewPart) already imported it.
Re: FXSceneHolder doesn't open Main scene. Not on FX application thread; currentThread = main [message #1576542 is a reply to message #1576445] Wed, 21 January 2015 11:22 Go to previous messageGo to next message
Alex Franz is currently offline Alex FranzFriend
Messages: 5
Registered: January 2015
Junior Member
Hi,

Here is stack trace with enabled debug option.

And this is my gtk versions:
ii libgtk-3-0 3.4.2-0ubuntu0.8 GTK+ graphical user interface library
ii libgtk2.0-0 2.24.17-0ubuntu2 GTK+ graphical user interface library

[Updated on: Wed, 21 January 2015 11:34]

Report message to a moderator

Re: FXSceneHolder doesn't open Main scene. Not on FX application thread; currentThread = main [message #1576550 is a reply to message #1576542] Wed, 21 January 2015 11:29 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Ok yeah my guess was right - see

> FXClassLoader#createJREBundledClassloader - Started
> FXClassLoader#createJREBundledClassloader - Assumed location (Java 8/Java 7): /opt/jdk1.8.0_25/jre/lib/ext/jfxrt.jar
> FXClassLoader#createJREBundledClassloader - SWT is available use different loading strategy
> FXClassLoader#createJREBundledClassloader - Searching for SWT-FX integration at /opt/jdk1.8.0_25/jre/lib/jfxswt.jar
> FXClassLoader#createJREBundledClassloader - Found SWT/FX
> FXClassLoader#createJREBundledClassloader - Delegate to system classloader
> FXClassLoader.SWTFXClassloader#init - Primary Loader sun.misc.Launcher$ExtClassLoader@3ac8cf9b
> FXClassLoader.SWTFXClassloader#init - Lastresort Loader org.eclipse.osgi.internal.loader.EquinoxClassLoader@761956ac[org.eclipse.swt:3.103.1.v20140903-1938(id=1939)]
> FXClassLoader#createJREBundledClassloader - Ended
> FXModuleClassloader#findLocalClass trying to load class 'javafx.embed.swt.FXCanvas'
> FXModuleClassloader#findLocalClass - Someone is trying to load FXCanvas. Need to check for GTK3
> FXModuleClassloader#findLocalClass trying to load class 'org.eclipse.swt.SWT'
> FXClassLoader.SWTFXClassloader#findClass - Loading org.eclipse.swt.SWT with primary
> FXClassLoader.SWTFXClassloader#findClass - ClassNotFoundException thrown
> FXClassLoader.SWTFXClassloader#findClass - Loading org.eclipse.swt.SWT with last resort
> FXClassLoader.SWTFXClassloader#findClass - Result org.eclipse.swt.SWT class org.eclipse.swt.SWT
> FXModuleClassloader#findLocalClass - We are on GTK need to take a closer look
> FXModuleClassloader#findLocalClass trying to load class 'org.eclipse.swt.internal.gtk.OS'
> FXClassLoader.SWTFXClassloader#findClass - Loading org.eclipse.swt.internal.gtk.OS with primary
> FXClassLoader.SWTFXClassloader#findClass - ClassNotFoundException thrown
> FXClassLoader.SWTFXClassloader#findClass - Loading org.eclipse.swt.internal.gtk.OS with last resort
> FXClassLoader.SWTFXClassloader#findClass - Result org.eclipse.swt.internal.gtk.OS class org.eclipse.swt.internal.gtk.OS
> FXModuleClassloader#findLocalClass - We are on GTK3 - too bad need to disable JavaFX for now else we'll crash the JVM

So you need to force SWT to use Gtk2! e.g. by setting SWT_GTK3=0 in the
launcher environment, not sure the --launcher.GTK_version works when
starting a inner instance.

Tom

On 21.01.15 12:22, Alex Franz wrote:
> Hi,
>
> Here is stack trace with enabled debug option.
>
Re: FXSceneHolder doesn't open Main scene. Not on FX application thread; currentThread = main [message #1576582 is a reply to message #1576550] Wed, 21 January 2015 11:53 Go to previous message
Alex Franz is currently offline Alex FranzFriend
Messages: 5
Registered: January 2015
Junior Member
Oh, Tom, great thanks for help.

After set param SWT_GTK3=0 in the launcher environment, everything work fine again.
index.php/fa/20522/0/
Previous Topic:noclassdeffound for javafx.scene.layout.BorderPane
Next Topic:Platform.getBundle("mybundle") return null in e(fx)clipse
Goto Forum:
  


Current Time: Wed Jan 15 02:42:34 GMT 2025

Powered by FUDForum. Page generated in 0.04589 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top