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

NullPointerException thrown from BufferedInputStream reading thread

XMLWordPrintable

    • b32
    • sparc
    • solaris_9

      Despite the synchronization added to BufferedInputStream, a NullPointerException can still be generated from the reading thread as by the following stack traces:

      in close setting in to null:
              at java.io.BufferedInputStream.close(BufferedInputStream.java:417)
              at java.lang.UNIXProcess$DeferredCloseInputStream.lower(UNIXProcess.java:173)
              at java.lang.UNIXProcess$DeferredCloseInputStream.read(UNIXProcess.java:223)
              at java.io.BufferedInputStream.read1(BufferedInputStream.java:228)
              at java.io.BufferedInputStream.read(BufferedInputStream.java:285)
              at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:408)
              at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:450)
              at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
              at java.io.InputStreamReader.read(InputStreamReader.java:167)
              at java.io.BufferedReader.fill(BufferedReader.java:136)
              at java.io.BufferedReader.read(BufferedReader.java:157)
              at com.sun.tools.example.debug.tty.VMConnection.dumpStream(VMConnection.java:283)
              at com.sun.tools.example.debug.tty.VMConnection.access$000(VMConnection.java:48)
              at com.sun.tools.example.debug.tty.VMConnection$1.run(VMConnection.java:307)

      java.lang.NullPointerException
              at java.io.BufferedInputStream.read(BufferedInputStream.java:287)
              at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:408)
              at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:450)
              at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
              at java.io.InputStreamReader.read(InputStreamReader.java:167)
              at java.io.BufferedReader.fill(BufferedReader.java:136)
              at java.io.BufferedReader.read(BufferedReader.java:157)
              at com.sun.tools.example.debug.tty.VMConnection.dumpStream(VMConnection.java:283)
              at com.sun.tools.example.debug.tty.VMConnection.access$000(VMConnection.java:48)
              at com.sun.tools.example.debug.tty.VMConnection$1.run(VMConnection.java:307)

            mmcclosksunw Michael Mccloskey (Inactive)
            mmcclosksunw Michael Mccloskey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: