Launchpad has imported 7 comments from the remote bug at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26152.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://documentation.ubuntu.com/launchpad/user/reference/bugs/multi-project-bugs/about-multi-project-bugs/#bugs-in-external-trackers.

------------------------------------------------------------------------
On 2006-02-07T11:10:19+00:00 Cardona-ucla 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...


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 ********/

Reply at: https://bugs.launchpad.net/ubuntu/+source/gcc-
defaults/+bug/30721/comments/0

------------------------------------------------------------------------
On 2006-02-07T11:23:15+00:00 Michael Koch wrote:

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


Reply at: 
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/30721/comments/1

------------------------------------------------------------------------
On 2006-02-07T11:55:10+00:00 Cardona-ucla wrote:

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

Reply at: https://bugs.launchpad.net/ubuntu/+source/gcc-
defaults/+bug/30721/comments/3

------------------------------------------------------------------------
On 2006-02-07T12:05:34+00:00 Michael Koch wrote:

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


Reply at: 
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/30721/comments/4

------------------------------------------------------------------------
On 2006-02-07T12:42:56+00:00 Pinskia wrote:

Closing as works for me since this bug does not effect the FSF released
GCC.

Reply at: https://bugs.launchpad.net/ubuntu/+source/gcc-
defaults/+bug/30721/comments/5

------------------------------------------------------------------------
On 2006-02-07T15:08:15+00:00 Cardona-ucla wrote:


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!

Reply at: https://bugs.launchpad.net/ubuntu/+source/gcc-
defaults/+bug/30721/comments/6

------------------------------------------------------------------------
On 2006-02-07T18:28:14+00:00 Tromey wrote:

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.


Reply at: 
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/30721/comments/7


** Bug watch added: Debian Bug tracker #335650
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=335650

** Bug watch added: Debian Bug tracker #314704
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=314704

** Bug watch added: Debian Bug tracker #324502
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=324502

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/30721

Title:
  gnu_java_awt_peer_gtk_GtkImage.c fails with a simple test case

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/30721/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to