*** glibc detected *** /usr/lib/jvm/sun-jdk-1.6/bin/java: double free or corruption (out): 0xad62b690 *** I would expect the font size to become 0, or perhaps to not change, or for an exception to be thrown somewhere in the swing graphics rendering system. Make the JFrame visible, and set the font size of the JList to Float.NaN over and over again. Add some data to the JList, add the JList to the JFrame.
Run it for 5-10 seconds:Ĭreate a JFrame and a JList.
#Java runtime jdk 6 code
The following code will reliably reproduce the bug. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : When the size of the parent container dropped to zero, the above code would be executed, and eventually java would segfault. Obviously this is not code that you would ever see, but I was making a related call as part of a componentResized function, to dynamically adjust the font size based on the size of the container in which the JList sits. It usually takes several calls to make it happen. The segfault does not usually occur on the first call to the function. Where myJList is a currently visible JList. tFont(myJList.getFont().deriveFont(Float.NaN)) I am able to cause a segfault with the following code: Linux myhostname 2.6.18-suspend2 #1 SMP Wed Oct 18 12:55: i686 Genuine Intel(R) CPU T2400 1.83GHz GenuineIntel GNU/Linux Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode) Java(TM) SE Runtime Environment (build 1.6.0-b105)