niorgai/Android-Resource-Usage-Count

更新了新版本报错,之前的版本在win机器上好像也不好使,在mac上可以

Opened this issue · 3 comments

Android Sutdio 3.0 Canary 9
image

null
java.lang.NullPointerException
	at com.intellij.psi.impl.source.xml.XmlDocumentImpl.getDefaultNSDescriptorInner(XmlDocumentImpl.java:236)
	at com.intellij.psi.impl.source.xml.XmlDocumentImpl.lambda$getDefaultNSDescriptor$0(XmlDocumentImpl.java:189)
	at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
	at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
	at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:60)
	at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
	at com.intellij.psi.impl.source.xml.XmlDocumentImpl.getDefaultNSDescriptor(XmlDocumentImpl.java:200)
	at com.intellij.psi.impl.source.xml.XmlTagImpl.getNSDescriptor(XmlTagImpl.java:268)
	at com.intellij.psi.impl.source.xml.XmlTagImpl.getNSDescriptor(XmlTagImpl.java:271)
	at com.intellij.psi.impl.source.xml.XmlTagImpl.getNSDescriptor(XmlTagImpl.java:271)
	at com.intellij.psi.impl.source.xml.XmlTagImpl.getNSDescriptor(XmlTagImpl.java:271)
	at com.intellij.psi.impl.source.xml.XmlTagImpl.computeElementDescriptor(XmlTagImpl.java:501)
	at com.intellij.psi.impl.source.xml.XmlTagImpl.lambda$getDescriptor$3(XmlTagImpl.java:467)
	at com.intellij.psi.util.CachedValuesManager.lambda$getCachedValue$0(CachedValuesManager.java:141)
	at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
	at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
	at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:60)
	at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
	at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:87)
	at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:140)
	at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:127)
	at com.intellij.psi.impl.source.xml.XmlTagImpl.getDescriptor(XmlTagImpl.java:466)
	at com.intellij.xml.util.XmlEnumeratedValueReferenceProvider$1.getDescriptor(XmlEnumeratedValueReferenceProvider.java:87)
	at com.intellij.xml.util.XmlEnumeratedValueReferenceProvider$1.getDescriptor(XmlEnumeratedValueReferenceProvider.java:83)
	at com.intellij.xml.util.XmlEnumeratedValueReferenceProvider.getReferencesByElement(XmlEnumeratedValueReferenceProvider.java:57)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.getReferences(ReferenceProvidersRegistryImpl.java:135)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.mapNotEmptyReferencesFromProviders(ReferenceProvidersRegistryImpl.java:123)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.doGetReferencesFromProviders(ReferenceProvidersRegistryImpl.java:102)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:66)
	at com.intellij.psi.impl.source.xml.XmlTagImpl.getReferences(XmlTagImpl.java:202)
	at com.intellij.psi.PsiReferenceServiceImpl.getReferences(PsiReferenceServiceImpl.java:35)
	at com.intellij.psi.search.SingleTargetRequestResultProcessor.processTextOccurrence(SingleTargetRequestResultProcessor.java:46)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$3.lambda$execute$0(PsiSearchHelperImpl.java:752)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processTreeUp(LowLevelSearchUtil.java:138)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processElementsAtOffsets(LowLevelSearchUtil.java:224)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$3.execute(PsiSearchHelperImpl.java:748)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$2.processInReadAction(PsiSearchHelperImpl.java:245)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$2.processInReadAction(PsiSearchHelperImpl.java:236)
	at com.intellij.openapi.application.ReadActionProcessor.lambda$process$0(ReadActionProcessor.java:29)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:942)
	at com.intellij.openapi.application.ReadActionProcessor.process(ReadActionProcessor.java:29)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processCandidates$13(PsiSearchHelperImpl.java:710)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processVirtualFile$5(PsiSearchHelperImpl.java:419)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1150)
	at com.intellij.openapi.application.ex.ApplicationUtil.tryRunReadAction(ApplicationUtil.java:39)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.processVirtualFile(PsiSearchHelperImpl.java:403)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processPsiFileRoots$2(PsiSearchHelperImpl.java:321)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processFilesConcurrentlyDespiteWriteActions$3(PsiSearchHelperImpl.java:349)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:133)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:556)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
	at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:116)
	at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:142)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:242)
	at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
	at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.pollAndExecCC(ForkJoinPool.java:1190)
	at java.util.concurrent.ForkJoinPool.helpComplete(ForkJoinPool.java:1879)
	at java.util.concurrent.ForkJoinPool.awaitJoin(ForkJoinPool.java:2045)
	at java.util.concurrent.ForkJoinTask.doJoin(ForkJoinTask.java:390)
	at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:719)
	at java.util.concurrent.ForkJoinPool.invoke(ForkJoinPool.java:2616)
	at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyUnderProgress(JobLauncherImpl.java:63)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.processFilesConcurrentlyDespiteWriteActions(PsiSearchHelperImpl.java:372)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.processPsiFileRoots(PsiSearchHelperImpl.java:319)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.processCandidates(PsiSearchHelperImpl.java:706)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.processGlobalRequestsOptimized(PsiSearchHelperImpl.java:688)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.processRequests(PsiSearchHelperImpl.java:604)
	at FindUsageUtils$2.generate(FindUsageUtils.java:137)
	at UsageCountLineProvider.findTagUsage(UsageCountLineProvider.java:96)
	at UsageCountLineProvider.getLineMarkerInfo(UsageCountLineProvider.java:32)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:186)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.lambda$doCollectInformation$3(LineMarkersPass.java:111)
	at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:96)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:106)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:438)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1156)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:431)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:556)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:430)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:406)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:142)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:242)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:404)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:165)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

痛苦...总觉得 IDE 的向后兼容不太靠谱.. 等 3.0 出 stable 版本我再跟进吧

Android Studio 3.0 Beta 6
Build #AI-171.4333198, built on September 14, 2017
JRE: 1.8.0_152-release-915-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6

刚刚试了一下这个版本, 好像修复了