P2D, P3D on Linux causes IllegalStateException: size() cannot be used here #3483

Closed
hamoid opened this Issue Jul 19, 2015 · 12 comments

Comments

Projects
None yet
5 participants
@hamoid
Contributor

hamoid commented Jul 19, 2015

void setup() {
  size(600, 600, P2D);
}

On 3.0a10 and 3.0a11 I get this error:

Display 1 does not exist, using the default display instead.
java.lang.RuntimeException: com.jogamp.opengl.GLException: Caught IllegalStateException: size() cannot be used here, see https://processing.org/reference/size_.html on thread main-Display-.x11_:0-1-EDT-1
    at jogamp.newt.DefaultEDTUtil.invokeImpl(DefaultEDTUtil.java:249)
    at jogamp.newt.DefaultEDTUtil.invoke(DefaultEDTUtil.java:163)
    at jogamp.newt.DisplayImpl.runOnEDTIfAvail(DisplayImpl.java:427)
    at jogamp.newt.WindowImpl.runOnEDTIfAvail(WindowImpl.java:2133)
    at jogamp.newt.WindowImpl.setVisible(WindowImpl.java:1024)
    at jogamp.newt.WindowImpl.setVisible(WindowImpl.java:1029)
    at com.jogamp.newt.opengl.GLWindow.setVisible(GLWindow.java:499)
    at processing.opengl.PSurfaceJOGL.setVisible(PSurfaceJOGL.java:356)
    at processing.core.PApplet.showSurface(PApplet.java:10179)
    at processing.core.PApplet.runSketch(PApplet.java:10163)
    at processing.core.PApplet.main(PApplet.java:9899)

I'm running 64bit ArchLinux with recent Intel graphics. Maybe someone could try on Ubuntu?

On 2.2.1 and 3.0a5 it works fine.

@codeanticode codeanticode self-assigned this Jul 20, 2015

@codeanticode codeanticode added the opengl label Jul 20, 2015

@monkstone

This comment has been minimized.

Show comment
Hide comment
@monkstone

monkstone Jul 26, 2015

Interesting same code on my 64bit ArchLinux box NVIDIA graphics runs OK still get the 1st message

Display 1 does not exist, using the default display instead.

Interesting same code on my 64bit ArchLinux box NVIDIA graphics runs OK still get the 1st message

Display 1 does not exist, using the default display instead.
@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Jul 27, 2015

Member

The problem here is that the window manager is messing with the window size after we've opened the window, so size() thinks you're trying to call it again. We've had to solve this many different ways in the past, and the method changed a little in alpha 11, so someone needs to rewrite that code a bit.

Member

benfry commented Jul 27, 2015

The problem here is that the window manager is messing with the window size after we've opened the window, so size() thinks you're trying to call it again. We've had to solve this many different ways in the past, and the method changed a little in alpha 11, so someone needs to rewrite that code a bit.

@hamoid

This comment has been minimized.

Show comment
Hide comment
@hamoid

hamoid Jul 27, 2015

Contributor

For what it's worth, I'm using the i3 tiling window manager. I configured it so Processing sketches are "floating windows", so i3 does not force a size on them. I hope it still works on alpha 11 and newer :)

Contributor

hamoid commented Jul 27, 2015

For what it's worth, I'm using the i3 tiling window manager. I configured it so Processing sketches are "floating windows", so i3 does not force a size on them. I hope it still works on alpha 11 and newer :)

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Jul 31, 2015

Contributor

@hamoid Hi, can you please build the latest version and test if you are still getting an exception? Thanks.

Contributor

JakubValtar commented Jul 31, 2015

@hamoid Hi, can you please build the latest version and test if you are still getting an exception? Thanks.

@hamoid

This comment has been minimized.

Show comment
Hide comment
@hamoid

hamoid Aug 1, 2015

Contributor

