#3805 NPE at TextArea.scrollTo() from generate modes list

closed-fixed
Thomas Meyer
7
2013-10-10
2013-06-02
Alan Ezust
No

This might be a plugin bug, I am not sure yet.
It is generating HTML... And I can reproduce this without HTMLSideKick, so it is probably not sidekick related.

Executing the macro "generate encodings list", I get the exception below:
11:35:14 AM [AWT-EventQueue-0] [error] Buffer: Exception while sending buffer event to org.gjt.sp.jedit.textarea.BufferHandler@60d2f02f :
11:35:14 AM [AWT-EventQueue-0] [error] Buffer: java.lang.NullPointerException
11:35:14 AM [AWT-EventQueue-0] [error] Buffer: at org.gjt.sp.jedit.textarea.TextArea.scrollTo(TextArea.java:857)
11:35:14 AM [AWT-EventQueue-0] [error] Buffer: at org.gjt.sp.jedit.textarea.TextArea.scrollToCaret(TextArea.java:713)
11:35:14 AM [AWT-EventQueue-0] [error] Buffer: at org.gjt.sp.jedit.textarea.TextArea._finishCaretUpdate(TextArea.java:5118)
11:35:14 AM [AWT-EventQueue-0] [error] Buffer: at org.gjt.sp.jedit.textarea.BufferHandler.transactionComplete(BufferHandler.java:334)
11:35:14 AM [AWT-EventQueue-0] [error] Buffer: at org.gjt.sp.jedit.buffer.JEditBuffer.fireTransactionComplete(JEditBuffer.java:2561)
11:35:14 AM [AWT-EventQueue-0] [error] Buffer: at org.gjt.sp.jedit.buffer.JEditBuffer.endCompoundEdit(JEditBuffer.java:2223)
11:35:14 AM [AWT-EventQueue-0] [error] Buffer: at org.gjt.sp.jedit.Macros$Macro.invoke(Macros.java:577)
11:35:14 AM [AWT-EventQueue-0] [error] Buffer: at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:342)
11:35:14 AM [AWT-EventQueue-0] [error] Buffer: at org.gjt.sp.jedit.jEdit$4.invokeAction(jEdit.java:3423)
11:35:14 AM [AWT-EventQueue-0] [error] Buffer: at org.gjt.sp.jedit.jEdit$4.invokeAction(jEdit.java:3405)
11:35:14 AM [AWT-EventQueue-0] [error] Buffer: at org.gjt.sp.jedit.EditAction$Wrapper.actionPerformed(EditAction.java:212)
11:35:14 AM [AWT-EventQueue-0] [error] Buffer: at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
11:35:14 AM [AWT-EventQueue-0] [error] Buffer: at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
11:35:14 AM [AWT-EventQueue-0] [error] Buffer: at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)

Reproducible with my current combination of settings and plugins. Activity log attached.
I may need to do further testing to determine why it reproduces with my settings not with -noplugins.

Discussion

  • Alan Ezust
    Alan Ezust
    2013-06-02

    shorter activity log with -noplugins

     
    Attachments
  • Alan Ezust
    Alan Ezust
    2013-06-02

    I can reproduce this with -noplugins.
    shorter activity log attached.

     
  • Alan Ezust
    Alan Ezust
    2013-06-03

    This issue seems to be related to soft-wrap.
    If you don't have line wrap, this does not reproduce.
    I have soft wrap, margin 0 for the HTML edit mode.

     
  • Alan Ezust
    Alan Ezust
    2013-08-08

    • assigned_to: nobody --> thomasmey
     
  • Alan Ezust
    Alan Ezust
    2013-08-08

    • priority: 5 --> 7
     
  • Alan Ezust
    Alan Ezust
    2013-08-14

    • summary: NPE at TextArea.scrollTo() from generate encodings list --> NPE at TextArea.scrollTo() from generate modes list
     
  • Alan Ezust
    Alan Ezust
    2013-08-14

    Ok, I found out that by commenting out the
    htmlBuffer.setBooleanProperty("elasticTabstops", true);
    line, the exception does not happen. So it seems to be related to elastic tabstops.

     
  • Thomas Meyer
    Thomas Meyer
    2013-10-10

    I created the encodingsList.html file by using the Generate Encodings List.bsh macro. then I switched to softwrap mode. what exactly did you do to create this exception? I can not reproduce this from what I see in the action log. any hint is welcome!

     
  • Alan Ezust
    Alan Ezust
    2013-10-10

    This seems to be fixed in 5.2pre1. But I can still reproduce it from jEdit 5.1
    I will re-open it if I see it happen again.

     
  • Alan Ezust
    Alan Ezust
    2013-10-10

    • status: open --> closed-fixed