Menu

#3932 createTextArea() function call results a NullPointerException

minor bug
closed-works-for-me
None
2
2020-05-02
2015-10-15
No

createTextArea() function call results a NullPointerException, it seems not all the property files set/loaded correctly.

In createTextArea(), only these files are loaded:
props.putAll(loadProperties("/keymaps/jEdit_keys.props"));
props.putAll(loadProperties("/org/gjt/sp/jedit/jedit.props"));

However later the implemented jEdit code wanted to use a property which is not palced in these files:
StandaloneTextArea() -> initTextArea() -> initPainter() ->
painter.setAntiAlias(new AntiAlias(getProperty("view.antiAlias")));

As I see this one is placed in:
/org/gjt/sp/jedit/jedit_gui.props

Maybe the above mentioned file should be loaded as well, but this is just my idea.
Can you please check this bug?
Below I place the null pointer exception printiout.

java -cp . org.gjt.sp.jedit.textarea.StandaloneTextArea
Exception in thread "main" java.lang.NullPointerException
at org.gjt.sp.jedit.textarea.AntiAlias.fromString(AntiAlias.java:96)
at org.gjt.sp.jedit.textarea.AntiAlias.<init>(AntiAlias.java:84)
at org.gjt.sp.jedit.textarea.StandaloneTextArea.initPainter(StandaloneTextArea.java:296)
at org.gjt.sp.jedit.textarea.StandaloneTextArea.initTextArea(StandaloneTextArea.java:178)
at org.gjt.sp.jedit.textarea.StandaloneTextArea.<init>(StandaloneTextArea.java:139)
at org.gjt.sp.jedit.textarea.StandaloneTextArea.createTextArea(StandaloneTextArea.java:542)
at org.gjt.sp.jedit.textarea.StandaloneTextArea.main(StandaloneTextArea.java:644)

jEdit version: 5.2.0

Discussion

  • Matthieu Casanova

    • status: open --> closed-works-for-me
    • assigned_to: Matthieu Casanova
     
  • Matthieu Casanova

    It is working now with latest trunk

     

Log in to post a comment.