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

win32: Assertion failure awt_Component.cpp line 1358

    XMLWordPrintable

Details

    • 1.1.4
    • x86
    • windows_95, windows_nt
    • Verified

    Description


      I'm getting assertion failures at awt_Component.cpp line 1358 occasionally
      with the BeanBox while running with java_g. This is with vanilla JDK 1.1.1

      Here's the source line where the assertion fails:

          Hjava_lang_String* AwtComponent::GetItemString(Hjava_awt_Component *target, long index)
          {
              Hjava_lang_String* str = (Hjava_lang_String*) execute_java_dynamic_method(EE(),
               (HObject *)target, "getItem", "(I)Ljava/lang/String;", index);
      >>>> ASSERT(!exceptionOccurred(EE()));
              return str;
          }

      And here's the windows backtrace:

      _assert(void * 0x01f242e8, void * 0x01f242b4, unsigned int 1358) line 252
      CallDebugger(char * 0x01f242e8, char * 0x01f242b4, unsigned int 1358) line 715 + 18 bytes
      AwtComponent::GetItemString(Hjava_awt_Component * 0x00f76d80, long -1) line 1358 + 37 bytes
      AwtComponent::DrawListItem(tagDRAWITEMSTRUCT & {...}) line 1380 + 19 bytes
      AwtChoice::WmDrawItem(unsigned int 4, tagDRAWITEMSTRUCT & {...}) line 143
      AwtComponent::WmDrawItem(unsigned int 4, tagDRAWITEMSTRUCT & {...}) line 1296 + 22 bytes
      AwtComponent::WindowProc(unsigned int 43, unsigned int 4, long 39117272) line 598 + 22 bytes
      AwtComponent::WndProc(void * 0x13a00128, unsigned int 43, unsigned int 4, long 39117272) line 154 + 23 bytes
      USER32! 77e720bb()
      USER32! 77e73549()
      USER32! 77e9640f()
      USER32! 77e7b3f2()
      USER32! 77e74bb3()
      USER32! 77e74e7f()
      USER32! 77e728d1()
      USER32! 77e7295c()
      AwtComponent::DefWindowProcA(unsigned int 15, unsigned int 0, long 0) line 684 + 47 bytes
      AwtComponent::WindowProc(unsigned int 15, unsigned int 0, long 0) line 671 + 20 bytes
      AwtComponent::WndProc(void * 0x009a023a, unsigned int 15, unsigned int 0, long 0) line 154 + 23 bytes
      USER32! 77e718d2()
      USER32! 77e722f5()
      NTDLL! 77f761eb()

      KGH 4/3/97

      ================================================================================

      OK, I added in a exceptionDescribe to awt_Component.cpp, and this shows that the
      offending EE() state was:

      Exception in thread "AWT-Windows"
      java.lang.ArrayIndexOutOfBoundsException: -1 < 0
              at java.util.Vector.elementAt(Vector.java:326)
              at java.awt.Choice.getItem(Choice.java:100)
              at sun.awt.windows.WToolkit.run(WToolkit.java:103)
              at java.lang.Thread.run(Thread.java:474)


      KGH 4/3/97

      ================================================================================


      One more customer wants this fix:

      David B. Malkovsky
      SAS Institute Inc.
      Email: ###@###.###

      ------------------------------
      We recently found an assertion failure that looks like JavaSoft Bug
      #4042898. The description indicates that the problem happens in the
      BeanBox. We have two very small sample programs that expose the same
      problem in JDK 1.1.2 on WinNT 4.0 SP3. We have no means of adding
      additional comments to the bug report so I'm using this mechanism so
      you might add this additional information. We hope that providing
      these simple samples it may improve the likelihood that the problem
      will be fixed sooner.

      Here are the programs:

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

      public class ChoiceBug {
          public static void main(String[] args) {
              Frame f = new Frame("Choice bug");
              f.setSize(200, 200);
              Choice c1 = new Choice();
              c1.setSize(100, 24);
              f.add(c1);
              f.pack();
              f.show();
          }
      }

      and

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

      public class ListBug {
          public static void main(String[] args) {
              Frame f = new Frame("List bug");
              f.setSize(200, 200);
              List l1 = new List();
              l1.setSize(100, 24);
              f.add(l1);
              f.pack();
              f.show();
         }
      }

      Here are some example output using java_g and jdb:

      *** Running under java_g, I get the following:

      D:\Projects\COM\sas\apps\report>java_g ReportApp
      Fatal error: 0
      Assertion failed: !exceptionOccurred(EE()), file
      ..\..\..\..\src\win32\sun\windo
      ws\awt_Component.cpp, line 1364

      abnormal program termination


      *** Running under jdb (which uses java_g):

      D:\Projects\COM\sas\apps\report>jdb ReportApp
      Initializing jdb...
      0xf8c0c0:class(COM.sas.apps.report.ReportApp)
      > run
      run ReportApp
      running ...
      main[1]
      Uncaught exception: java.lang.ArrayIndexOutOfBoundsException -1 < 0
              at java.util.Vector.elementAt(Vector.java:326)
              at java.awt.Choice.getItem(Choice.java:100)
              at sun.awt.windows.WToolkit.run(WToolkit.java:108)
              at java.lang.Thread.run(Thread.java:475)

      AWT-Windows[1] Input stream closed.

      *** Running java_g -tm generates a 122MB(!) method trace file.
       Grepping for getItem yields these lines in the file:

      # AWT-Windows [ 2] | | > java/awt/Choice.getItem(I)Ljava/lang/String;
      (2) entered
      # AWT-Windows [ 2] | | < java/awt/Choice.getItem(I)Ljava/lang/String;
      throwing java/lang/ArrayIndexOutOfBoundsException



      Attachments

        Issue Links

          Activity

            People

              duke J. Duke
              ghamiltosunw Graham Hamilton (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: