Null pointer exceptions
Submitted by Tuesday, 7 August, 2007 - 02:58
on
I'm getting null pointer exceptions. I tried upgrading to the latest jvm and latest jedit, but that didn't solve the problem. Here are some logs from before and after I upgraded.
Before upgrading:
[message] Log: java.version=1.6.0_01
[message] Log: java.vm.version=1.6.0_01-b06
[message] Log: java.runtime.version=1.6.0_01-b06
[message] Log: java.vendor=Sun Microsystems Inc.
[message] Log: java.compiler=null
[message] Log: os.name=Windows Vista
[message] Log: os.version=6.0
[message] Log: os.arch=x86
(snip)
[notice] jEdit: jEdit version 4.3pre9
(snip)
[error] JEditTextArea: BUG: screenLine=-1,visibleLines=45,physicalLine=0,offset=0,firstPhysicalLine=0,lastPhysicalLine=26
[error] BeanShellAction: java.lang.NullPointerException
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.scrollTo(TextArea.java:860)
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.scrollToCaret(TextArea.java:712)
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea._finishCaretUpdate(TextArea.java:5004)
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.finishCaretUpdate(TextArea.java:5156)
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.moveCaretPosition(TextArea.java:2213)
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.moveCaretPosition(TextArea.java:2179)
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.moveCaretPosition(TextArea.java:2168)
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.goToBufferStart(TextArea.java:3128)
[error] BeanShellAction: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] BeanShellAction: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[error] BeanShellAction: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[error] BeanShellAction: at java.lang.reflect.Method.invoke(Unknown Source)
[error] BeanShellAction: at bsh.Reflect.invokeMethod(Reflect.java:134)
[error] BeanShellAction: at bsh.Reflect.invokeObjectMethod(Reflect.java:80)
[error] BeanShellAction: at bsh.Name.invokeMethod(Name.java:858)
[error] BeanShellAction: at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75)
[error] BeanShellAction: at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
[error] BeanShellAction: at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
[error] BeanShellAction: at bsh.BSHBlock.evalBlock(BSHBlock.java:130)
[error] BeanShellAction: at bsh.BSHBlock.eval(BSHBlock.java:80)
[error] BeanShellAction: at bsh.BshMethod.invokeImpl(BshMethod.java:362)
[error] BeanShellAction: at bsh.BshMethod.invoke(BshMethod.java:258)
[error] BeanShellAction: at bsh.BshMethod.invoke(BshMethod.java:186)
[error] BeanShellAction: at org.gjt.sp.jedit.BeanShell.runCachedBlock(BeanShell.java:509)
[error] BeanShellAction: at org.gjt.sp.jedit.BeanShellAction.invoke(BeanShellAction.java:76)
[error] BeanShellAction: at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:416)
[error] BeanShellAction: at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:382)
[error] BeanShellAction: at org.gjt.sp.jedit.gui.DefaultInputHandler.handleKey(DefaultInputHandler.java:373)
[error] BeanShellAction: at org.gjt.sp.jedit.input.AbstractInputHandler.processKeyEventKeyStrokeHandling(AbstractInputHandler.java:116)
[error] BeanShellAction: at org.gjt.sp.jedit.gui.InputHandler.processKeyEvent(InputHandler.java:185)
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.processKeyEvent(TextArea.java:4510)
[error] BeanShellAction: at java.awt.Component.processEvent(Unknown Source)
[error] BeanShellAction: at java.awt.Container.processEvent(Unknown Source)
[error] BeanShellAction: at java.awt.Component.dispatchEventImpl(Unknown Source)
[error] BeanShellAction: at java.awt.Container.dispatchEventImpl(Unknown Source)
[error] BeanShellAction: at java.awt.Component.dispatchEvent(Unknown Source)
[error] BeanShellAction: at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
[error] BeanShellAction: at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
[error] BeanShellAction: at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
[error] BeanShellAction: at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
[error] BeanShellAction: at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
[error] BeanShellAction: at java.awt.Component.dispatchEventImpl(Unknown Source)
[error] BeanShellAction: at java.awt.Container.dispatchEventImpl(Unknown Source)
[error] BeanShellAction: at java.awt.Window.dispatchEventImpl(Unknown Source)
[error] BeanShellAction: at java.awt.Component.dispatchEvent(Unknown Source)
[error] BeanShellAction: at java.awt.EventQueue.dispatchEvent(Unknown Source)
[error] BeanShellAction: at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
[error] BeanShellAction: at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
[error] BeanShellAction: at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
[error] BeanShellAction: at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[error] BeanShellAction: at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[error] BeanShellAction: at java.awt.EventDispatchThread.run(Unknown Source)
After upgrading:
3:53:14 AM [message] Log: java.version=1.6.0_02
3:53:14 AM [message] Log: java.vm.version=1.6.0_02-b06
3:53:14 AM [message] Log: java.runtime.version=1.6.0_02-b06
3:53:14 AM [message] Log: java.vendor=Sun Microsystems Inc.
3:53:14 AM [message] Log: java.compiler=null
3:53:14 AM [message] Log: os.name=Windows Vista
3:53:14 AM [message] Log: os.version=6.0
3:53:14 AM [message] Log: os.arch=x86
(snip)
3:53:14 AM [notice] jEdit: jEdit version 4.3pre10
(snip)
8:29:21 PM [error] BeanShellAction: java.lang.NullPointerException
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.scrollTo(TextArea.java:875)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.scrollToCaret(TextArea.java:739)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea._finishCaretUpdate(TextArea.java:5085)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.finishCaretUpdate(TextArea.java:5238)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.moveCaretPosition(TextArea.java:2232)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.moveCaretPosition(TextArea.java:2198)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.moveCaretPosition(TextArea.java:2187)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea._changeLine(TextArea.java:5353)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.goToNextLine(TextArea.java:2456)
8:29:21 PM [error] BeanShellAction: at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
8:29:21 PM [error] BeanShellAction: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.lang.reflect.Method.invoke(Unknown Source)
8:29:21 PM [error] BeanShellAction: at bsh.Reflect.invokeMethod(Reflect.java:134)
8:29:21 PM [error] BeanShellAction: at bsh.Reflect.invokeObjectMethod(Reflect.java:80)
8:29:21 PM [error] BeanShellAction: at bsh.Name.invokeMethod(Name.java:858)
8:29:21 PM [error] BeanShellAction: at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75)
8:29:21 PM [error] BeanShellAction: at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
8:29:21 PM [error] BeanShellAction: at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
8:29:21 PM [error] BeanShellAction: at bsh.BSHBlock.evalBlock(BSHBlock.java:130)
8:29:21 PM [error] BeanShellAction: at bsh.BSHBlock.eval(BSHBlock.java:80)
8:29:21 PM [error] BeanShellAction: at bsh.BshMethod.invokeImpl(BshMethod.java:362)
8:29:21 PM [error] BeanShellAction: at bsh.BshMethod.invoke(BshMethod.java:258)
8:29:21 PM [error] BeanShellAction: at bsh.BshMethod.invoke(BshMethod.java:186)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.BeanShell.runCachedBlock(BeanShell.java:509)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.BeanShellAction.invoke(BeanShellAction.java:76)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:416)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:382)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.gui.DefaultInputHandler.handleKey(DefaultInputHandler.java:373)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.input.AbstractInputHandler.processKeyEventKeyStrokeHandling(AbstractInputHandler.java:116)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.gui.InputHandler.processKeyEvent(InputHandler.java:185)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.processKeyEvent(TextArea.java:4591)
8:29:21 PM [error] BeanShellAction: at java.awt.Component.processEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.Container.processEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.Component.dispatchEventImpl(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.Container.dispatchEventImpl(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.Component.dispatchEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.Component.dispatchEventImpl(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.Container.dispatchEventImpl(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.Window.dispatchEventImpl(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.Component.dispatchEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.EventQueue.dispatchEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.EventDispatchThread.run(Unknown Source)
(BTW I can't put this info in the bug tracking system because I'd have to create a sourceforge account. I already created a jedit.org account yesterday and had to wait until today to get login info emailed to me; don't want to create another account somewhere else and keep waiting.)
This is apparently the same bug as #1584436. http://www.jedit.org/CHANGES43.txt says it was fixed in 4.3pre10: "Scrolling up broken after content removing (#1584436) (Matthieu Casanova)". But it apparently wasn't fixed; I'm still getting the error, and somebody else reported it again as #1763932. The changelog for /jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java says #1584436 was fixed in revision 8999. The diff to the previous version shows that all that was changed in this particular file was that a null pointer check and the corresponding error logging were deleted. They included the comment "FIXME - we need to reset the state of this window so that it has the right dimensions again." The offending line of code (both before and after the change), which is causing the null pointer exception, is attempting to dereference a pointer (named "point") which was returned by the function offsetToXY, but offsetToXY is returning null, apparently because screenLine is -1. Hopefully somebody who is familiar with the code can investigate what went wrong.
Before upgrading:
[message] Log: java.version=1.6.0_01
[message] Log: java.vm.version=1.6.0_01-b06
[message] Log: java.runtime.version=1.6.0_01-b06
[message] Log: java.vendor=Sun Microsystems Inc.
[message] Log: java.compiler=null
[message] Log: os.name=Windows Vista
[message] Log: os.version=6.0
[message] Log: os.arch=x86
(snip)
[notice] jEdit: jEdit version 4.3pre9
(snip)
[error] JEditTextArea: BUG: screenLine=-1,visibleLines=45,physicalLine=0,offset=0,firstPhysicalLine=0,lastPhysicalLine=26
[error] BeanShellAction: java.lang.NullPointerException
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.scrollTo(TextArea.java:860)
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.scrollToCaret(TextArea.java:712)
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea._finishCaretUpdate(TextArea.java:5004)
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.finishCaretUpdate(TextArea.java:5156)
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.moveCaretPosition(TextArea.java:2213)
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.moveCaretPosition(TextArea.java:2179)
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.moveCaretPosition(TextArea.java:2168)
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.goToBufferStart(TextArea.java:3128)
[error] BeanShellAction: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] BeanShellAction: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[error] BeanShellAction: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[error] BeanShellAction: at java.lang.reflect.Method.invoke(Unknown Source)
[error] BeanShellAction: at bsh.Reflect.invokeMethod(Reflect.java:134)
[error] BeanShellAction: at bsh.Reflect.invokeObjectMethod(Reflect.java:80)
[error] BeanShellAction: at bsh.Name.invokeMethod(Name.java:858)
[error] BeanShellAction: at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75)
[error] BeanShellAction: at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
[error] BeanShellAction: at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
[error] BeanShellAction: at bsh.BSHBlock.evalBlock(BSHBlock.java:130)
[error] BeanShellAction: at bsh.BSHBlock.eval(BSHBlock.java:80)
[error] BeanShellAction: at bsh.BshMethod.invokeImpl(BshMethod.java:362)
[error] BeanShellAction: at bsh.BshMethod.invoke(BshMethod.java:258)
[error] BeanShellAction: at bsh.BshMethod.invoke(BshMethod.java:186)
[error] BeanShellAction: at org.gjt.sp.jedit.BeanShell.runCachedBlock(BeanShell.java:509)
[error] BeanShellAction: at org.gjt.sp.jedit.BeanShellAction.invoke(BeanShellAction.java:76)
[error] BeanShellAction: at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:416)
[error] BeanShellAction: at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:382)
[error] BeanShellAction: at org.gjt.sp.jedit.gui.DefaultInputHandler.handleKey(DefaultInputHandler.java:373)
[error] BeanShellAction: at org.gjt.sp.jedit.input.AbstractInputHandler.processKeyEventKeyStrokeHandling(AbstractInputHandler.java:116)
[error] BeanShellAction: at org.gjt.sp.jedit.gui.InputHandler.processKeyEvent(InputHandler.java:185)
[error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.processKeyEvent(TextArea.java:4510)
[error] BeanShellAction: at java.awt.Component.processEvent(Unknown Source)
[error] BeanShellAction: at java.awt.Container.processEvent(Unknown Source)
[error] BeanShellAction: at java.awt.Component.dispatchEventImpl(Unknown Source)
[error] BeanShellAction: at java.awt.Container.dispatchEventImpl(Unknown Source)
[error] BeanShellAction: at java.awt.Component.dispatchEvent(Unknown Source)
[error] BeanShellAction: at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
[error] BeanShellAction: at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
[error] BeanShellAction: at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
[error] BeanShellAction: at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
[error] BeanShellAction: at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
[error] BeanShellAction: at java.awt.Component.dispatchEventImpl(Unknown Source)
[error] BeanShellAction: at java.awt.Container.dispatchEventImpl(Unknown Source)
[error] BeanShellAction: at java.awt.Window.dispatchEventImpl(Unknown Source)
[error] BeanShellAction: at java.awt.Component.dispatchEvent(Unknown Source)
[error] BeanShellAction: at java.awt.EventQueue.dispatchEvent(Unknown Source)
[error] BeanShellAction: at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
[error] BeanShellAction: at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
[error] BeanShellAction: at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
[error] BeanShellAction: at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[error] BeanShellAction: at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[error] BeanShellAction: at java.awt.EventDispatchThread.run(Unknown Source)
After upgrading:
3:53:14 AM [message] Log: java.version=1.6.0_02
3:53:14 AM [message] Log: java.vm.version=1.6.0_02-b06
3:53:14 AM [message] Log: java.runtime.version=1.6.0_02-b06
3:53:14 AM [message] Log: java.vendor=Sun Microsystems Inc.
3:53:14 AM [message] Log: java.compiler=null
3:53:14 AM [message] Log: os.name=Windows Vista
3:53:14 AM [message] Log: os.version=6.0
3:53:14 AM [message] Log: os.arch=x86
(snip)
3:53:14 AM [notice] jEdit: jEdit version 4.3pre10
(snip)
8:29:21 PM [error] BeanShellAction: java.lang.NullPointerException
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.scrollTo(TextArea.java:875)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.scrollToCaret(TextArea.java:739)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea._finishCaretUpdate(TextArea.java:5085)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.finishCaretUpdate(TextArea.java:5238)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.moveCaretPosition(TextArea.java:2232)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.moveCaretPosition(TextArea.java:2198)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.moveCaretPosition(TextArea.java:2187)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea._changeLine(TextArea.java:5353)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.goToNextLine(TextArea.java:2456)
8:29:21 PM [error] BeanShellAction: at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
8:29:21 PM [error] BeanShellAction: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.lang.reflect.Method.invoke(Unknown Source)
8:29:21 PM [error] BeanShellAction: at bsh.Reflect.invokeMethod(Reflect.java:134)
8:29:21 PM [error] BeanShellAction: at bsh.Reflect.invokeObjectMethod(Reflect.java:80)
8:29:21 PM [error] BeanShellAction: at bsh.Name.invokeMethod(Name.java:858)
8:29:21 PM [error] BeanShellAction: at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75)
8:29:21 PM [error] BeanShellAction: at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
8:29:21 PM [error] BeanShellAction: at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
8:29:21 PM [error] BeanShellAction: at bsh.BSHBlock.evalBlock(BSHBlock.java:130)
8:29:21 PM [error] BeanShellAction: at bsh.BSHBlock.eval(BSHBlock.java:80)
8:29:21 PM [error] BeanShellAction: at bsh.BshMethod.invokeImpl(BshMethod.java:362)
8:29:21 PM [error] BeanShellAction: at bsh.BshMethod.invoke(BshMethod.java:258)
8:29:21 PM [error] BeanShellAction: at bsh.BshMethod.invoke(BshMethod.java:186)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.BeanShell.runCachedBlock(BeanShell.java:509)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.BeanShellAction.invoke(BeanShellAction.java:76)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:416)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:382)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.gui.DefaultInputHandler.handleKey(DefaultInputHandler.java:373)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.input.AbstractInputHandler.processKeyEventKeyStrokeHandling(AbstractInputHandler.java:116)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.gui.InputHandler.processKeyEvent(InputHandler.java:185)
8:29:21 PM [error] BeanShellAction: at org.gjt.sp.jedit.textarea.TextArea.processKeyEvent(TextArea.java:4591)
8:29:21 PM [error] BeanShellAction: at java.awt.Component.processEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.Container.processEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.Component.dispatchEventImpl(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.Container.dispatchEventImpl(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.Component.dispatchEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.Component.dispatchEventImpl(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.Container.dispatchEventImpl(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.Window.dispatchEventImpl(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.Component.dispatchEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.EventQueue.dispatchEvent(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
8:29:21 PM [error] BeanShellAction: at java.awt.EventDispatchThread.run(Unknown Source)
(BTW I can't put this info in the bug tracking system because I'd have to create a sourceforge account. I already created a jedit.org account yesterday and had to wait until today to get login info emailed to me; don't want to create another account somewhere else and keep waiting.)
This is apparently the same bug as #1584436. http://www.jedit.org/CHANGES43.txt says it was fixed in 4.3pre10: "Scrolling up broken after content removing (#1584436) (Matthieu Casanova)". But it apparently wasn't fixed; I'm still getting the error, and somebody else reported it again as #1763932. The changelog for /jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java says #1584436 was fixed in revision 8999. The diff to the previous version shows that all that was changed in this particular file was that a null pointer check and the corresponding error logging were deleted. They included the comment "FIXME - we need to reset the state of this window so that it has the right dimensions again." The offending line of code (both before and after the change), which is causing the null pointer exception, is attempting to dereference a pointer (named "point") which was returned by the function offsetToXY, but offsetToXY is returning null, apparently because screenLine is -1. Hopefully somebody who is familiar with the code can investigate what went wrong.