JDK-4934597 : NPE pasting unprintable chars into text boxes
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio.charsets
  • Affected Version: 1.0_build36
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: solaris_8
  • CPU: generic
  • Submitted: 2003-10-08
  • Updated: 2006-07-24
  • Resolved: 2006-07-24
Related Reports
Relates :  
Description
By mistake I pasted some UTF-8 data into a text box of the console and got a nasty error. I suspect this happens with all server consoles though, not just IdSync.

The data was ???lin?? ?ndr??

Exception occurred during event dispatching:
java.lang.NullPointerException
        at sun.io.ByteToCharCOMPOUND_TEXT.flushConverter(ByteToCharCOMPOUND_TEXT.java:655)
        at sun.io.ByteToCharCOMPOUND_TEXT.nonStandardBytes(ByteToCharCOMPOUND_TEXT.java:280)
        at sun.io.ByteToCharCOMPOUND_TEXT.handleByte(ByteToCharCOMPOUND_TEXT.java:128)
        at sun.io.ByteToCharCOMPOUND_TEXT.convert(ByteToCharCOMPOUND_TEXT.java:112)
        at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:245)
        at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:295)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:180)
        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 sun.awt.datatransfer.DataTransferer$ReencodingInputStream.read(DataTransferer.java:1704)
        at java.io.InputStream.read(InputStream.java:162)
        at java.io.InputStream.read(InputStream.java:88)
        at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:283)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:180)
        at java.io.InputStreamReader.read(InputStreamReader.java:167)
        at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.handleReaderImport(BasicTextUI.java:2147)
        at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.importData(BasicTextUI.java:2304)
        at javax.swing.text.DefaultCaret.mouseClicked(DefaultCaret.java:318)
        at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:208)
        at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:207)
        at java.awt.Component.processMouseEvent(Component.java:5096)
        at java.awt.Component.processEvent(Component.java:4890)
        at java.awt.Container.processEvent(Container.java:1566)
        at java.awt.Component.dispatchEventImpl(Component.java:3598)
        at java.awt.Container.dispatchEventImpl(Container.java:1623)
        at java.awt.Component.dispatchEvent(Component.java:3439)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3174)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
        at java.awt.Container.dispatchEventImpl(Container.java:1609)
        at java.awt.Window.dispatchEventImpl(Window.java:1585)
        at java.awt.Component.dispatchEvent(Component.java:3439)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:140)
        at java.awt.Dialog.show(Dialog.java:538)
        at com.netscape.management.client.util.AbstractDialog.show(Unknown Source)
        at com.netscape.management.client.util.AbstractDialog.showModal(Unknown Source)
        at com.sun.directory.wps.ui.gui.view.WindowsCreationAttributesView$WindowsCreationDefaultsPanel.editCreationAttribute(WindowsCreationAttributesView.java:687)
        at com.sun.directory.wps.ui.gui.view.WindowsCreationAttributesView$WindowsCreationDefaultsPanel.specifyCreationAttribute(WindowsCreationAttributesView.java:634)
        at com.sun.directory.wps.ui.gui.view.WindowsCreationAttributesView$WindowsCreationDefaultsPanel.access$100(WindowsCreationAttributesView.java:431)
        at com.sun.directory.wps.ui.gui.view.WindowsCreationAttributesView$3.actionPerformed(WindowsCreationAttributesView.java:554)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
        at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
        at java.awt.Component.processMouseEvent(Component.java:5093)
        at java.awt.Component.processEvent(Component.java:4890)
        at java.awt.Container.processEvent(Container.java:1566)
        at java.awt.Component.dispatchEventImpl(Component.java:3598)
        at java.awt.Container.dispatchEventImpl(Container.java:1623)
        at java.awt.Component.dispatchEvent(Component.java:3439)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
        at java.awt.Container.dispatchEventImpl(Container.java:1609)
        at java.awt.Window.dispatchEventImpl(Window.java:1585)
        at java.awt.Component.dispatchEvent(Component.java:3439)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:140)
        at java.awt.Dialog.show(Dialog.java:538)
        at com.netscape.management.client.util.AbstractDialog.show(Unknown Source)
        at com.netscape.management.client.util.AbstractDialog.showModal(Unknown Source)
        at com.sun.directory.wps.ui.gui.view.WindowsCreationAttributesView.specifyCreationAttributes(WindowsCreationAttributesView.java:59)
        at com.sun.directory.wps.ui.gui.view.CreationFlowView$3.actionPerformed(CreationFlowView.java:158)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
        at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
        at java.awt.Component.processMouseEvent(Component.java:5093)
        at java.awt.Component.processEvent(Component.java:4890)
        at java.awt.Container.processEvent(Container.java:1566)
        at java.awt.Component.dispatchEventImpl(Component.java:3598)
        at java.awt.Container.dispatchEventImpl(Container.java:1623)
        at java.awt.Component.dispatchEvent(Component.java:3439)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
        at java.awt.Container.dispatchEventImpl(Container.java:1609)
        at java.awt.Window.dispatchEventImpl(Window.java:1585)
        at java.awt.Component.dispatchEvent(Component.java:3439)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

###@###.### 2003-10-08
###@###.### 2004-01-23

Comments
EVALUATION We no longer do any updates for sun.io.ByteToCharCOMPOUND_TEXT (it's true for all sun.io converters). We still have problems/issues with COMPOUND_TEXT decoder (java.nio version), this is being traced in 6392670. Closed this one as "will not fix". See 6392670 for further development of COMPOUND_TEXT decoder issues.
24-07-2006

EVALUATION This doesn't look like anything in Swing. Giving drag&drop a crack at it. Note to subsequent reviewers: Looks like a lot of pertinent info has been placed in the Comments section. ###@###.### 2004-03-01 Name: agR10216 Date: 03/02/2004 Support of COMPOUND_TEXT, which translation causes NPE in JDK 1.4.1 in the submitter's scenario, was disabled with the fix for 4718897 (Clipboard context does not work correctly on Solaris), so this issue shouldn't be reproducible with JDK 1.4.2 and 1.5.0. Could the submitter please check if the issue is reproducible with JDK 1.5.0 beta1? ###@###.### 2004-03-02 ====================================================================== Name: agR10216 Date: 03/18/2004 The bug isn't reproducible starting with JRE 1.4.2 (see comments); it's explained by the changes in DnD code (the fix for the bug 4718897). However, sun.io.ByteToCharCOMPOUND_TEXT seems to fail if it converts somehow malformed COMPOUND_TEXT. Recaterorizing to java/char_encodings to give the appropriate team a chance to revise the converter. Please recategorize this bug to more appropriate subcategory if needed. ###@###.### 2004-03-18 ====================================================================== Name: agR10216 Date: 03/19/2004 You see, in the above evaluation I mean that if ByteToCharCOMPOUND_TEXT converts somehow malformed COMPOUND_TEXT, the converter seems to fail unexpectedly, in an undocumented way. Probably, it's worthy of fixing. ###@###.### 2004-03-19 ======================================================================
19-03-2004