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

Fixtext.main:internal JIT (3.00.072b(x)) error 'Structured Exception(c0000005)'

XMLWordPrintable

    • 1.2.2
    • generic, x86
    • generic, windows_95, windows_nt



      Name: tb29552 Date: 11/06/98


      /*

      A nonfatal internal JIT (3.00.072b(x)) error 'Structured Exception(c0000005)' ha
      s occurred in :
        'Fixtext.main ([Ljava/lang/String;)V': Interpreting method.
        Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cg
      i

      that is what showed up on my output screen. here is my code just a
      warning it is really messy and far from a complete project....

      To reproduce:

      1) javac Fixtext.java
      2) java Fixtext

      Workaround:

      The workaround is to run JDK without the JIT, for example:
         java -Djava.compiler=NONE <classname>
         jre -Djava.compiler=NONE <classname>
         rmic -J-Djava.compiler=NONE <classname>
         javac -J-Djava.compiler=NONE abc.java
         appletviewer -J-Djava.compiler=NONE xyz.html

      Refer to this URL for the "win32" version of the Tools Reference Pages:
      http://java.sun.com/products/jdk/1.1/docs/tooldocs/win32/index.html


      */
      import java.io.*;

      class Fixtext {
          public static void main(String[] args) {
              try {
                  //
                  // getting the directory listing and setting up a list of asp
                  // files to be processed
                  //
                  //File dirName = new File("c:\\temp\\"); // the directory that
                  File dirName = new File("c:\\javatemp\\"); // the directory that
                  // they will be stored
                  // in
                  String[] dirlisting = dirName.list();
                  String[] asplisting = new String[dirlisting.length];
                  int aspcounter = 0;
                  boolean getnextline = true;
                  for (int i = 0; i < dirlisting.length; i++)
                      if ((dirlisting[i].indexOf(".asp")) ==
                          (dirlisting[i].length() - 4) &&
                          (dirlisting[i].length() - 4 != -1))
                          asplisting[aspcounter++] = dirlisting[i];
                  // loop which will run once per asp file ****************
                  for (int asptemp = 0; asptemp <= aspcounter - 1; asptemp++) {
                      // a message to say
                      // which file it is
                      // working on.
                      System.out.println("Processing file: " + asplisting[asptemp]);
                      String fileName = asplisting[asptemp]; // get the current file
                      // name
                      File input = new File(dirName, fileName); // open the current file
                      File output = new File(dirName, fileName + "derekback"); // open the output file
                      PushbackReader in = new PushbackReader(new BufferedReader(new FileReader(input))); // open an input stream
                      // to read the in file
                      DataOutputStream out = new DataOutputStream(new FileOutputStream(output)); // an output stream

                      String outputstring = null; // "
                      // onFocus=\"me.selected\"";
                      // // the string to add in
                      // the onfocus event

                      boolean EOF = false; // the end of file variable
                      char c; // temp char to store read in characters
                      long counter = input.length(); // to keep track of where i
                      // am in the file
                      String first = "type=\"text\""; // what to look for
                      String second = "type=text"; // what else to look for
                      char newline = '\n'; // newline character
                      int firstindex = -1;
                      int opencounter = 0;
                      // start looping through the current file
                      while (!EOF) {
                          try {
                              // get a line
                              String myword = "";
                              while ((!((c = (char) in.read()) == (newline) || (c == -1))) && counter >= 0) {
                                  counter--;
                                  myword += c;
                              }
                              // check to see if it is the end of the file
                              if (c == -1 || counter <= 0) {
                                  EOF = true;
                                  continue;
                              } /* end if */
                              /* add the newline char to the string */
                              myword += c;
                              // ****************** need to keep looping on one
                              // line incase there is more than one input on a line
                              while (!getnextline) {
                                  String temp2 = myword.toLowerCase();
                                  // look for the key word
                                  firstindex = temp2.indexOf(first) > temp2.indexOf(second) ? temp2.indexOf(first) : temp2.indexOf(second);
                                  // is is found?
                                  if (firstindex >= 0) {
                                      int index2 = -1;
                                      String name = null;
                                      boolean needname = true;
                                      String myword2 = "";
                                      // set the opencounter which looks for the
                                      // end of the input statement
                                      int openindex = -1;
                                      do {
                                          openindex = myword.indexOf('<', openindex + 1);
                                          if (openindex >= 0)
                                              opencounter++;
                                      } while (openindex >= 0);
                                      openindex = -1;
                                      do {
                                          openindex = myword.indexOf('>', openindex + 1);
                                          if (openindex >= 0)
                                              opencounter--;
                                      } while (openindex >= 0);
                                      // go get the name of the box
                              mywhileloop:
                                      while (needname) {
                                          if (opencounter < 1)
                                              opencounter -= myword.length(); // to keep the
                                          // opencounter in the
                                          // correct spot when
                                          // concatinating the two
                                          // strings
                                          myword += myword2;
                                          myword2 = "";
                                          index2 = myword.indexOf("name"); // look for the name
                                          // keyword then extract
                                          // the name
                                          if (opencounter < 1 ? index2 >= 0 && index2 < opencounter * (-1) : index2 >= 0) {
                                              int left = myword.indexOf("\"", index2);
                                              int right = myword.indexOf("\"", left + 1);
                                              name = myword.substring(left + 1, right);
                                              needname = false;
                                          }
                                          /* if */
                                          else {
                                              // this if statement is to check if
                                              // the input has been closed without
                                              // finding the name
                                              if (opencounter < 1) {
                                                  name = "";
                                                  needname = false;
                                                  continue mywhileloop;
                                              } /* the input has been closed */
                                              /*
                                               * read another line looking for the
                                               * name
                                               */
                                              while ((!((c = (char) in.read()) == (newline) || (c == -1))) && (counter >= 0)) {
                                                  counter--;
                                                  myword2 += c;
                                              } // while
                                              if (c == -1 || counter <= 0) {
                                                  EOF = true;
                                                  continue;
                                              } /* if */
                                              myword2 += c;
                                              // check to see if the input stmnt
                                              // closes on this line
                                              do {
                                                  openindex = myword2.indexOf('<', openindex + 1);
                                                  if (openindex >= 0)
                                                      opencounter++;
                                              } while (openindex >= 0);
                                              openindex = -1;
                                              do {
                                                  openindex = myword2.indexOf('>', openindex + 1);
                                                  if (openindex >= 0)
                                                      if (opencounter > 1)
                                                          opencounter--;
                                                      else
                                                          opencounter = (openindex * (-1));
                                              } while ((openindex >= 0) && (opencounter >= 1));
                                          } // else

                                      } // while need name
                                      // if name is "" then the input had no name
                                      // so write the origional text
                                      outputstring = name == "" ? "" : " onFocus=\"" + name + ".select\"";
                                      // extract everything after the type=text
                                      String temp = myword.substring(firstindex + first.length());
                                      // remove everything after type=text since it
                                      // is stored in temp
                                      myword = myword.substring(0, firstindex + first.length());
                                      // put the two strings back together with the
                                      // name in the middle
                                      String linetowrite = myword + outputstring;
                                      myword = temp;
                                      out.write(linetowrite.getBytes());
                                  }
                                  /* if */
                                  else {
                                      // this if if type=text was not found just
                                      // write the line.
                                      out.write(myword.getBytes());
                                      getnextline = true;
                                  }
                              } // while !getnextline
                          } // try just inside while
                          catch(IOException e) {
                              System.out.println(e);
                              return;
                          } // catch io
                      } // while not eof
                  } // while there are more asp files
              } // try at beginning
              catch(FileNotFoundException e) {
                  System.out.println("Error reading input file" + e);
                  return;
              } // catch filenotfound
              catch(IOException e) {
                  System.out.println(e);
                  return;
              } // catch io
          } // main
      } // fixtext

      (Review ID: 42254)
      ======================================================================

      Name: tb29552 Date: 02/05/99


      Steps:
      First, I try to run the demo HelloUniverse.java for Java3D.
      I run the appletviewer with HElloUNiverse.html.
      Code:
      The source code is the demo HelloUNiverse.java for Java 3D.
      Message:
      A nonfatal internal JIT(300078(x)) error Structured Exception (0000005) has ocurred in:
      java/text/MessageFormat.applyPattern (Java/lang/string) INterpreting method.
      Configuration:
      My PC is a Pentium 133 Mhz, Ram: 32 Mbs, CD ROM 8x, Hard Disk 1.2 Gb, (750 Mb Free).
      Please, I need the solution because I have to make a Java 3D application for my enterprise.
      ======================================================================

            dviswanasunw Deepa Viswanathan (Inactive)
            tbell Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: