Linux + Java 7 + Dual screen issue

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Linux + Java 7 + Dual screen issue

lrenard
Hi all,

I have performed some test on a bug we discovered more than a year ago.
See this link : https://forums.oracle.com/thread/2438029

I have tested again today on jogl-demos (JRefract v2.1.2 for example) and when I move the main frame from one screen to another, the application stops working.

During my test on jogl 1.1.1a I have seen that modifying the canvas peer to use a proxy pattern with the following modification on updateGraphicsData method solved the issue (the variable peer is the original peer of the canvas).
public boolean updateGraphicsData(GraphicsConfiguration gc) {
               
                X11GraphicsConfig oldGC = (X11GraphicsConfig)getGraphicsConfiguration();
                X11GraphicsConfig newGC = (X11GraphicsConfig) gc;
// boolean update = peer.updateGraphicsData(gc);
                boolean update = peer.updateGraphicsData(X11GraphicsConfig.getConfig((X11GraphicsDevice) gc.getDevice(),oldGC.getVisual() , ((X11GraphicsConfig) gc).getDepth(), ((X11GraphicsConfig) gc).getColormap(),((X11GraphicsConfig) gc).isDoubleBuffered()));
                return update;
}

However, I am not expert enough to know what consequences this modifications could have elsewhere in the code.
We need to be able to provide our client a working version even if the bug is not officially fixed. (The main issue is in the JVM itself but the resolution won't be available soon we think)

Is there someone who has faced the same issue and is there any "nice" solution.

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Linux + Java 7 + Dual screen issue

gouessej
Administrator
Hi

Thank you for the investigation. Please use Github and provide a patch. We could at least detect Java 1.7 and use a different code path until it is fixed in the JVM.

I don't use AWT anymore, this is a nice solution but it will be better when I succeed in rendering Swing components without AWT with NEWT and GLG2D.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Linux + Java 7 + Dual screen issue

lrenard
Thank you for you reply.

The issue is that I am not sure the "patch" won't mess with anything else. That's why I have posted the question here but you are right, detecting Linux and Java 7 could be a nice enough solution to avoid any modifications on other platforms.

One rectification, it is not the JRefract demo that does not work but the CustomText one.
Reply | Threaded
Open this post in threaded view
|

Re: Linux + Java 7 + Dual screen issue

gouessej
Administrator
Hi

You can provide the patch without any other test and someone else (Sven or me) will add them.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Linux + Java 7 + Dual screen issue

kendzi
I'm try to run my application kendzi3d [1] on linux with dual screen configuration, but without success. It seems that JOGL create context only for one of the screens. So during application start, JFrame with Jogl canvas appear on first screen. But new windows is completely blank. No error is throw. When I move window to second screen correct content of window will appear. Jogl application is working correctly only on one of the screens. This bug appear only when I try to run application using java 7. On java 6 application is working on both screens correctly.

I'm working on Ubuntu 64 13.10, graphic card is integrated intel with jogl 2.1.3.

Work wrong on Java7 JDK 64 1.7.0_45-b18.
Work correct on Java6 JDK 64 1.6.0_45-b06.

[1] - https://github.com/kendzi/kendzi3d
Reply | Threaded
Open this post in threaded view
|

Re: Linux + Java 7 + Dual screen issue

gouessej
Administrator
Thank you for the feedback. I'll probably write a bug report tomorrow and I'll see exactly where we have something to change, I'll suggest some complementary checks. I have only one screen, I'll probably ask you to try another build when the fix is ready.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Linux + Java 7 + Dual screen issue

kendzi
I have check jogl 2.1.4 and there is still problem with double screen in linux. Did you made any fix for that? How to use workaround provided by lrenard? It seems that peers are internal and is not possible to overwrite them after frame is created.
Reply | Threaded
Open this post in threaded view
|

Re: Linux + Java 7 + Dual screen issue

Sven Gothel
Administrator
On 03/05/2014 06:58 PM, kendzi [via jogamp] wrote:
> I have check jogl 2.1.4 and there is still problem with double screen in
> linux. Did you made any fix for that? How to use workaround provided by
> lrenard? It seems that peers are internal and is not possible to overwrite
> them after frame is created.

We currently don't have:
  - a bug report
  - a patch (git, diff)
  - test-case/unit-test

If you are willing to provide all these, great
- then we can validate the issue (confirm the bug)
and test whether the patch works.

If you create the bug entry, pls copy/paste all valuable information into it.

A patch should at least be in form of a 'unified diff',
git diffs or pull requests preferred.

The patch shall also contain a test to validate the issue,
at least the bug description should contain a clear recipe.

Thank you!

~Sven




signature.asc (894 bytes) Download Attachment