Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5155

NPE in PHP Smarty tpl files

    XMLWordPrintableJSON

Details

    Description

      Netbeans 12.2 reports NullPointerException when editing many of tpl files (Smarty templates). It looks like the NPE is shown if the file contains an html <script> tag. If a file has no <script> tags and I add one then the NPE is immediately shown. I'm still beginning to use version 12.2 and so far I haven't noticed any problems this NPE causes in practical use apart from being an annoyance but I suppose it might break something I'm not aware of. This problem did not happen in 12.1.

      The plugin manager says I have version 1.97 of Smarty Framework. The problem occurs both on Oracle Java 1.8 and on JDK 11.

      Here is the exception:

      java.lang.NullPointerException: Null keyjava.lang.NullPointerException: Null key at java.util.prefs.AbstractPreferences.get(AbstractPreferences.java:280) at java.util.prefs.AbstractPreferences.getBoolean(AbstractPreferences.java:500) at org.netbeans.modules.javascript2.editor.hints.ErrorCheckingSupport.isErrorCheckingEnabledForMimetype(ErrorCheckingSupport.java:73) at org.netbeans.modules.javascript2.editor.hints.JsHintsProvider.computeErrors(JsHintsProvider.java:140) at org.netbeans.modules.csl.hints.GsfHintsProvider.processProviderErrors(GsfHintsProvider.java:297) at org.netbeans.modules.csl.hints.GsfHintsProvider.processErrors(GsfHintsProvider.java:383) at org.netbeans.modules.csl.hints.GsfHintsProvider.processErrorsRecursive(GsfHintsProvider.java:359) at org.netbeans.modules.csl.hints.GsfHintsProvider.processErrorsRecursive(GsfHintsProvider.java:354) at org.netbeans.modules.csl.hints.GsfHintsProvider.refreshErrors(GsfHintsProvider.java:327) at org.netbeans.modules.csl.hints.GsfHintsProvider.access$200(GsfHintsProvider.java:79) at org.netbeans.modules.csl.hints.GsfHintsProvider$2.run(GsfHintsProvider.java:407) at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586) at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:130) at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:114) at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181) at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178) at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153) at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335) at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118) at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67) at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)Caused: org.netbeans.modules.parsing.spi.ParseException at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:186) at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:81)[catch] at org.netbeans.modules.csl.hints.GsfHintsProvider.run(GsfHintsProvider.java:405) at org.netbeans.modules.csl.hints.GsfHintsProvider.run(GsfHintsProvider.java:79) at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561) at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:786) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279) at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702) at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

       

      Attachments

        Issue Links

          Activity

            People

              sdedic Svatopluk Dedic
              michal.lemon Michal Koscielny
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m