[ 
https://issues.apache.org/jira/browse/NETBEANS-2938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16898396#comment-16898396
 ] 

Travis edited comment on NETBEANS-2938 at 8/1/19 10:03 PM:
-----------------------------------------------------------

With the gutted file, after deleting the entire cache folder and restarting 
Netbeans 11.0, I got:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1

at java.lang.String.substring(String.java:1967)
 at 
org.netbeans.modules.java.j2seplatform.queries.QueriesCache.getURL(QueriesCache.java:156)
 at 
org.netbeans.modules.java.j2seplatform.queries.QueriesCache.loadRoots(QueriesCache.java:123)
 at 
org.netbeans.modules.java.j2seplatform.queries.QueriesCache.getRoots(QueriesCache.java:71)
 at 
org.netbeans.modules.java.j2seplatform.queries.DefaultSourceForBinaryQuery.findSourceRoots2(DefaultSourceForBinaryQuery.java:37)
 at 
org.netbeans.api.java.queries.SourceForBinaryQuery.findSourceRoots2(SourceForBinaryQuery.java:101)
 at 
org.netbeans.modules.parsing.impl.indexing.PathRegistry.createResources(PathRegistry.java:728)
 at 
org.netbeans.modules.parsing.impl.indexing.PathRegistry.getSources(PathRegistry.java:275)
 at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$RootsWork.getDone(RepositoryUpdater.java:4888)
 [catch] at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:3420)
 at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:6183)
 at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.access$4300(RepositoryUpdater.java:5834)
 at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2$1.run(RepositoryUpdater.java:6099)
 at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
 at 
org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.performScan(RunWhenScanFinishedSupport.java:83)
 at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6095)
 at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6091)
 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$Task.run(RepositoryUpdater.java:6091)
 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)


was (Author: furrer):
With the gutted file, after deleting the entire cache folder and restarting 
Netbeans, I got:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1

at java.lang.String.substring(String.java:1967)
 at 
org.netbeans.modules.java.j2seplatform.queries.QueriesCache.getURL(QueriesCache.java:156)
 at 
org.netbeans.modules.java.j2seplatform.queries.QueriesCache.loadRoots(QueriesCache.java:123)
 at 
org.netbeans.modules.java.j2seplatform.queries.QueriesCache.getRoots(QueriesCache.java:71)
 at 
org.netbeans.modules.java.j2seplatform.queries.DefaultSourceForBinaryQuery.findSourceRoots2(DefaultSourceForBinaryQuery.java:37)
 at 
org.netbeans.api.java.queries.SourceForBinaryQuery.findSourceRoots2(SourceForBinaryQuery.java:101)
 at 
org.netbeans.modules.parsing.impl.indexing.PathRegistry.createResources(PathRegistry.java:728)
 at 
org.netbeans.modules.parsing.impl.indexing.PathRegistry.getSources(PathRegistry.java:275)
 at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$RootsWork.getDone(RepositoryUpdater.java:4888)
[catch] at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:3420)
 at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:6183)
 at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.access$4300(RepositoryUpdater.java:5834)
 at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2$1.run(RepositoryUpdater.java:6099)
 at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
 at 
org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.performScan(RunWhenScanFinishedSupport.java:83)
 at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6095)
 at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6091)
 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$Task.run(RepositoryUpdater.java:6091)
 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)

> StringIndexOutOfBoundsException while parsing Java 12 sources
> -------------------------------------------------------------
>
>                 Key: NETBEANS-2938
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-2938
>             Project: NetBeans
>          Issue Type: Bug
>          Components: java - Source
>    Affects Versions: 11.0, 11.1
>         Environment: Windows 10
> Netbeans 11.0 or 11.1, with nb-javac 1.6
> OpenJDK 12
> JavaFX 12
> Gradle 5.5
>            Reporter: Travis
>            Priority: Major
>
> With Netbeans 11.0 on Windows, after updating from JDK 8 to OpenJDK 12 + 
> JavaFX 12, I started getting the following exception.
> After this exception, since the source scan failed various IDE features don't 
> work (Navigator pane says "Please Wait" forever, can't Navigate sources using 
> operations like "Go to Declaration", code refactoring doesn't work, etc).  
> The IDE is pretty useless while in this state.
> Strangely, I am running Netbeans 11.0 on Linux and didn't have this same 
> problem there.
> I saw this on proprietry code, and can't share it.  If necessary I could try 
> to provide a tiny code example that demonstrates the same issue.
>  
> An error occurred during parsing of 'C:\<redacted>.java'. Please report a bug 
> against java/source and attach dump file 'C:\<redacted>.dump'.
>  Caused: java.lang.StringIndexOutOfBoundsException: String index out of 
> range: -1
>  at java.lang.String.substring(String.java:1967)
>  at 
> org.netbeans.modules.java.j2seplatform.queries.QueriesCache.getURL(QueriesCache.java:156)
>  at 
> org.netbeans.modules.java.j2seplatform.queries.QueriesCache.loadRoots(QueriesCache.java:123)
>  at 
> org.netbeans.modules.java.j2seplatform.queries.QueriesCache.getRoots(QueriesCache.java:71)
>  at 
> org.netbeans.modules.java.j2seplatform.queries.DefaultSourceForBinaryQuery.findSourceRoots2(DefaultSourceForBinaryQuery.java:37)
>  at 
> org.netbeans.api.java.queries.SourceForBinaryQuery.findSourceRoots2(SourceForBinaryQuery.java:101)
>  at 
> org.netbeans.modules.parsing.impl.indexing.PathRegistry.sourceForBinaryQuery(PathRegistry.java:191)
>  at 
> org.netbeans.modules.parsing.impl.indexing.PathRegistry.sourceForBinaryQuery(PathRegistry.java:168)
>  at 
> org.netbeans.modules.java.source.classpath.CacheClassPath.getResources(CacheClassPath.java:148)
>  at org.netbeans.api.java.classpath.ClassPath.entries(ClassPath.java:363)
>  at 
> org.netbeans.modules.java.source.parsing.CachingFileManager.list(CachingFileManager.java:115)
>  at 
> org.netbeans.modules.java.source.parsing.ProxyFileManager.list(ProxyFileManager.java:115)
>  at com.sun.tools.javac.code.ClassFinder.list(ClassFinder.java:801)
>  at com.sun.tools.javac.code.ClassFinder.scanUserPaths(ClassFinder.java:709)
>  at com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:589)
>  at com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:312)
>  at com.sun.tools.javac.code.Symbol.complete(Symbol.java:645)
>  at com.sun.tools.javac.code.Symbol$PackageSymbol.members(Symbol.java:1142)
>  at com.sun.tools.javac.code.Symtab.listPackageModules(Symtab.java:860)
>  at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:390)
>  at 
> com.sun.tools.javadoc.main.JavadocEnter.visitTopLevel(JavadocEnter.java:89)
>  at 
> org.netbeans.lib.nbjavac.services.NBJavadocEnter.visitTopLevel(NBJavadocEnter.java:87)
>  at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:537)
>  at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:328)
>  at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:343)
>  at com.sun.tools.javac.comp.Enter.complete(Enter.java:813)
>  at 
> org.netbeans.lib.nbjavac.services.NBJavadocEnter.main(NBJavadocEnter.java:67)
>  at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1142)
>  at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:399)
>  at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:327)
>  at 
> org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:623)
>  at 
> org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:484)
>  at 
> org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:136)
>  at 
> org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:608)
>  at 
> org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:239)
>  at 
> org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:775)
>  at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
>  at 
> org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
>  [catch] 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)



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to