Magicento icon indicating copy to clipboard operation
Magicento copied to clipboard

Error while indexing

Open Schrank opened this issue 11 years ago • 4 comments

Opened PHPStorm EAP 7.1 build 133.214

Error while indexing     /.../app/code/local/Aitoc/Aitsys/Abstract/Model.php
To reindex this file IDEA has to be restarted
java.lang.NullPointerException
at com.magicento.helpers.MagentoParser.getClassType(MagentoParser.java:502)
at com.magicento.helpers.MagentoParser.isCollection(MagentoParser.java:542)
at com.magicento.helpers.MagentoParser.getUriType(MagentoParser.java:282)
at com.magicento.extensions.FactoryTypeProvider2.getType(FactoryTypeProvider2.java:66)
at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo$1.internalCompute(PhpTypeInfo.java:42)
at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo$1.internalCompute(PhpTypeInfo.java:37)
at com.intellij.openapi.util.Computable$NotNullCachedComputable.compute(Computable.java:52)
at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo.getType(PhpTypeInfo.java:37)
at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.getType(PhpReferenceImpl.java:152)
at com.jetbrains.php.lang.psi.resolve.types.PhpType.add(PhpType.java:153)
at com.jetbrains.php.lang.psi.elements.impl.FunctionImpl$3.visitPhpReturn(FunctionImpl.java:276)
at com.jetbrains.php.lang.psi.elements.impl.PhpReturnImpl.accept(PhpReturnImpl.java:19)
at com.jetbrains.php.lang.psi.visitors.PhpRecursiveElementVisitor.visitElement(PhpRecursiveElementVisitor.java:44)
at com.jetbrains.php.lang.psi.visitors.PhpElementVisitor.visitPhpElement(PhpElementVisitor.java:35)
at com.jetbrains.php.lang.psi.visitors.PhpElementVisitor.visitPhpGroupStatement(PhpElementVisitor.java:219)
at com.jetbrains.php.lang.psi.elements.impl.GroupStatementImpl.accept(GroupStatementImpl.java:60)
at com.jetbrains.php.lang.psi.visitors.PhpRecursiveElementVisitor.visitElement(PhpRecursiveElementVisitor.java:44)
at com.jetbrains.php.lang.psi.visitors.PhpElementVisitor.visitPhpElement(PhpElementVisitor.java:35)
at com.jetbrains.php.lang.psi.visitors.PhpElementVisitor.visitPhpMethod(PhpElementVisitor.java:43)
at com.jetbrains.php.lang.psi.elements.impl.MethodImpl.accept(MethodImpl.java:98)
at com.jetbrains.php.lang.psi.elements.impl.FunctionImpl.getLocalType(FunctionImpl.java:242)
at com.jetbrains.php.lang.psi.stubs.PhpMethodElementType.createStub(PhpMethodElementType.java:30)
at com.jetbrains.php.lang.psi.stubs.PhpMethodElementType.createStub(PhpMethodElementType.java:20)
at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTreeFor(DefaultStubBuilder.java:58)
at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTree(DefaultStubBuilder.java:36)
at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:78)
at com.intellij.psi.stubs.StubUpdatingIndex$3$1.run(StubUpdatingIndex.java:131)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:913)
at com.intellij.psi.stubs.StubUpdatingIndex$3.map(StubUpdatingIndex.java:128)
at com.intellij.psi.stubs.StubUpdatingIndex$3.map(StubUpdatingIndex.java:122)
at com.intellij.util.indexing.MapReduceIndex.update(MapReduceIndex.java:208)
at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1788)
at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1728)
at com.intellij.util.indexing.UnindexedFilesUpdater.processFile(UnindexedFilesUpdater.java:71)
at com.intellij.openapi.project.CacheUpdateSession.processFile(CacheUpdateSession.java:102)
at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable$1.run(CacheUpdateRunner.java:242)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:924)
at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable$2.run(CacheUpdateRunner.java:252)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.run(CacheUpdateRunner.java:247)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:436)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:153)

Schrank avatar Dec 14 '13 12:12 Schrank

@Schrank I've added some extra checks to avoid Null Pointers here, is this happening all the time? is blocking the IDE someway? Thanks !

enriquepiatti avatar Dec 16 '13 11:12 enriquepiatti

No blocking in the EAP, just the log entry. It only appears on this single file app/code/local/Aitoc/Aitsys/Abstract/Model.php in this one project

Schrank avatar Dec 16 '13 12:12 Schrank

Make that more general. When I enable Magicento in the EAP PS-133.626 then auto-complete of class names, functions, methods etc. no longer work.

I guess it's blocked by the "write at least one character" dialogue because with class names the auto-complete for static methods neither work.

In addition: Auto-complete in doc-comments still work.

ScreamingDev avatar Feb 02 '14 22:02 ScreamingDev

@sourcerer-mike are you sure that is related with this bug? I think I'm not understanding exactly your problem, could you add some screencaps or more details about it? Do you mean the Ctrl+Space autocomplete is not working when you try to complete the class name? (this feature: http://magicento.com/#feature3 )

enriquepiatti avatar Feb 02 '14 23:02 enriquepiatti