Hi @JakubValtar, I just did a git pull and Eclipse complains "Project 'processing-app' is missing required library: '/processing-core/apple.jar'". I removed apple.jar from build path, and now I get 639 errors. What's the correct approach?

Contributor

hamoid commented Aug 1, 2015

Hi @JakubValtar, I just did a git pull and Eclipse complains "Project 'processing-app' is missing required library: '/processing-core/apple.jar'". I removed apple.jar from build path, and now I get 639 errors. What's the correct approach?

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Aug 1, 2015

Contributor

@hamoid try something like

git reset HEAD
git checkout -- .

and then in root directory

cd build
ant clean
ant run

and make sure to refresh project files in Eclipse.

Contributor

JakubValtar commented Aug 1, 2015

@hamoid try something like

git reset HEAD
git checkout -- .

and then in root directory

cd build
ant clean
ant run

and make sure to refresh project files in Eclipse.

@hamoid

This comment has been minimized.

Show comment
Hide comment
@hamoid

hamoid Aug 1, 2015

Contributor

Thanks a lot, and sorry for the newbie compiling questions. The good thing is this will let me contribute to Processing :)

After following your instructions, I get many errors inside src/processing/javafx (unresolved classes).

2015-08-01-162029_1395x380_scrot

Contributor

hamoid commented Aug 1, 2015

Thanks a lot, and sorry for the newbie compiling questions. The good thing is this will let me contribute to Processing :)

After following your instructions, I get many errors inside src/processing/javafx (unresolved classes).

2015-08-01-162029_1395x380_scrot

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 1, 2015

Member

That means the default JVM you're using in Eclipse doesn't have JavaFX. Go to Preferences > Java > Installed JREs and select a Java 8 virtual machine.

Or just don't use Eclipse, since it's not supported (for reasons like this, that it's too difficult to document how to make it work consistently for everyone). ant run from the command line should have started Processing with no trouble (and none of these errors).

Member

benfry commented Aug 1, 2015

That means the default JVM you're using in Eclipse doesn't have JavaFX. Go to Preferences > Java > Installed JREs and select a Java 8 virtual machine.

Or just don't use Eclipse, since it's not supported (for reasons like this, that it's too difficult to document how to make it work consistently for everyone). ant run from the command line should have started Processing with no trouble (and none of these errors).

@hamoid

This comment has been minimized.

Show comment
Hide comment
@hamoid

hamoid Aug 1, 2015

Contributor

Works! 👍

I had tried ant run, but it does nothing at the end. It says "Linux launch" or something like that, but nothing happens. The output starts with "Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-8-jre/lib/tools.jar", but ant goes on and does not throw any other errors. Just launching at the end seems to fail silently.

After adding JRE8 to the Eclipse preferences I see a sphere spinning in P3D :)

Contributor

hamoid commented Aug 1, 2015

Works! 👍

I had tried ant run, but it does nothing at the end. It says "Linux launch" or something like that, but nothing happens. The output starts with "Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-8-jre/lib/tools.jar", but ant goes on and does not throw any other errors. Just launching at the end seems to fail silently.

After adding JRE8 to the Eclipse preferences I see a sphere spinning in P3D :)

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Aug 1, 2015

Contributor

@hamoid Great to hear you made it work. Is the original issue resolved then?

Contributor

JakubValtar commented Aug 1, 2015

@hamoid Great to hear you made it work. Is the original issue resolved then?

@hamoid

This comment has been minimized.

Show comment
Hide comment
@hamoid

hamoid Aug 1, 2015

Contributor

@JakubValtar Yes, issue resolved. Can be closed.

Contributor

hamoid commented Aug 1, 2015

@JakubValtar Yes, issue resolved. Can be closed.

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Aug 1, 2015

Contributor

@hamoid Cool, thanks for your help!

Contributor

JakubValtar commented Aug 1, 2015

@hamoid Cool, thanks for your help!

@JakubValtar JakubValtar closed this Aug 1, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment