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

UnsatifiedLinkError on sun.awt.image.GifImageDecoder.parseImage(...)(1.1.x ONLY)

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.5.1, solaris_7

      Description



      Name: joT67522 Date: 01/06/98


      Received the following error after calling
      startProduction() on ImageProducer returned from
      URL.getContent():

      java.lang.UnsatisfiedLinkError: parseImage
              at sun.awt.image.GifImageDecoder.readImage(GifImageDecoder.java:552)
              at sun.awt.image.GifImageDecoder.produceImage(GifImageDecoder.java:223)
              at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.j
      ava:265)
              at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:151)
              at sun.awt.image.ImageFetcher.run(ImageFetcher.java:127)

      I noted that parseImage is a native method, so I
      assume the problem is related to this.



      $ cat Test3.java
      import java.awt.*;
      import java.awt.image.*;

      public class Test3 implements ImageConsumer {
        public boolean complete = false;

        int xdim, ydim;
        int pix[][];

        public void setProperties(java.util.Hashtable param) {
        }
        public void setColorModel(ColorModel param) {
        }
        public void setHints(int param) {
        }
        public void imageComplete(int param) {
          complete = true;
        }
        public void setDimensions(int x, int y) {
          xdim = x;
          ydim = y;
          pix = new int[x][y];
        }
        public void setPixels(int x1, int y1, int w, int h,
                              ColorModel model, byte pixels[], int off, int scansize)
      {
          int x, y, x2, y2, sx, sy;
          // we're ignoring the ColorModel, mostly for speed reasons.
          x2 = x1+w;
          y2 = y1+h;
          sy = off;
          for(y=y1; y<y2; y++) {
            sx = sy;
            for(x=x1; x<x2; x++)
              pix[x][y] = pixels[sx++];
            sy += scansize;
          }
        }
        public void setPixels(int x1, int y1, int w, int h,
                              ColorModel model, int pixels[], int off, int scansize) {
          int x, y, x2, y2, sx, sy;
          // we're ignoring the ColorModel, mostly for speed reasons.
          x2 = x1+w;
          y2 = y1+h;
          sy = off;
          for(y=y1; y<y2; y++) {
            sx = sy;
            for(x=x1; x<x2; x++)
              pix[x][y] = pixels[sx++];
            sy += scansize;
          }
        }

        public static void main (String argsv[]) {
            Test3 tst = new Test3();

            try {
               java.net.URL address = new java.net.URL ("http://devweb2/results/dev" +
      "/images" + "/small-up.gif");

             System.out.println ("Content: " + address.getContent().toString());
             System.out.println ("ImageProducer? = " + (address.getContent()
      instanceof ImageProducer));

               if (address.getContent() instanceof ImageProducer) {
                  boolean complete = false;
                  int t;

                  java.awt.image.ImageProducer imgProd =
      (java.awt.image.ImageProducer) address.getContent();

                System.out.println ("Starting image production");

                  imgProd.startProduction(tst);

                System.out.println ("Started!");

                  t = 1000;
                  while(t>0 && ! tst.complete) {
                     try {
                        Thread.currentThread().sleep(100);
                     } catch (Throwable ex) {
                     }
                     t -= 100;
                  }

                if (tst.complete)
                  System.out.println ("Image Complete!");
               }
            } catch (Exception e) {
               System.out.println (e.toString());
            }

        }

      }






      $ javac Test3.java
      $ java Test3
      Content: sun.awt.image.URLImageSource@1dce0936
      ImageProducer? = true
      Starting image production
      Started!
      java.lang.UnsatisfiedLinkError: parseImage
              at sun.awt.image.GifImageDecoder.readImage(GifImageDecoder.java:552)
              at sun.awt.image.GifImageDecoder.produceImage(GifImageDecoder.java:223)
              at
      sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:265)
              at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:151)
              at sun.awt.image.ImageFetcher.run(ImageFetcher.java:127)
      Image Complete!
      $ echo $CLASSPATH
      /data/users/johnson:/opt/bin/jdk1.1.4/lib:/opt/bin/jdk1.1.4/lib/classes.zip:/dat
      a/users/johnson/../brownp/java/lib/vbj30.jar:/data/u
      sers/johnson/../brownp/java/lib:/data/users/johnson/../brownp/java/projects/lib:
      /opt/bin/jdbc/lib/classes111.zip
      $ uname -a
      SunOS devweb 5.5.1 Generic_103640-12 sun4u sparc SUNW,Ultra-2
      $

      (Review ID: 22397)
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              bchristi Brent Christian
              Reporter:
              johsunw Joon Oh (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: