Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4071991

JAVA EXE CRASHES when using Images on 16-color displays

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.1.1, 1.1.3
    • Fix Version/s: 1.1.5
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.1.5
    • CPU:
      generic, x86
    • OS:
      solaris_2.5, windows_nt
    • Verification:
      Verified

      Backports

        Description



        Name: sg39081 Date: 08/14/97


        1. Create an Image using a pixel array:
                myImage = createImage(new MemoryImageSource(
                                          100,100,pixarray,0,100));
                myTracker.addImage(myImage,1);

        2. Draw the image:

            if (myTracker.checkID(1,true))
        {
        g.drawImage(myImage,20,40,this);

        3. Works OK on displays with 256 colors. Causes WINDOWS
           PROTECTION EXCEPTION (in javai.dll) on 16 color display.


        company - FORE Systems, Inc. , email - ###@###.###
        ======================================================================


        ingrid.yao@Eng 1997-08-21

        Oracle reported the same problem:

         The test case failed. Included a simple dialog box that has a canvas
        which holds a 16-color image. They tested on a Compaq machine that was
        running NT 4.0 w/ 16 colors by using JDK 1.1.1, 1.1.3, and 1.1.4. In
        all cases they had java vm error. If they do not have the image added
        to dialog box, it works. Test includes Test.java and Splash.gif files.
        You could get Splash.gif under ~ingridy/Oracle/Splash.gif

        test case:
        ===========
        import java.awt.*;

        /*
            Ibrahim Beyazit and Fai Leong
            Tested on Compaq machine that had NT 4.0 w/ 16 color
            Used JDK 1.1.1, 1.1.3, and 1.1.4
        */

        public class Test extends Dialog
        {
        public Test(Frame parentFrame)
        {

                super(parentFrame, "Test", true);

                // comment these two lines, works. Once add the image you get Java vm error
                ImageCanvas ic = new ImageCanvas();
                add("Center", ic);

                // set size of the dialog; close to the size of the image
                int width = 200,
                    height = 210;
                setSize(width,height);

                // center on the screen
        Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
                setLocation((d.width - width) / 2, (d.height - height) /2);
        }

        static public void main(String args[])
        {
        (new Test(new Frame())).setVisible(true);
        }
        }

        class ImageCanvas extends Canvas
        {
            private Image image = Toolkit.getDefaultToolkit().getImage("Splash.gif");

            public void paint(Graphics g)
            {
                g.drawImage(image, 1 , 1, this);
            }
        }


        jeff.hsiao@Eng 1997-10-17
        No specific test case available. Implicitly tested, closed with exposure

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                cchongsunw Creighton Chong (Inactive)
                Reporter:
                sgoodsunw Sheri Good (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: