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

Large Clipboard contents passed to AWT components should not crash JRE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • None
    • 1.1.8
    • client-libs
    • x86
    • windows_95



      Name: krT82822 Date: 03/08/2000


      orig synopsis: "Too much data from Windows Clipboard crashes JRE"

      java version "1.1.8"

      Background: It is my impression that a goal of the JVM is that no Java program
      should be able to make the JVM crash. Sure, a Java program may stop
      running (for example, when the JVM reports an exception and the Java
      program doesn't catch it), but the JVM should stay running long enough
      to exit nicely (including, releasing system resources). If the JVM
      crashes, is doesn't get a chance to exit nicely.

      The bug in the JVM that I am reporting to you violates this assumption,
      in that there is no way for a programmer to catch this error and prevent
      the Java program *and* the JVM from crashing. Am I wrong in my
      assumption about your goals for the JVM?

        To reproduce the problem:
       
       * Open Excel.
       * Use Edit | Fill | Series to put numbers in column 1, rows 1..60,000.
       * Use Edit | Fill | Series to put numbers in column 2, rows 1..60,000.
       * Block columns 1 and 2 and press ^C to put the data on the clipboard.
       * Run a Java program that can grab text data from the clipboard.
       * Grab the text data from the clipboard.
       * JRE crashes and you will get an error message in a small window saying:
       
       "This program has performed an illegal operation and will be shut down.
       If the problem persists, contact the program vendor.
       Details:
       JRE caused a stack fault in module WINAWT.DLL at
       0137:031b0e27."
       
      If you work with less data, Java works fine.

      If you try to insert this much data in Microsoft Word, it accepts it (not
      quickly, but it does it).

      If you try to insert this much data into Notepad, it gives you an error message
      saying there isn't enough memory, but it doesn't crash.
       
      This problem has existed for several versions of jre and java (1.1.6,
      1.1.7, 1.1.8), probably all previous, and probably all subsequent. It also
      occurs on Win98.

      I understand that the Windows clipboard has size limits. However, the crashing
      of JRE seems to be a problem in the AWT libraries. Even if it is a Windows
      problem (which I don't think it is), JRE should catch the error and throw an
      exception. JRE should not crash.
       
      The limit of the win9x clipboard seems to be around 512,000 characters,
      which is considerably larger than the capacity of an AWT TextArea,
      for example. No matter what the limit of the component accepting
      the clipboard data, the JRE shouldn't crash.

      This is a severe problem since there seems to be no way for me to write a
      program to trap the error (e.g., try catch) yet a user can easily crash jre when
      transferring lots of data.
      (Review ID: 102212)
      ======================================================================

            ibdsunw Ibd Ibd (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: