Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception ActionUpdateThread.OLD_EDT is deprecated after updating to Intellij IDEA 2024.2.0 #105

Closed
2 tasks done
mbamba-np opened this issue Aug 15, 2024 · 5 comments
Closed
2 tasks done

Comments

@mbamba-np
Copy link

Step 1: Are you in the right place?

  • I have verified there are no duplicate active or recent bugs, questions, or requests
  • I have verified that I am using the latest version of the plugin.

Step 2: Describe your environment

  • Plugin version: 0.16.2
  • PyCharm/IDEA version: IntelliJ IDEA 2024.2.0.1 (Ultimate Edition) Build #IU-242.20224.387, built on August 13, 2024
  • Pylint version: 2.17.4

Step 3: Describe the problem:

Steps to reproduce:

Happens randomly working on python files. Then suddenly a popup comes up showing the exception and asking me to disable the pylint plugin.

Observed Results:

intellij_pylint_plugin_exception

Expected Results:

  • No exception

Relevant Code:

com.intellij.diagnostic.PluginException: `ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon. 'com.leinardi.pycharm.pylint.actions.ScanCurrentFile' must override `getActionUpdateThread()` and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: com.leinardi.pycharm.pylint]
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:90)
	at com.intellij.diagnostic.PluginException.reportDeprecatedUsage(PluginException.java:125)
	at com.intellij.openapi.actionSystem.ActionUpdateThreadAware.getActionUpdateThread(ActionUpdateThreadAware.java:21)
	at com.intellij.openapi.actionSystem.AnAction.getActionUpdateThread(AnAction.java:201)
@jennifer-richards
Copy link

In case it's useful to anyone, I've squelched the exceptions in this branch - https://github.com/jennifer-richards/pylint-pycharm/tree/get-action-update-thread

Caveat: I don't actually know what I'm doing or whether returning BGT for everything is appropriate. It seems to work for me. I hesitate to even post it, but perhaps it'll be helpful until the maintainers can make a proper update. (And thanks to them for their efforts!)

@leinardi
Copy link
Owner

leinardi commented Oct 4, 2024

@jennifer-richards Thanks for the help, I just created a PR that should fix this issue, if you have time could you take a look and confirm if it fixes it also for you? #106

@jennifer-richards
Copy link

@jennifer-richards Thanks for the help, I just created a PR that should fix this issue, if you have time could you take a look and confirm if it fixes it also for you? #106

Can confirm - did a quick test and it didn't throw any errors scaning a project and poking around in the UI.

Thanks for the fix!

leinardi added a commit that referenced this issue Oct 5, 2024
Fix #103 #105: Defined action update thread for actions
@quandaica
Copy link

I got this error after upgrade to 0.16.3 version

The scan failed due to an exception: Use JsonReader.setLenient(true) to accept malformed JSON at path $ Root cause: Use JsonReader.setLenient(true) to accept malformed JSON at path $ com.squareup.moshi.JsonEncodingException: Use JsonReader.setLenient(true) to accept malformed JSON at path $ 
	at com.squareup.moshi.JsonReader.syntaxError(JsonReader.java:243) 
	at com.squareup.moshi.JsonUtf8Reader.checkLenient(JsonUtf8Reader.java:1152) 
	at com.squareup.moshi.JsonUtf8Reader.doPeek(JsonUtf8Reader.java:384) 
	at com.squareup.moshi.JsonUtf8Reader.peek(JsonUtf8Reader.java:206) 
	at com.squareup.moshi.internal.NullSafeJsonAdapter.fromJson(NullSafeJsonAdapter.java:38) 
	at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:58) 
	at com.leinardi.pycharm.pylint.plapi.PylintRunner.scan(PylintRunner.java:280) 
	at com.leinardi.pycharm.pylint.checker.ScanFiles.scan(ScanFiles.java:109) 
	at com.leinardi.pycharm.pylint.checker.ScanFiles.checkFiles(ScanFiles.java:100) 
	at com.leinardi.pycharm.pylint.checker.ScanFiles.call(ScanFiles.java:74) 
	at com.leinardi.pycharm.pylint.checker.ScanFiles.call(ScanFiles.java:46) 
	at com.intellij.openapi.application.impl.RwLockHolder$executeOnPooledThread$2.call(RwLockHolder.kt:182) 
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) 
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) 
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702) 
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699) 
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) 
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699) 
	at java.base/java.lang.Thread.run(Thread.java:840) 

@leinardi
Copy link
Owner

leinardi commented Oct 7, 2024

Hi @quandaica, I'm unable to reproduce the issue. Would you be able to confirm that this is actually a regression? In theory the 0.16.3 changes should not affect this portion of the code so I'm just wondering if it is an unrelated issue.
Is anyone else getting this?
In any case doesn't seem related to the ActionUpdateThread.OLD_EDT, could you please open a dedicated issue and provide, if possible, a simple reproduction project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants