wt-io-it / odoo-pycharm-plugin

Plugin to Support Odoo in Pycharm
GNU Affero General Public License v3.0
19 stars 10 forks source link

Freeze when using SearchEverywhere #306

Open jond-odoo opened 1 month ago

jond-odoo commented 1 month ago

I searched in the code for consistent,. It happens pretty often that I can't do anything when I search something so I have to quit Pycharm and kill the Python process, it's quite annoying.

Plugin Version: 0.6.11 IntelliJ Version: PyCharm 2023.2 IntelliJ Build: PY-232.8660.197

java.lang.NullPointerException: Cannot invoke "com.intellij.psi.PsiElement.isValid()" because the return value of "java.util.function.Supplier.get()" is null ``` java.lang.NullPointerException: Cannot invoke "com.intellij.psi.PsiElement.isValid()" because the return value of "java.util.function.Supplier.get()" is null at at.wtioit.intellij.plugins.odoo.search.AbstractOdooPsiElement.lambda$isValid$2(AbstractOdooPsiElement.java:217) at at.wtioit.intellij.plugins.odoo.WithinProject.call(WithinProject.java:12) at at.wtioit.intellij.plugins.odoo.search.AbstractOdooPsiElement.isValid(AbstractOdooPsiElement.java:216) at com.intellij.searchEverywhereMl.ranking.features.statistician.SearchEverywhereSymbolStatistician$getContextName$1.invoke(SearchEverywhereSymbolStatistician.kt:20) ... at com.intellij.ide.actions.searcheverywhere.MixedResultsSearcher$ContributorSearchTask.lambda$run$0(MixedResultsSearcher.java:185) at at.wtioit.intellij.plugins.odoo.search.OdooSEContributor.lambda$fetchWeightedElements$2(OdooSEContributor.java:121) at at.wtioit.intellij.plugins.odoo.WithinProject.run(WithinProject.java:25) at at.wtioit.intellij.plugins.odoo.search.OdooSEContributor.lambda$fetchWeightedElements$3(OdooSEContributor.java:101) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:895) at at.wtioit.intellij.plugins.odoo.search.OdooSEContributor.fetchWeightedElements(OdooSEContributor.java:100) at com.intellij.ide.actions.searcheverywhere.MixedResultsSearcher$ContributorSearchTask.run(MixedResultsSearcher.java:184) ... at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:272) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ... at java.base/java.lang.Thread.run(Thread.java:833) ```
ap-wtioit commented 1 month ago

@jond-odoo do i understand you correctly that pycharm is hanging (locked), e.g. like this: image

how do you kill the python process to get it to trigger the error report with the stacktrace or is the stacktrace unrelated?

ap-wtioit commented 1 month ago

Notes for me: Steps to produce the hanging PyCharm

jond-odoo commented 1 month ago

Indeed, it's exactly this behavior. I kill the process in my terminal with "sudo kill " founding PID with the command "netstat -tulpn"

ap-wtioit commented 1 month ago

ThreadDumps from my workspace threadDump-20240731-132330.txt threadDump-20240731-132335.txt threadDump-20240731-132340.txt threadDump-20240731-123756.txt threadDump-20240731-123801.txt threadDump-20240731-123806.txt