Menu

#3110 NPE after close buffer with 2 views and view-scope bufferset

closed-fixed
None
5
2015-02-09
2008-06-06
Alan Ezust
No

I have 2 views, each with a View-scope bufferset.

I close the buffer in one of the views. There are no other buffers in that bufferset. What should it do at this point? Perhaps open an untitled buffer?
but it does not.

java.lang.NullPointerException
at org.gjt.sp.jedit.jEdit.removeBufferFromList(jEdit.java:3864)
at org.gjt.sp.jedit.jEdit._closeBuffer(jEdit.java:1745)
at org.gjt.sp.jedit.bufferset.BufferSetManager.removeBuffer(BufferSetManager.java:188)
at org.gjt.sp.jedit.bufferset.BufferSet.addBufferAt(BufferSet.java:114)
at org.gjt.sp.jedit.bufferset.BufferSet.addBuffer(BufferSet.java:67)
at org.gjt.sp.jedit.bufferset.BufferSetManager.addBuffer(BufferSetManager.java:144)
at org.gjt.sp.jedit.jEdit.openFile(jEdit.java:1515)
at org.gjt.sp.jedit.jEdit.newFile(jEdit.java:1651)
at org.gjt.sp.jedit.jEdit.newFile(jEdit.java:1636)
at org.gjt.sp.jedit.jEdit._closeBuffer(jEdit.java:1755)
at org.gjt.sp.jedit.bufferset.BufferSetManager.removeBuffer(BufferSetManager.java:188)
at org.gjt.sp.jedit.bufferset.BufferSet.addBufferAt(BufferSet.java:114)
at org.gjt.sp.jedit.bufferset.BufferSet.addBuffer(BufferSet.java:67)
at org.gjt.sp.jedit.bufferset.BufferSetManager.addBuffer(BufferSetManager.java:144)
at org.gjt.sp.jedit.jEdit.openFile(jEdit.java:1515)
at org.gjt.sp.jedit.jEdit.newFile(jEdit.java:1651)
at org.gjt.sp.jedit.jEdit.newFile(jEdit.java:1636)
at org.gjt.sp.jedit.jEdit._closeBuffer(jEdit.java:1755)
at org.gjt.sp.jedit.jEdit.closeBuffer(jEdit.java:1698)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.gjt.sp.jedit.bsh.Reflect.invokeMethod(Reflect.java:134)
at org.gjt.sp.jedit.bsh.Reflect.invokeStaticMethod(Reflect.java:98)
at org.gjt.sp.jedit.bsh.Name.invokeMethod(Name.java:871)
at org.gjt.sp.jedit.bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75)
at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
at org.gjt.sp.jedit.bsh.BSHBlock.evalBlock(BSHBlock.java:130)
at org.gjt.sp.jedit.bsh.BSHBlock.eval(BSHBlock.java:80)
at org.gjt.sp.jedit.bsh.BshMethod.invokeImpl(BshMethod.java:362)
at org.gjt.sp.jedit.bsh.BshMethod.invoke(BshMethod.java:258)
at org.gjt.sp.jedit.bsh.BshMethod.invoke(BshMethod.java:186)
at org.gjt.sp.jedit.BeanShellFacade.runCachedBlock(BeanShellFacade.java:223)
at org.gjt.sp.jedit.BeanShell.runCachedBlock(BeanShell.java:443)
at org.gjt.sp.jedit.BeanShellAction.invoke(BeanShellAction.java:76)
at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:348)
at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:314)
at org.gjt.sp.jedit.gui.DefaultInputHandler.handleKey(DefaultInputHandler.java:197)
at org.gjt.sp.jedit.input.AbstractInputHandler.processKeyEventKeyStrokeHandling(AbstractInputHandler.java:364)
at org.gjt.sp.jedit.gui.InputHandler.processKeyEvent(InputHandler.java:149)
at org.gjt.sp.jedit.textarea.TextArea.processKeyEvent(TextArea.java:4756)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Discussion

  • Matthieu Casanova

    • status: open --> closed-fixed
     
  • Matthieu Casanova

    Logged In: YES
    user_id=285591
    Originator: NO

    It is now fixed, and also a bug when you close your last buffer, you close the new untitled buffer and the previous buffer reopens (if was is still available in another bufferSet

     

Log in to post a comment.