public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/26152] New: gtkImage.c complains and crashes the application
@ 2006-02-07 11:10 cardona at ucla dot edu
2006-02-07 11:23 ` [Bug java/26152] " konqueror at gmx dot de
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: cardona at ucla dot edu @ 2006-02-07 11:10 UTC (permalink / raw)
To: java-prs
ImageJ, the public domain scientific-grade image processing application
compiles fine with the gcj-wrapper-4.0 in Kubuntu GNU/Linux-ppc when stripped
of JPEG functionality and its dependance on the tools.jar. But when trying to
open an image, the gtkImage.c file complains:
** ERROR **: file
../../../src/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c: line 572
(createRawData): assertion failed: (data_fid != 0)
aborting...
I attach a self-contained test case below. Here are the commands to compile and
run it:
$ /usr/bin/gcj-wrapper-4.0 -g testGtkImage.java
$ /usr/lib/jvm/java-gcj/bin/java testGtkImage
The JFileChooser never shows. Here's the error message:
** ERROR **: file
../../../src/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c: line 572
(createRawData): assertion failed: (data_fid != 0)
aborting...
Aborted
/************* START TEST CASE ************/
import java.awt.Canvas;
import java.awt.FileDialog;
import java.awt.Frame;
import java.io.File;
import javax.swing.SwingUtilities;
import javax.swing.JFileChooser;
public class testGtkImage {
String omDirectory;
File[] omFiles;
testGtkImage() {
final Frame frame = new Frame("testGtkImage");
Canvas canvas = new Canvas();
canvas.setSize(400, 200);
frame.add(canvas);
frame.setSize(400, 200);
frame.pack();
frame.show();
// test FileDialog
FileDialog fd = new FileDialog(frame, "Select file",
FileDialog.LOAD);
fd.show();
System.out.println(fd.getDirectory() + " " + fd.getFile());
// NO PROBLEM with FileDialog
// test JFileChooser as in ij.io.Opener.openMultiple()
try {
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
JFileChooser fc = new JFileChooser();
fc.setMultiSelectionEnabled(true);
File dir = null;
String sdir = "/home/"; //
OpenDialog.getDefaultDirectory();
if (sdir!=null)
dir = new File(sdir);
if (dir!=null)
fc.setCurrentDirectory(dir);
int returnVal =
fc.showOpenDialog(frame);
if
(returnVal!=JFileChooser.APPROVE_OPTION)
return;
omFiles = fc.getSelectedFiles();
if (omFiles.length==0) { //
getSelectedFiles does not work on some JVMs
omFiles = new File[1];
omFiles[0] =
fc.getSelectedFile();
}
omDirectory =
fc.getCurrentDirectory().getPath()+File.separator;
}
});
} catch (Exception e) {}
if (omDirectory==null) return;
//OpenDialog.setDefaultDirectory(omDirectory);
for (int i=0; i<omFiles.length; i++) {
String path = omDirectory + omFiles[i].getName();
System.out.println("Path: " + path);
//open(path);
/*
if (i==0 && Recorder.record)
Recorder.recordPath("open", path);
if (i==0 && !error)
Menus.addOpenRecentItem(path);
*/
}
}
static public void main(String[] args) {
new testGtkImage();
}
}
/*********** EOF ********/
--
Summary: gtkImage.c complains and crashes the application
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: blocker
Priority: P3
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: cardona at ucla dot edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26152
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/26152] gtkImage.c complains and crashes the application
2006-02-07 11:10 [Bug java/26152] New: gtkImage.c complains and crashes the application cardona at ucla dot edu
@ 2006-02-07 11:23 ` konqueror at gmx dot de
2006-02-07 11:55 ` cardona at ucla dot edu
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: konqueror at gmx dot de @ 2006-02-07 11:23 UTC (permalink / raw)
To: java-prs
------- Comment #1 from konqueror at gmx dot de 2006-02-07 11:23 -------
Subject: Re: New: gtkImage.c complains and crashes the application
On Tue, Feb 07, 2006 at 11:10:20AM -0000, cardona at ucla dot edu wrote:
> ImageJ, the public domain scientific-grade image processing application
> compiles fine with the gcj-wrapper-4.0 in Kubuntu GNU/Linux-ppc when stripped
> of JPEG functionality and its dependance on the tools.jar. But when trying to
> open an image, the gtkImage.c file complains:
>
> ** ERROR **: file
> ../../../src/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c: line 572
> (createRawData): assertion failed: (data_fid != 0)
> aborting...
This is a Debian-specific bug in gcj-4.0. We patch the upstream sources
but the patch we use is somehow broken.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=335650
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=314704
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=324502
Unfortunately I was not able to fix this bug yet.
Cheers,
Michael
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26152
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/26152] gtkImage.c complains and crashes the application
2006-02-07 11:10 [Bug java/26152] New: gtkImage.c complains and crashes the application cardona at ucla dot edu
2006-02-07 11:23 ` [Bug java/26152] " konqueror at gmx dot de
@ 2006-02-07 11:55 ` cardona at ucla dot edu
2006-02-07 12:05 ` konqueror at gmx dot de
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: cardona at ucla dot edu @ 2006-02-07 11:55 UTC (permalink / raw)
To: java-prs
------- Comment #2 from cardona at ucla dot edu 2006-02-07 11:55 -------
So there is no known patch for this bug then. Are there any plans to tackle the
problem? I understand it cripples lots of applications.
Thanks for looking at the bug report.
Albert
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26152
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/26152] gtkImage.c complains and crashes the application
2006-02-07 11:10 [Bug java/26152] New: gtkImage.c complains and crashes the application cardona at ucla dot edu
2006-02-07 11:23 ` [Bug java/26152] " konqueror at gmx dot de
2006-02-07 11:55 ` cardona at ucla dot edu
@ 2006-02-07 12:05 ` konqueror at gmx dot de
2006-02-07 12:42 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: konqueror at gmx dot de @ 2006-02-07 12:05 UTC (permalink / raw)
To: java-prs
------- Comment #3 from konqueror at gmx dot de 2006-02-07 12:05 -------
Subject: Re: gtkImage.c complains and crashes the application
On Tue, Feb 07, 2006 at 11:55:10AM -0000, cardona at ucla dot edu wrote:
>
>
> ------- Comment #2 from cardona at ucla dot edu 2006-02-07 11:55 -------
> So there is no known patch for this bug then. Are there any plans to tackle the
> problem? I understand it cripples lots of applications.
>
> Thanks for looking at the bug report.
In Debian we dont care much about it anymore as soon gcc-4.1 will be
released and the gcj included not have this problem. When its out we
will remove gcj-4.0 from debian unstable and more to gcj-4.1.
Cheers,
Michael
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26152
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/26152] gtkImage.c complains and crashes the application
2006-02-07 11:10 [Bug java/26152] New: gtkImage.c complains and crashes the application cardona at ucla dot edu
` (2 preceding siblings ...)
2006-02-07 12:05 ` konqueror at gmx dot de
@ 2006-02-07 12:42 ` pinskia at gcc dot gnu dot org
2006-02-07 15:08 ` cardona at ucla dot edu
2006-02-07 18:28 ` tromey at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-07 12:42 UTC (permalink / raw)
To: java-prs
------- Comment #4 from pinskia at gcc dot gnu dot org 2006-02-07 12:42 -------
Closing as works for me since this bug does not effect the FSF released GCC.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |WORKSFORME
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26152
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/26152] gtkImage.c complains and crashes the application
2006-02-07 11:10 [Bug java/26152] New: gtkImage.c complains and crashes the application cardona at ucla dot edu
` (3 preceding siblings ...)
2006-02-07 12:42 ` pinskia at gcc dot gnu dot org
@ 2006-02-07 15:08 ` cardona at ucla dot edu
2006-02-07 18:28 ` tromey at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cardona at ucla dot edu @ 2006-02-07 15:08 UTC (permalink / raw)
To: java-prs
------- Comment #5 from cardona at ucla dot edu 2006-02-07 15:08 -------
Before the end of this, are there any docs on how to compile the latest stable
GCC, so that I can bypass this bug? The gcc-java webpage is very confusing; I
don't even know if gcc-java can be compiled independently, or I need to compile
the whole GCC, or what!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26152
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug java/26152] gtkImage.c complains and crashes the application
2006-02-07 11:10 [Bug java/26152] New: gtkImage.c complains and crashes the application cardona at ucla dot edu
` (4 preceding siblings ...)
2006-02-07 15:08 ` cardona at ucla dot edu
@ 2006-02-07 18:28 ` tromey at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-02-07 18:28 UTC (permalink / raw)
To: java-prs
------- Comment #6 from tromey at gcc dot gnu dot org 2006-02-07 18:28 -------
You can't build just the gcj bits of gcc -- you have to build the whole thing.
There are instructions on the gcc web site:
http://gcc.gnu.org/install/
BTW, thanks for the self-contained bug report. We like to see reports like
this, since it makes it much simpler for us to see what is going wrong.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26152
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-02-07 18:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-07 11:10 [Bug java/26152] New: gtkImage.c complains and crashes the application cardona at ucla dot edu
2006-02-07 11:23 ` [Bug java/26152] " konqueror at gmx dot de
2006-02-07 11:55 ` cardona at ucla dot edu
2006-02-07 12:05 ` konqueror at gmx dot de
2006-02-07 12:42 ` pinskia at gcc dot gnu dot org
2006-02-07 15:08 ` cardona at ucla dot edu
2006-02-07 18:28 ` tromey at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).