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

Exception after Insert Code (Alt Insert) is clicked

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 10.0
    • None
    • javascript - Editor
    • None

    Description

      When PHP class file is edited some methods are for example removed, file is saved and than user clicks on Insert Code it display empty dialog with just Cancel button.

      After few minutes when one processor core seems to be busy user can successfully try to open Insert Code dialog  again. 

      At the time when emty dialog is opened an exception appears in message.log:

      INFO [org.netbeans.modules.javascript2.editor.parser.SanitizingParser]: Exception during parsing
      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
          at java.lang.AbstractStringBuilder.charAt(AbstractStringBuilder.java:237)
          at java.lang.StringBuilder.charAt(StringBuilder.java:76)
          at org.netbeans.modules.javascript2.editor.parser.SanitizingParser.isParsable(SanitizingParser.java:179)
          at org.netbeans.modules.javascript2.editor.parser.SanitizingParser.parseSource(SanitizingParser.java:112)
      [catch] at org.netbeans.modules.javascript2.editor.parser.SanitizingParser.parse(SanitizingParser.java:78)
          at org.netbeans.modules.parsing.impl.TaskProcessor.callParse(TaskProcessor.java:598)
          at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:228)
          at org.netbeans.modules.parsing.api.ResultIterator.getParserResult(ResultIterator.java:115)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$2.run(RepositoryUpdater.java:3171)
          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)
          at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:81)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.indexEmbedding(RepositoryUpdater.java:3143)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doIndex(RepositoryUpdater.java:2862)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.access$800(RepositoryUpdater.java:2154)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$1.run(RepositoryUpdater.java:2636)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$1.run(RepositoryUpdater.java:2634)
          at org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.refreshTransaction(TaskCache.java:540)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.index(RepositoryUpdater.java:2634)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$3.call(RepositoryUpdater.java:3300)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$3.call(RepositoryUpdater.java:3255)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$4.run(RepositoryUpdater.java:2127)
          at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2123)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2104)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.access$1500(RepositoryUpdater.java:136)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.scanFiles(RepositoryUpdater.java:3255)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$FileListWork.getDone(RepositoryUpdater.java:3785)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:3420)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$1T.run(RepositoryUpdater.java:403)
          at org.netbeans.modules.parsing.impl.indexing.SuspendSupport.runWithNoSuspend(SuspendSupport.java:107)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$1T.call(RepositoryUpdater.java:408)
          at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$1T.call(RepositoryUpdater.java:400)
          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.indexing.RepositoryUpdater.enforcedFileListUpdate(RepositoryUpdater.java:414)
          at org.netbeans.modules.parsing.spi.indexing.support.QuerySupport$Query$1.call(QuerySupport.java:619)
          at org.netbeans.modules.parsing.spi.indexing.support.QuerySupport$Query$1.call(QuerySupport.java:590)
          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.spi.indexing.support.QuerySupport$Query.execute(QuerySupport.java:590)
          at org.netbeans.modules.parsing.spi.indexing.support.QuerySupport.query(QuerySupport.java:342)
          at org.netbeans.modules.php.editor.elements.IndexQueryImpl.search(IndexQueryImpl.java:1676)
          at org.netbeans.modules.php.editor.elements.IndexQueryImpl.results(IndexQueryImpl.java:1714)
          at org.netbeans.modules.php.editor.elements.IndexQueryImpl.results(IndexQueryImpl.java:1709)
          at org.netbeans.modules.php.editor.elements.IndexQueryImpl.getClassesImpl(IndexQueryImpl.java:178)
          at org.netbeans.modules.php.editor.elements.IndexQueryImpl.getClasses(IndexQueryImpl.java:1841)
          at org.netbeans.modules.php.editor.elements.IndexQueryImpl.getClasses(IndexQueryImpl.java:1779)
          at org.netbeans.modules.php.editor.codegen.CGSInfo.initProperties(CGSInfo.java:254)
          at org.netbeans.modules.php.editor.codegen.CGSInfo.access$000(CGSInfo.java:81)
          at org.netbeans.modules.php.editor.codegen.CGSInfo$1.run(CGSInfo.java:231)
          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)
          at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:81)
          at org.netbeans.modules.php.editor.codegen.CGSInfo.findPropertyInScope(CGSInfo.java:227)
          at org.netbeans.modules.php.editor.codegen.CGSInfo.getCGSInfo(CGSInfo.java:121)
          at org.netbeans.modules.php.editor.codegen.CGSGenerator$Factory.create(CGSGenerator.java:458)
          at org.netbeans.modules.editor.codegen.NbGenerateCodeAction$Task.run(NbGenerateCodeAction.java:156)
          at org.netbeans.modules.editor.codegen.NbGenerateCodeAction$1.run(NbGenerateCodeAction.java:74)
          at org.netbeans.modules.progress.ui.RunOffEDTImpl$1.run(RunOffEDTImpl.java:146)
          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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            alesak Ales Seifert

            Dates

              Created:
              Updated:

              Slack

                Issue deployment