Skip to content

Fixed error that happened in multi-screen environments #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixed error that happened in multi-screen environments #29

wants to merge 1 commit into from

Conversation

etsinko
Copy link

@etsinko etsinko commented Aug 29, 2019

In our environment we have two screens and sometimes we would get this exception when doing canvas.queryProperties():

java.lang.IllegalArgumentException: adding a container to a container on a different GraphicsDevice
	at java.awt.Component.checkGD(Component.java:1185)
	at java.awt.Container.addImpl(Container.java:1093)
	at java.awt.Container.add(Container.java:973)
	at javax.media.j3d.JoglPipeline.createQueryContext(JoglPipeline.java:6558)
	at javax.media.j3d.Canvas3D.createQueryContext(Canvas3D.java:4619)
	at javax.media.j3d.Canvas3D.createQueryContext(Canvas3D.java:3616)
	at javax.media.j3d.Renderer.doWork(Renderer.java:461)
	at javax.media.j3d.J3dThread.run(J3dThread.java:271)

I traced it and found out that it happens because frame is created with one screen's configuration, while QueryCanvas is created with another screen's configuration. This pull request fixes this problem by creating Frame with same graphics configuration as QueryCanvas

@ghost
Copy link

ghost commented Aug 29, 2019

Please rather put your pull requests here:
https://github.com/philjord/java3d-core/pulls

Harvey no longer maintains Java3D:
#28 (comment)

Keep in mind that some repositories are only used as mirrors, contact the JogAmp community on our official forum:
https://forum.jogamp.org

@philjord Are you aware of this?

@etsinko
Copy link
Author

etsinko commented Aug 29, 2019

@gouessej Thanks for the update! I created a PR in that other repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant