Build: NetBeans IDE Dev (Build nbms-and-javadoc-9445-on-20120921)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b02, Java(TM) SE Runtime Environment, 1.8.0-ea-b59
java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData
Created attachment 125629 [details]
Created attachment 125631 [details]
*** Bug 248774 has been marked as a duplicate of this bug. ***
*** Bug 257718 has been marked as a duplicate of this bug. ***
How can this be "wontfix"... the current NB builds are unusable on my machine.
I have to restart the IDE when my monitor wakes up.
Because the bug is not in NB but rather in java runtime itself...
I'm having this error every time I wake my PC.
I think this is likely the exception that happens when Netbeans looks blank until you hover around or resize the window?
How is this a bug in Java when Netbeans 8.0 doesn't have this on Ubuntu 14.04?
The bug is caused by error in JDK, not in NetBeans. It happens when displays are changed. Workaround is to start NetBeans with this parameter:
Will be fixed in upcoming JDK 8 Update 112/121.
Good description of the problem can be found here:
Created attachment 161968 [details]
editing maven enterprise project
Created attachment 162069 [details]
Building a Maven project.
Created attachment 162085 [details]
Maven task on project.
Created attachment 162139 [details]
Nothing. This machine has been ignored for the past week. I logged in and got this exception. It might have had to do with the X system which collapsed two screens into one and then went back to two.
Created attachment 162198 [details]
Might be caused by this: both monitors were turned off for a few days, then possibly, when they were turned on, the X system reconfigured causing this exception.
Created attachment 162292 [details]
Not sure what triggered it.
This bug already has 600 duplicates
Created attachment 163010 [details]
Random error, not sure about the steps.
This bug already has 650 duplicates
Martin Balin's workaround fixes this: include -J-Dsun.java2d.xrender=false in your $NETBEANS_HOME/etc/netbeans.conf as part of the netbeans_default_options and this exception won't occur.
Created attachment 163814 [details]
Installed a fresh copy of NetBeans (java version) to a newly created Ubuntu 16 Virtual machine.
The vm has open jdk-8-121 installed.
After launching NetBeans for the very first time, ... the exception occured.
The bug is caused by error in JDK, not in NetBeans. It happens when displays are changed. The JDK bug is fixed in JDK 8 Update 112/121.
jdk-8u121-linux-x64.rpm fixes it. Thanks.
Created attachment 164963 [details]
Stacktrace of the error
The same error on the Java build 1.8.0_141-b15
(In reply to wwarlock from comment #23)
> Created attachment 164963 [details]
> Stacktrace of the error
> The same error on the Java build 1.8.0_141-b15
I'm very sorry.
I was wrong, I saw this error on 8u121.
As per the stackoverflow answer linked earlier (https://stackoverflow.com/a/38038737/7531) this is a JDK bug. However, it is not resolved in JDK 8 Update 121.
The bug involved is this one: https://bugs.openjdk.java.net/browse/JDK-8147542
and that has been resolved in JDK 9 build 131.
There was a backport to 8, but that was for some reason withdrawn: https://bugs.openjdk.java.net/browse/JDK-8170986
I'm still getting this error on JDK 8 build 141-b15.