[Bug swing/22567] JCheckBox's check box is missing
--- Additional Comments From timo dot lindfors at iki dot fi 2005-07-25 14:02 --- Actual results have changed between builds 2005-07-22T100134+ and 2005-07-23T221620+. Now the output is: java.lang.NullPointerException at gnu.java.awt.peer.gtk.GdkFontMetrics.init (GdkFontMetrics.java:69) at gnu.java.awt.peer.gtk.GtkToolkit.getFontMetrics (GtkToolkit.java:350) at javax.swing.plaf.basic.BasicGraphicsUtils.getPreferredButtonSize (BasicGraphicsUtils.java:612) at javax.swing.plaf.basic.BasicButtonUI.getPreferredSize (BasicButtonUI.java:212) at javax.swing.JComponent.getPreferredSize (JComponent.java:1029) at javax.swing.JRootPane$RootLayout.preferredLayoutSize (JRootPane.java:278) at java.awt.Container.preferredSize (Container.java:626) at java.awt.Container.getPreferredSize (Container.java:613) at javax.swing.JComponent.getPreferredSize (JComponent.java:1035) at java.awt.BorderLayout.calcCompSize (BorderLayout.java:655) at java.awt.BorderLayout.calcSize (BorderLayout.java:700) at java.awt.BorderLayout.preferredLayoutSize (BorderLayout.java:454) at java.awt.Container.preferredSize (Container.java:626) at java.awt.Container.getPreferredSize (Container.java:613) at javax.swing.JFrame.getPreferredSize (JFrame.java:136) at java.awt.Window.pack (Window.java:267) at testcase.init (testcase.java:12) at testcase.main (testcase.java:6) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22567
[Bug swing/22567] JCheckBox's check box is missing
--- Additional Comments From timo dot lindfors at iki dot fi 2005-07-25 14:45 --- The testcase works flawlessly now, thanks! -- What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22567
[Bug SWING/22610] New: swing: JScrollPane is not repainted correctly after window resize (more info)
Here's alternative testcase for classpath bug #13814. Should print true/true but prints true/false. Testcase: import javax.swing.*; import java.awt.*; public class testcase extends JFrame { public static void main(String[] args) { new testcase(); } public testcase() { JTextArea area = new JTextArea(text1); JScrollPane scrollpane = new JScrollPane(area); this.setContentPane(area); try { this.setSize(new Dimension(100,300)); this.show(); Thread.sleep(1000); System.out.println(area.isValid()); this.setSize(new Dimension(300,300)); Thread.sleep(1000); System.out.println(area.isValid()); System.exit(0); } catch (Exception e) { e.printStackTrace(); } } } -- Summary: swing: JScrollPane is not repainted correctly after window resize (more info) Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P2 Component: SWING AssignedTo: graydon at redhat dot com ReportedBy: timo dot lindfors at iki dot fi CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22610
[Bug SWING/22616] New: new ImageIcon().getIconHeight() throws NPE
Steps to reproduce: 1. Compile and run the attached testcase. Expected results: 1. Program prints out -1. Actual results: 1. Program throws the following exception: java.lang.NullPointerException at javax.swing.ImageIcon.getIconHeight (ImageIcon.java:300) at testcase.init (testcase.java:9) at testcase.main (testcase.java:5) Testcase: import javax.swing.*; import java.awt.*; public class testcase { public static void main(String[] args) { new testcase(); } public testcase() { ImageIcon icon = new ImageIcon(); System.out.println(icon.getIconHeight()); } } Note: Severity is set to minor since error handling in Icon is probably undefined behavior anyway since the javadoc does not say anything about what getIconHeight() should return when no icon is loaded. Sun's JDK 1.5.0 returns -1 and so applications have started to depend on this undefined behavior. Proposed fix: Return -1 in getIconHeight() and getIconWidth() if no icon is loaded. --- /home/lindi/cp-src/2005-07-22T100134+/classpath/javax/swing/ImageIcon.java.~1.16.~ 2005-07-02 23:32:47.0 +0300 +++ /home/lindi/cp-src/2005-07-22T100134+/classpath/javax/swing/ImageIcon.java 2005-07-22 21:38:05.0 +0300 @@ -297,11 +297,15 @@ public int getIconHeight() { +if (image == null) + return -1; return image.getHeight(observer); } public int getIconWidth() { +if (image == null) + return -1; return image.getWidth(observer); } -- Summary: new ImageIcon().getIconHeight() throws NPE Product: gcc Version: unknown Status: UNCONFIRMED Severity: minor Priority: P2 Component: SWING AssignedTo: graydon at redhat dot com ReportedBy: timo dot lindfors at iki dot fi CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22616
[Bug SWING/22616] new ImageIcon().getIconHeight() throws NPE
--- Additional Comments From timo dot lindfors at iki dot fi 2005-07-22 19:12 --- Created an attachment (id=9331) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9331action=view) Return -1 in getIconHeight() and getIconWidth() if no icon is loaded. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22616
[Bug SWING/22617] New: reopen 13414: ImageIcon() throws IllegalArgumentException
When classpath bugs have been moved to gcc bugzilla this bug can be marked as duplicate of the old classpath bug 13414. The actual issue is that classpath bug 13414 should be reopened as the bug happens with current classpath cvs head. Only way to see the old bug report at the moment seems to be http://www.mail-archive.com/commit-classpath@gnu.org/msg00849.html This bug seems to occur already in 2005-05-02 and I can't easily test older versions since I don't have the required cairo/gnome2 setup available anymore. -- Summary: reopen 13414: ImageIcon() throws IllegalArgumentException Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P2 Component: SWING AssignedTo: graydon at redhat dot com ReportedBy: timo dot lindfors at iki dot fi CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22617
[Bug SWING/22617] reopen 13414: ImageIcon() throws IllegalArgumentException
--- Additional Comments From timo dot lindfors at iki dot fi 2005-07-22 20:24 --- Aha, this bug does not happen if -Dgnu.java.awt.peer.gtk.Graphics=Graphics2D is specified. Quick'n'dirty fix could something like Return GtkErrorImage() when image loading fails also when Graphics2D is not used. --- /home/lindi/cp-src/2005-07-22T100134+/classpath/gnu/java/awt/peer/gtk/GtkToolkit.java.~1.71.~ 2005-07-05 01:31:41.0 +0300 +++ /home/lindi/cp-src/2005-07-22T100134+/classpath/gnu/java/awt/peer/gtk/GtkToolkit.java 2005-07-22 23:21:24.0 +0300 @@ -247,7 +247,11 @@ if (useGraphics2D()) return bufferedImageOrError(GdkPixbufDecoder.createBufferedImage (filename)); else - return new GtkImage (filename); + try { +return new GtkImage (filename); + } catch (IllegalArgumentException e) { +return new GtkErrorImage(); + } } public Image createImage (URL url) -- What|Removed |Added Summary|reopen 13414: ImageIcon() |reopen 13414: ImageIcon() |throws |throws |IllegalArgumentException|IllegalArgumentException http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22617
[Bug SWING/22617] reopen 13414: ImageIcon() throws IllegalArgumentException
--- Additional Comments From timo dot lindfors at iki dot fi 2005-07-22 20:25 --- Created an attachment (id=9332) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9332action=view) Return GtkErrorImage() when image loading fails also when Graphics2D is not used. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22617
[Bug SWING/22567] New: JCheckBox's check box is missing
Steps to reproduce: 1. Compile and run the attached testcase. Expected results: 1. A window with a check box and text1 shows up. Actual results: 1. A window with text1 shows up. No check box is visible. Testcase: import java.awt.*; import javax.swing.*; public class testcase extends JFrame { public static void main(String[] args) { new testcase().show(); } public testcase() { JCheckBox checkbox = new JCheckBox(text1 , true); setContentPane(checkbox); setSize(new Dimension(300, 300)); } } The check box is visible with gnu classpath cvs 2005-07-15T11:38:00+ but missing with gnu classpath cvs 2005-07-15T11:45:00+. Diff between these versions shows the following changelog entry: +2005-07-15 Roman Kennke [EMAIL PROTECTED] + + * javax/swing/AbstractButton.java + (AbstractButton): Directly call init() and updateUI(). + (AbstractButton(String, Icon)): Removed. This is not necessary + since we have init(String, Icon) for that purpose. + (getActionCommand): Reverted to previous behaviour: If + actionCommand is set, return this, otherwise return text, even + if text is null. + * javax/swing/JButton.java + (JButton(String, Icon)): Call super() and init(String, Icon) + instead of super(String, Icon). + * javax/swing/JMenuItem.java + (JMenuItem): Call super() instead of super(String, Icon). + (JMenuItem(Icon)): Call this(String, Icon) instead of + super(String, Icon). + (JMenuItem(String)): Call this(String, Icon) instead of + super(String, Icon). + (JMenuItem(Action)): Call super() instead of + super(String, Icon). + (JMenuItem(String, Icon)): Call super() and init(String, Icon) + instead of super(String, Icon). + (JMenuItem(String, int)): Call this(String, Icon) instead of + super(String, Icon). + * javax/swing/JToggleButton.java + (ToggleButtonModel.setPressed): Fire an ActionEvent if button + is released. According to my Mauve tests, it seems that this + is what the JDK does, so do we. + (ToggleButtonModel.setSelected): Removed. + (JToggleButton): Call super() and init(String, Icon) instead + of super(String, Icon). + -- Summary: JCheckBox's check box is missing Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: SWING AssignedTo: graydon at redhat dot com ReportedBy: timo dot lindfors at iki dot fi CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22567
[Bug java/21818] New: Methods can't be overridden to be more private.
Steps to reproduce: 1. Compile they attached testcase with gcj -C DoubleClickJList.java Expected results: 1. DoubleClickJList.class is created and no errors are shown. Actual results: $ /home/lindi/installdir-2005-05-22/gcc/bin/gcj -C DoubleClickJList.java DoubleClickJList.java:3: error: Methods can't be overridden to be more private. Method 'DoubleClickJList.init()' is not private in class 'javax.swing.JList'. private void init() { ^ 1 error Testcase: import javax.swing.*; public class DoubleClickJList extends JList { private void init() { } } I am not sure if this is a bug or a feature (I have not read any official specs) but jikes 1.22 and SUN's JVM 1.5.0 seem to compile the testcase just fine. This means that some free software projects seem to depend on this behavior. Version info: gcj (GCC) 4.1.0 20050522 (experimental) Fedora Core with linux 2.6.11-1.14_FC3 -- Summary: Methods can't be overridden to be more private. Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: timo dot lindfors at iki dot fi CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21818
[Bug java/20088] New: -findirect-dispatch: error: final field 'text' may not have been initialized
Compiling public class FinalTest2 { public static final String text = foo; public static void main(String[] args) { System.out.println(text); } } fails if I use -findirect-dispatch: $ gcj -findirect-dispatch FinalTest2.java --main=FinalTest2 -o FinalTest2 FinalTest2.java: In class 'FinalTest2': FinalTest2.java: In method 'clinit()': FinalTest2.java:2: error: final field 'text' may not have been initialized FinalTest2.java: At top level: FinalTest2.java:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See URL:http://gcc.gnu.org/bugs.html for instructions. -- Summary: -findirect-dispatch: error: final field 'text' may not have been initialized Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: timo dot lindfors at iki dot fi CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20088
[Bug java/19473] rhug build problem, regression?
--- Additional Comments From timo dot lindfors at iki dot fi 2005-01-26 12:16 --- Works fine with 2005-01-25 here too. Seems somebody already fixed this. -- What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19473
[Bug java/19473] rhug build problem, regression?
--- Additional Comments From timo dot lindfors at iki dot fi 2005-01-25 22:02 --- Sure. Seems it also fails with 2005-01-21 gcjrhug. I'll try with 2005-01-25 next and report the results here. The platform is just a normal x86 (intel pentium 4) running fedora with kernel 2.6.10-1.741_FC3. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19473
[Bug java/19473] New: rhug build problem, regression?
I tried to build rhug from cvs 2005-01-16 with gcc from cvs 2005-01-16 but apparently gcj enters some sort of an endless loop that eats all memory: gcj --encoding=UTF-8 -fassume-compiled --classpath=/home/lindi/src-2005-01-16/rhug/gnu.crypto/jce/javax-crypto.jar:.:. -g -O2 -c gnu/crypto/cipher/Rijndael.java -MT gnu/crypto/cipher/Rijndael.lo -MD -MP -MF gnu/crypto/cipher/.deps/Rijndael.TPlo -fPIC -o gnu/crypto/cipher/Rijndael.o gcj: Internal error: Killed (program jc1) The box has 1G of ram and 1G of swap. Also, the problematic file builds fine with gcc from 2005-01-14: $ LD_LIBRARY_PATH=/home/lindi/installdir-2005-01-14/gcc/lib PATH=/home/lindi/installdir-2005-01-14/gcc/bin:$PATH gcj --encoding=UTF-8 -fassume-compiled --classpath=/home/lindi/src-2005-01-16/rhug/gnu.crypto/jce/javax-crypto.jar:.:. -g -O2 -c gnu/crypto/cipher/Rijndael.java -MT gnu/crypto/cipher/Rijndael.lo -MD -MP -MF gnu/crypto/cipher/.deps/Rijndael.TPlo -fPIC -o gnu/crypto/cipher/Rijndael.o $ ls -l gnu/crypto/cipher/Rijndael.o -rw-rw-r-- 1 lindi lindi 401176 Jan 16 23:40 gnu/crypto/cipher/Rijndael.o -- Summary: rhug build problem, regression? Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: timo dot lindfors at iki dot fi CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19473
[Bug java/18811] New: rhug build problem, regression?
I just noticed that building rhug from cvs fails with the current gcc from cvs. I'm reporting this here because gcc 3.4.2 seems to build the problematic file so this might be regression. $ CVS_RSH=ssh cvs -d:pserver:[EMAIL PROTECTED]:/cvs/rhug -z9 co rhug $ cd rhug $ export LD_LIBRARY_PATH=$INSTALLDIR/gcc/lib $ PATH=$INSTALLDIR/gcc/bin:$PATH ./configure --prefix=$INSTALLDIR/rhug $ PATH=$INSTALLDIR/gcc/bin:$PATH make ... gcj --encoding=ISO-8859-1 -Wno-deprecated --classpath=upstream/src:upstream:./upstream/src:./upstream -fassume-compiled -g -O2 -c upstream/junit/tests/runner/AllTests.java -MT upstream/junit/tests/runner/AllTests.lo -MD -MP -MF .deps/upstream/junit/tests/runner/AllTests.TPlo -fPIC -o upstream/junit/tests/runner/.libs/AllTests.o upstream/junit/tests/runner/AllTests.java:19: error: cannot find file for class junit.runner.Sorter$Swapper make[1]: *** [upstream/junit/tests/runner/AllTests.lo] Error 1 make[1]: Leaving directory `/home/lindi/src-2004-11-27/rhug/junit' make: *** [all-recursive] Error 1 Next I managed to reproduce the issue with [EMAIL PROTECTED] rhug]$ cd junit/ [EMAIL PROTECTED] junit]$ PATH=$INSTALLDIR/gcc/bin:$PATH gcj --encoding=ISO-8859-1 -Wno-deprecated --classpath=upstream/src:upstream:./upstream/src:./upstream -fassume-compiled -g -O2 -c upstream/junit/tests/runner/AllTests.java -MT upstream/junit/tests/runner/AllTests.lo -MD -MP -MF .deps/upstream/junit/tests/runner/AllTests.TPlo -fPIC -o upstream/junit/tests/runner/.libs/AllTests.o [EMAIL PROTECTED] junit]$ PATH=$INSTALLDIR/gcc/bin:$PATH gcj --version gcj (GCC) 4.0.0 20041127 (experimental) ... and noticed that the an older gcc handles the situation without errors [EMAIL PROTECTED] junit]$ gcj --encoding=ISO-8859-1 -Wno-deprecated --classpath=upstream/src:upstream:./upstream/src:./upstream -fassume-compiled -g -O2 -c upstream/junit/tests/runner/AllTests.java -MT upstream/junit/tests/runner/AllTests.lo -MD -MP -MF .deps/upstream/junit/tests/runner/AllTests.TPlo -fPIC -o upstream/junit/tests/runner/.libs/AllTests.o [EMAIL PROTECTED] junit]$ gcj --version gcj (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) ... Is this regression in gcc, a bug in rhug or something else? -- Summary: rhug build problem, regression? Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: timo dot lindfors at iki dot fi CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18811
[Bug libgcj/18014] New: java.util.Locale changes variant to upper case
import java.util.Locale; public class LocaleTest { public static void main(String[] s) { java.util.ResourceBundle.getBundle(testbundle, new Locale(fi, FI, regular)); } } tries to access the file testbundle_fi_FI_REGULAR.properties with gcj and SUN's JDK 1.1.8. SUN's JDK 1.4.1_02 behaves differently and tries to to access the file testbundle_fi_FI_regular.properties instead. Should gcj do the same? -- Summary: java.util.Locale changes variant to upper case Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: minor Priority: P2 Component: libgcj AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: timo dot lindfors at iki dot fi CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18014
[Bug libgcj/18014] java.util.Locale changes variant to upper case
--- Additional Comments From timo dot lindfors at iki dot fi 2004-10-15 16:04 --- Created an attachment (id=7357) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7357action=view) Remove variant.toUpperCase from java.lang.Locale -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18014
[Bug java/9157] SEGV on bad java source
--- Additional Comments From timo dot lindfors at iki dot fi 2004-10-10 20:09 --- This one seems to be alive still, $ gcj -C AddString.java AddString.java: In class `AddString': AddString.java: In method `AddString.add(int)': AddString.java:6: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See URL:http://gcc.gnu.org/bugs.html for instructions. $ gcj -v Reading specs from /home/lindi/installdir/installdir-gcc-20041009/lib/gcc/i686-pc-linux-gnu/4.0.0/specs Reading specs from /home/lindi/installdir/installdir-gcc-20041009/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../libgcj.spec rename spec lib to liborig Configured with: ../configure --prefix=/home/lindi/installdir/installdir-gcc-20041009 Thread model: posix gcc version 4.0.0 20041009 (experimental) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9157