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

Unloading the plugin fails, requiring restart #63

Open
opwvhk opened this issue Feb 14, 2023 · 1 comment
Open

Unloading the plugin fails, requiring restart #63

opwvhk opened this issue Feb 14, 2023 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed probable-intellij-bug Probably a bug in IntelliJ

Comments

@opwvhk
Copy link
Owner

opwvhk commented Feb 14, 2023

Description
There are several crash reports, which seem to point to one of several root causes:

  • AvroIdlLanguage, or a class that depends on it, fails to initialise for some unknown reason
  • AvroIdlLanguage fails to initialise because "Language with ID 'Avro IDL' is already registered",
    and the conflicting plugin is this plugin
  • "Duplicate registration for EP opwvhk.avro.idl.naming.convention" by this plugin

All of these seem to be caused by not fully unloading the plugin.

Immediate cause: some JNI object keeps various plugin classes in memory

Root cause: unknown

To Reproduce

Sadly, the crashes cannot be reproduced.

The unloading failure can, but the logs (where IntelliJ analyses which GC root keeps the plugin in memory) point to JNI holding the classes in memory. The underlying culprit remains unidentified.

Expected behavior

The plugin should be unloaded quickly and properly.

Context:

  • JetBrains Products: IntelliJ IDEA 2022.2.3 to (at least) 2024.2
  • Plugin Versions: at least since 2021.3
  • OS: all reports came from MacOS
@opwvhk opwvhk added bug Something isn't working help wanted Extra attention is needed labels Feb 14, 2023
@opwvhk opwvhk changed the title Unloading the plugin fails Unloading the plugin fails on MacOS, requiring restart Feb 14, 2023
This was referenced Mar 6, 2023
This was referenced Apr 21, 2023
This was referenced Jun 16, 2023
This was referenced Jul 5, 2023
This was referenced Jul 19, 2023
@opwvhk
Copy link
Owner Author

opwvhk commented Nov 19, 2024

The latest unload failing log shows:

Root 1:
  ROOT: Global JNI
  (root): javax.swing.TransferHandler$SwingDropTarget
  dtListener: javax.swing.TransferHandler$DropHandler
  support: javax.swing.TransferHandler$TransferSupport
  component: com.intellij.openapi.editor.impl.EditorComponentImpl
  editor: com.intellij.openapi.editor.impl.EditorImpl
  myProject: com.intellij.openapi.project.impl.ProjectImpl
  extensionArea: com.intellij.openapi.extensions.impl.ExtensionsAreaImpl
  extensionPoints: java.util.HashMap
  table: java.util.HashMap$Node[]
  []: java.util.HashMap$Node
  value: com.intellij.openapi.extensions.impl.InterfaceExtensionPoint
  cachedExtensions: java.util.ImmutableCollections$ListN
  elements: java.lang.Object[]
  []: opwvhk.intellij.avro_idl.editor.AvroIdlTreeStructureProvider
  <class>: java.lang.Class
* name: com.intellij.ide.plugins.cl.PluginClassLoader

This means an IntelliJ class is holding on to the plugin AvroIdlTreeStructureProvider...

@opwvhk opwvhk added the probable-intellij-bug Probably a bug in IntelliJ label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed probable-intellij-bug Probably a bug in IntelliJ
Projects
None yet
Development

No branches or pull requests

1 participant