Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Apr 2000 18:20:05 +1000
From:      David Hobley <davidh@optushome.com.au>
To:        Greg Lewis <glewis@trc.adelaide.edu.au>
Cc:        "freebsd-java@freebsd.org" <freebsd-java@FreeBSD.ORG>
Subject:   Re: crash under 4.0
Message-ID:  <38F2E035.A0FD5E23@optushome.com.au>
References:  <200004102129.GAA72917@ares.trc.adelaide.edu.au>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------1DFDEA8FD92BD1CA7ED3B559
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Greg Lewis wrote:
> 
> > When trying to run an app I have here which runs on Windows,
> > and the Mac, I get the following crash:
> > Anyone any ideas?
> 
> Yes, but I need to confirm them.

No problem, here is a test case I just constructed. Provide a
splash.gif in the current directory. I can provide one which
crashes if it something about this image (I tried several though).

-- 
Cheers,
david
--------------1DFDEA8FD92BD1CA7ED3B559
Content-Type: text/plain; charset=us-ascii;
 name="test.java"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="test.java"

import java.awt.*;
import java.awt.event.*;

public class test extends Window {
    private static final String imagename = "splash.gif";

    private Image picture;
    private int width, height;
    
    public test(Frame f) {
	super(f);

        Toolkit tk = Toolkit.getDefaultToolkit();
        picture = loadPicture(tk);
    }

    private Image loadPicture(Toolkit tk) {
        MediaTracker tracker = new MediaTracker(this);
        Image result = tk.getImage(imagename);
        tracker.addImage(result, 0);
        try { 
            tracker.waitForAll(); 
        }

        catch (Exception e) {
            e.printStackTrace();
        }
        
        width = result.getWidth(this);
        height = result.getHeight(this);
        return result;
    }

    static public void main(String[] args) {
	Frame f = new Frame();
	new test(f);
    }
}

--------------1DFDEA8FD92BD1CA7ED3B559--



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38F2E035.A0FD5E23>