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

NullPointerException calling DefaultCaret.setVisible

XMLWordPrintable


       Run the testcase TestDebug located in the attachments using JDK1.3 and
       JDK1.3.0_02 on Windows NT and the following exception will be thrown:

      java.lang.NullPointerException
              at javax.swing.text.PlainView.modelToView(PlainView.java:310)
              at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(BasicTextUI.j
      ava:1245)
              at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:818)
              at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:793)
              at javax.swing.text.JTextComponent.modelToView(JTextComponent.java:1216)

              at javax.swing.text.DefaultCaret.setVisible(DefaultCaret.java:611)
              at com.telcordia.wfa.debug.DebugConsole.<init>(DebugConsole.java:201)
              at com.telcordia.wfa.debug.Debug.initiate(Debug.java:145)
              at TestDebug.run(TestDebug.java:29)
              at java.lang.Thread.run(Thread.java:484)

       This same testcase launches all the time and displays a GUI with logged
       exceptions using jdk1.2.2. On rare occassions though using 1.3 the
       testcase does run properly even after subsequence tries.

       In the attachments is 1.3run.txt that has the full verbose output of a success
       launch while ExceptionMessage.txt contains almost the same output with the
       exception.

       The offending call _consoleDisplay.getCaret().setVisible( true ) is in
       DebugConsole.java under the com directory that comes with the testcase.
       It's of type JTextArea. If you comment out the call everything works.
       
       
       

            shickeysunw Shannon Hickey (Inactive)
            atongschsunw Albert Tong-schmidt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: