[OpenJDK 2D-Dev] JVM Crash: printing character \u0DDD in Swing app

Patrick Wright pdoubleya at gmail.com
Thu Nov 27 20:14:48 UTC 2008


Hi Igor

Thanks for the reply. It will take a bit of time to track it down.
>From a quick test:

1) rendering just the single glyph to a buffered image, one image per
font, succeeds with Sun Java but fails with OpenJDK (will provide the
full details once I'm done testing)

2) testing using the Swing button + label fails with both Sun Java and
OpenJDK using the default font (e.g. Swing app with no font
specified).

I'm not sure how I can make Sun Java 6 fail in the buffered image
case. For the buffered image case with OpenJDK, I'll work on pulling
out a list of fonts that are failing. Hope this isn't any specific
combination of font style and size...

Will report back once I have the details.


Regards
Patrick

On Thu, Nov 27, 2008 at 6:59 PM, Igor Nekrestyanov
<Igor.Nekrestyanov at sun.com> wrote:
> Hi,
>
> thank you for your report!
>
> to simplify testcase please do the following:
>  1) render to the offscreen bufferedimage, so no swing will be involved
>  2) iterate through list of font files, we need to find which font exactly
> causes the problem
>
> In other words ideal testcase simply draws single character of particular
> font into the offscreen buffered image.
> It might be not possible to get it as simple as this but it would be nice if
> you can try.
>
> It is a bit weird it did not crash with 6u7 but this may happen if different
> physical fonts were used.
>
> -igor
>
> Patrick Wright wrote:
>>
>> Hi
>>
>> First--if necessary, am glad to file a bug for this, but wanted to
>> check and see if there was something I'm missing.
>>
>> In trying to render a table of characters using their Unicode
>> identifiers, I found that the character \u0DDD crashes my JVM as soon
>> as it is rendered to a Swing component. I'm not particularly
>> interested in that character--I am just trying to print out different
>> characters in different fonts to easily track which glyphs are
>> available per font. I found this by accident. I'm writing to this list
>> as I suspect (but don't know) that it may be an issue with the font
>> system.
>>
>> java -version
>> java version "1.6.0_10"
>> Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
>> Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)
>>
>> Ubuntu 8.10
>> uname -r
>> 2.6.27-7-generic
>>
>> Small app that shows the problem:
>> import javax.swing.*;
>> import javax.swing.border.LineBorder;
>> import java.awt.*;
>> import java.awt.event.ActionEvent;
>>
>> public class TestChar {
>>    public static void main(String[] args) {
>>        SwingUtilities.invokeLater(new Runnable() {
>>            public void run() {
>>                new TestChar().run();
>>            }
>>        });
>>    }
>>
>>    private void run() {
>>        JFrame frame = new JFrame("Test Character");
>>        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>>        JPanel panel = new JPanel();
>>        final JLabel label = new JLabel("(empty)");
>>        label.setSize(400, 100);
>>        label.setBorder(new LineBorder(Color.black));
>>        JButton button = new JButton("Set Char x0DDD");
>>        button.addActionListener(new AbstractAction() {
>>            public void actionPerformed(ActionEvent actionEvent) {
>>                label.setText(Character.toString('\u0DDD'));
>>            }
>>        });
>>        panel.add(button);
>>        panel.add(label);
>>
>>        frame.getContentPane().add(panel);
>>        frame.pack();
>>        frame.setVisible(true);
>>    }
>> }
>>
>> Run this, then click the button. On my Ubuntu system, clicking the
>> button causes an immediate crash of the VM. Have also tested on OS X
>> java -version
>> java version "1.6.0_07"
>> Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)
>> Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)
>>
>> and the VM _did not crash_.
>>
>> Output in the Ubuntu console following the crash is attached.
>>
>> If I should just file a bug for this, please let me know.
>>
>> Thanks!
>> Patrick
>>
>
>



More information about the 2d-dev mailing list