PDA

View Full Version : Problem with Java in Lion


hotcha3
09-06-2011, 03:45 PM
Hi,

I have a 27" iMac with Lion 10.7.1
I have (or used to have in Snow Leop.) 2 extra screens conncted to it. One driectly to the imac's card and the other one with a USB adapter using Displaylink.

I use a financial charts software called ProRealTime, which is based on java.

So here my problem:

I can install the displaylink drivers and use the 3rd screen perfectly, like in SL. BUT everytime i open ProRealtime (java based) it crashes. I thought at first it was an issue with Lion or the java version. But then i installed Lion on my home mac mini, and everything worked pefectly, and java wasn't crashing. So i tried to figure out what was wrong in the imac, and the only difference between the 2 computers is that the imac has Displaylink installed.
I uninstalled the displaylink drivers, and tried Prorealtime, and it worked perfectly. So the drivers from displaylink are what are causing the java app to crash.
I've been talking to tech support in ProRealtime, and they say they can't do anything, and it's all a problem with the Displaylink BETA drivers.

Can anyone please help me, and tell me if there's something i can do or configure in order to be working with my 3rd screen (which i only use for ProRealtime, along with the 2nd one). Right now, i've uninstalled the drivers, and have turned off my 3rd screen, waiting for Displaylink to release a final version of the drivers for Lion that will hopefully solve this huge problem.

Any suggestions are welcome.
I can even copy here the full error log Lion gives me when Java crashes (with displaylink installed, without displaylink installed java open perfectly).

Thanks in advance !

hotcha3
09-06-2011, 03:58 PM
By the way, someone from Displaylink could tell me if they're planning on releasing the final version for lion soon ?

npgall
09-06-2011, 10:11 PM
I'm using Java apps on 2x DisplayLink screens on Lion at the moment and I've not had any specific problems with Java apps. I'm a Java software developer so mostly I use IntelliJ IDEA, and of course software that I write myself. I'm on a 2011 MacBook Air 11".

The only thing I could think of is the Java app you are using might be using OpenGL for graphics acceleration? DisplayLink does not support OpenGL hardware acceleration AFAIK.

There is some documentation on enabling/disabling OpenGL acceleration in Java apps here: http://download.oracle.com/javase/6/docs/technotes/guides/2d/flags.html#all

...HOWEVER that documentation is for the Oracle version of Java, whereas Apple currently supply their own version of Java for Mac OS X. I'm not sure if there is a similar setting to enable/disable OpenGL for Apple's Java on OS X.

In fact if your app uses hardware acceleration, it might be up to the app to use or not use OpenGL, rather than a setting you could configure in the OS. Check your app for an option to disable use of OpenGL/hardware acceleration.

Does the app only crash when it's running on the DisplayLink screen? Paste the error from the Java app.

hotcha3
09-07-2011, 12:27 PM
Thanks for your help npgall,

Excuse for my ignorance, but i don't think it has to do with Open GL, because 3 days ago (when i had Snow Lopard) i was able to use ProRealTime perfectly with all 3 monitors on my imac, including the one using displaylink connector.

The app crashes directly when i open the java webstart file (.jnlp) only when the displaylink drivers are installed. I even changed the configuration of Prorealtime, to use only 1 monitor (the one directly connected to the imac, through dvi to mini display port adapter) but it still crashes just when opening.
So, yes, the app also crashes when it doesen't even use that 3rd monitor, it just detects the drivers or something. I'm really clueless.


If the Displaylink drivers are NOT installed, ProRealtime opens perfectly.

I'll ask ProReal if they use Open GL. But it's just a simple real-time financial charts app.

Thanks !

hotcha3
09-07-2011, 12:38 PM
Here's the full error log given when the java app crashes, when the displaylink drivers are installed:

http://pastebin.com/t9thG2qq

I put it there, because it was too long to copy here.

Thanks

npgall
09-07-2011, 10:27 PM
Hi hotcha3,

Your log indicates where the app crashed, and I was able to reproduce the problem on my machine with this code:

import java.awt.*;
public class Temp {
public static void main(String[] args) {
for (GraphicsDevice graphicsDevice : GraphicsEnvironment.getLocalGraphicsEnvironment(). getScreenDevices()) {
System.out.println(graphicsDevice.getAvailableAcce leratedMemory());
}
}
}

...the code above cycles through the available graphics devices and queries each one for the amount of accelerated memory (presumably video memory) available.

On my machine I have three graphics devices, the built-in Intel one, and two DisplayLink USB cards. The JVM crashes when I call this method on either of the DisplayLink devices. But it works for the built-in one.

So this is a reproducible test case that could help DisplayLink to fix the issue in their drivers.

In the mean time, it might also be possible for Prorealtime to avoid calling this method. I'm using several Java apps, IntelliJ IDEA mostly, and I haven't encountered this issue, so presumably my apps just aren't using that method.

It's a method that a real-time graphics app like Prorealtime might well like to use of course, to improve graphics performance. But maybe they could make an update for you/others in this situation, such that under some circumstances or if a "system property" is set, they can avoid calling that method.

It's likely this is a bug in DisplayLink drivers. There's also a chance that this problem could be caused by a bug in Apple's Java or an underlying system. A bug in DisplayLink drivers does sound more likely though.

Over to DisplayLink I guess...

hotcha3
09-08-2011, 01:17 PM
Hi Npgall,

Thanks again for your kind help.

I talked to ProReal, and they say they can't do anything else. they've let me try the previous version and even the newest Beta version, but none of them works when Displaylink is installed. It gives me the same error.

So now it's up to Displaylink...hope they'll release a final version soon !!

Do you think it can be caused by the java version of Lion ? Or maybe by Lion itself?

Any other suggestion ?

Thanks !!

tenuki
09-12-2011, 05:11 PM
I just have to say - npgall you have to be one of the most helpful individuals on the planet. I hope all that good karma comes crashing down on you soon!! :D

Hi hotcha3,

Your log indicates where the app crashed, and I was able to reproduce the problem on my machine with this code:

import java.awt.*;
public class Temp {
public static void main(String[] args) {
for (GraphicsDevice graphicsDevice : GraphicsEnvironment.getLocalGraphicsEnvironment(). getScreenDevices()) {
System.out.println(graphicsDevice.getAvailableAcce leratedMemory());
}
}
}

...the code above cycles through the available graphics devices and queries each one for the amount of accelerated memory (presumably video memory) available.

On my machine I have three graphics devices, the built-in Intel one, and two DisplayLink USB cards. The JVM crashes when I call this method on either of the DisplayLink devices. But it works for the built-in one.

So this is a reproducible test case that could help DisplayLink to fix the issue in their drivers.

In the mean time, it might also be possible for Prorealtime to avoid calling this method. I'm using several Java apps, IntelliJ IDEA mostly, and I haven't encountered this issue, so presumably my apps just aren't using that method.

It's a method that a real-time graphics app like Prorealtime might well like to use of course, to improve graphics performance. But maybe they could make an update for you/others in this situation, such that under some circumstances or if a "system property" is set, they can avoid calling that method.

It's likely this is a bug in DisplayLink drivers. There's also a chance that this problem could be caused by a bug in Apple's Java or an underlying system. A bug in DisplayLink drivers does sound more likely though.

Over to DisplayLink I guess...

hotcha3
09-28-2011, 10:51 AM
Hi,

I just installed the latest version of Displaylink drivrs, and still getting the same error. When displaylink is installed ProRealTime crashes at start.

hotcha3
10-13-2011, 02:21 PM
Problem solved !!

It was definitely Apple's fault. Yesterday i installed the 10.7.2 update and then the drivers again, and everything is working again like it used to do on Snow Leopard.

Thanks again for your help !

Tomk
02-15-2014, 11:40 PM
Hi,
I have a windows 8 and I had the same problem with prorealtime. My screen freezes and I am obliged to close prorealtime and to open it again in order to access prorealtime. Do you know how I can solve it ?

Thanks a lot