{"action":"created","issue":{"url":"https://api.github.com/repos/TiVo/intellij-haxe/issues/496","repository_url":"https://api.github.com/repos/TiVo/intellij-haxe","labels_url":"https://api.github.com/repos/TiVo/intellij-haxe/issues/496/labels{/name}","comments_url":"https://api.github.com/repos/TiVo/intellij-haxe/issues/496/comments","events_url":"https://api.github.com/repos/TiVo/intellij-haxe/issues/496/events","html_url":"https://github.com/TiVo/intellij-haxe/issues/496","id":182324672,"number":496,"title":"[0.10.1 RC2] NPE in HaxeLookupElement","user":{"login":"eliasku","id":3038174,"avatar_url":"https://avatars.githubusercontent.com/u/3038174?v=3","gravatar_id":"","url":"https://api.github.com/users/eliasku","html_url":"https://github.com/eliasku","followers_url":"https://api.github.com/users/eliasku/followers","following_url":"https://api.github.com/users/eliasku/following{/other_user}","gists_url":"https://api.github.com/users/eliasku/gists{/gist_id}","starred_url":"https://api.github.com/users/eliasku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliasku/subscriptions","organizations_url":"https://api.github.com/users/eliasku/orgs","repos_url":"https://api.github.com/users/eliasku/repos","events_url":"https://api.github.com/users/eliasku/events{/privacy}","received_events_url":"https://api.github.com/users/eliasku/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-11T17:27:12Z","updated_at":"2016-10-12T15:49:23Z","closed_at":null,"body":"Just found in logs for my project setup. Project view Scroll starts jumping to fixed position. Also while scrolling because of high amount of NPE memory consuming is growing fast. I will fix it if will have free time.\r\n \r\n```\r\n2016-10-11 20:22:26,289 [4021853]  ERROR - .psi.impl.HaxeNamedElementImpl - IntelliJ IDEA 2016.2.3  Build #IU-162.1812.17 \r\n2016-10-11 20:22:26,289 [4021853]  ERROR - .psi.impl.HaxeNamedElementImpl - JDK: 1.8.0_112-release \r\n2016-10-11 20:22:26,289 [4021853]  ERROR - .psi.impl.HaxeNamedElementImpl - VM: OpenJDK 64-Bit Server VM \r\n2016-10-11 20:22:26,289 [4021853]  ERROR - .psi.impl.HaxeNamedElementImpl - Vendor: JetBrains s.r.o \r\n2016-10-11 20:22:26,289 [4021853]  ERROR - .psi.impl.HaxeNamedElementImpl - OS: Mac OS X \r\n2016-10-11 20:22:26,289 [4021853]  ERROR - .psi.impl.HaxeNamedElementImpl - Last Action: SaveAll \r\n2016-10-11 20:22:26,289 [4021853]  ERROR - .psi.impl.HaxeNamedElementImpl - Current Command:  \r\n2016-10-11 20:22:26,289 [4021853]  ERROR - .psi.impl.HaxeNamedElementImpl - null \r\njava.lang.Throwable\r\n\tat com.intellij.openapi.diagnostic.Logger.error(Logger.java:127)\r\n\tat com.intellij.plugins.haxe.lang.psi.impl.HaxeNamedElementImpl.getName(HaxeNamedElementImpl.java:79)\r\n\tat com.intellij.plugins.haxe.ide.HaxeLookupElement.getLookupString(HaxeLookupElement.java:65)\r\n\tat com.intellij.codeInsight.lookup.LookupElement.getAllLookupStrings(LookupElement.java:46)\r\n\tat com.intellij.codeInsight.completion.impl.CamelHumpMatcher.a(CamelHumpMatcher.java:74)\r\n\tat com.intellij.codeInsight.completion.impl.CamelHumpMatcher.prefixMatches(CamelHumpMatcher.java:70)\r\n\tat com.intellij.codeInsight.completion.LegacyCompletionContributor.a(LegacyCompletionContributor.java:73)\r\n\tat com.intellij.codeInsight.completion.LegacyCompletionContributor.a(LegacyCompletionContributor.java:124)\r\n\tat com.intellij.codeInsight.completion.LegacyCompletionContributor.processReferences(LegacyCompletionContributor.java:107)\r\n\tat com.intellij.codeInsight.completion.LegacyCompletionContributor.completeReference(LegacyCompletionContributor.java:69)\r\n\tat com.intellij.codeInsight.completion.LegacyCompletionContributor.fillCompletionVariants(LegacyCompletionContributor.java:52)\r\n\tat com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:81)\r\n\tat com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:132)\r\n\tat com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:125)\r\n\tat com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$2.addCompletions(LiveTemplateCompletionContributor.java:90)\r\n\tat com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)\r\n\tat com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:155)\r\n\tat com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:81)\r\n\tat com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:110)\r\n\tat com.intellij.codeInsight.completion.CompletionProgressIndicator.a(CompletionProgressIndicator.java:776)\r\n\tat com.intellij.codeInsight.completion.CompletionProgressIndicator.access$500(CompletionProgressIndicator.java:90)\r\n\tat com.intellij.codeInsight.completion.CompletionProgressIndicator$1CalculateItems.run(CompletionProgressIndicator.java:758)\r\n\tat com.intellij.codeInsight.completion.AsyncCompletion.b(CompletionThreading.java:87)\r\n\tat com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:856)\r\n\tat com.intellij.codeInsight.completion.AsyncCompletion.a(CompletionThreading.java:84)\r\n\tat com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:170)\r\n\tat com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:494)\r\n\tat com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)\r\n\tat com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)\r\n\tat com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:155)\r\n\tat com.intellij.codeInsight.completion.AsyncCompletion.a(CompletionThreading.java:82)\r\n\tat com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:308)\r\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n```"},"comment":{"url":"https://api.github.com/repos/TiVo/intellij-haxe/issues/comments/253253396","html_url":"https://github.com/TiVo/intellij-haxe/issues/496#issuecomment-253253396","issue_url":"https://api.github.com/repos/TiVo/intellij-haxe/issues/496","id":253253396,"user":{"login":"eliasku","id":3038174,"avatar_url":"https://avatars.githubusercontent.com/u/3038174?v=3","gravatar_id":"","url":"https://api.github.com/users/eliasku","html_url":"https://github.com/eliasku","followers_url":"https://api.github.com/users/eliasku/followers","following_url":"https://api.github.com/users/eliasku/following{/other_user}","gists_url":"https://api.github.com/users/eliasku/gists{/gist_id}","starred_url":"https://api.github.com/users/eliasku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliasku/subscriptions","organizations_url":"https://api.github.com/users/eliasku/orgs","repos_url":"https://api.github.com/users/eliasku/repos","events_url":"https://api.github.com/users/eliasku/events{/privacy}","received_events_url":"https://api.github.com/users/eliasku/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T15:49:23Z","updated_at":"2016-10-12T15:49:23Z","body":"I've debugging very long time and catch exception `ProcessCanceledException`. Because we catch all Throwable exceptions - we had rethrowing it up by `LOG.error` call.\r\n\r\n@EBatTiVo  I think we should change `HaxeNamedElementImpl:74`:\r\n\r\n```\r\n@Override\r\n  public String getName() {\r\n    try {\r\n      return getIdentifier().getText();\r\n    }\r\n    catch (Throwable t) {\r\n      // log & swallow\r\n      LOG.error(t.getMessage());\r\n      return \"\";\r\n    }\r\n  }\r\n```\r\n\r\nto this:\r\n\r\n```\r\n  @Override\r\n  public String getName() {\r\n    try {\r\n      return getIdentifier().getText();\r\n    }\r\n    catch (ProcessCanceledException cancelled) {}\r\n    catch (Throwable t) {\r\n      // log & swallow\r\n      LOG.error(t.getMessage());\r\n    }\r\n    return \"\";\r\n  }\r\n```\r\n\r\nWhat do you think? Sometimes when ProcessCancel exception are caught by us and we're rethrowing different exception with LOG.error and IDEA starts hanging up."}}
{"actor":{"display_login":"eliasku"}}