ciselab / TestGenie

TestGenie - an IntelliJ plugin that natively integrates EvoSuite into the IDE. EvoSuite is an automated test suite generation tool using evolutionary algorithms. Used for research @ SERG, TU Delft.
MIT License
1 stars 0 forks source link

"Memory leak" on IDE shutdown #200

Closed lyuben-todorov closed 2 years ago

lyuben-todorov commented 2 years ago

Bug description Despite all the recent advances in technology and the implicit usage of a garbage-collecting runtime, there are error messages produced containing the words "memory leak" Example stack trace:

java.lang.RuntimeException: Memory leak detected: 'nl.tudelft.ewi.se.ciselab.testgenie.editor.Workspace$$Lambda$4538/0x0000000102997840@2c00ef91' of class nl.tudelft.ewi.se.ciselab.testgenie.editor.Workspace$$Lambda$4538/0x0000000102997840 is registered in Disposer but wasn't disposed.
Register it with a proper parentDisposable or ensure that it's always disposed by direct Disposer.dispose call.
See https://jetbrains.org/intellij/sdk/docs/basics/disposers.html for more details.
The corresponding Disposer.register() stacktrace is shown as the cause:

    at com.intellij.openapi.util.ObjectTree.assertIsEmpty(ObjectTree.java:227)
    at com.intellij.openapi.util.Disposer.assertIsEmpty(Disposer.java:167)
    at com.intellij.openapi.util.Disposer.assertIsEmpty(Disposer.java:162)
    at com.intellij.openapi.application.impl.ApplicationImpl.disposeContainer(ApplicationImpl.java:193)
    at com.intellij.openapi.application.impl.ApplicationImpl.disposeSelf(ApplicationImpl.java:210)
    at com.intellij.openapi.application.impl.ApplicationImpl.doExit(ApplicationImpl.java:579)
    at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:532)
    at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:521)
    at com.intellij.openapi.application.ex.ApplicationEx.exit(ApplicationEx.java:73)
    at com.intellij.openapi.wm.impl.CloseProjectWindowHelper.quitApp(CloseProjectWindowHelper.kt:65)
    at com.intellij.openapi.wm.impl.CloseProjectWindowHelper.windowClosing(CloseProjectWindowHelper.kt:43)
    at com.intellij.openapi.wm.impl.ProjectFrameHelper$2.windowClosing(ProjectFrameHelper.java:228)
    at java.desktop/java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:357)
    at java.desktop/java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:357)
    at java.desktop/java.awt.Window.processWindowEvent(Window.java:2090)
    at java.desktop/javax.swing.JFrame.processWindowEvent(JFrame.java:298)
    at java.desktop/java.awt.Window.processEvent(Window.java:2049)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2784)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:969)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:839)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:502)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.Throwable
    at com.intellij.openapi.util.ObjectNode.<init>(ObjectNode.java:31)
    at com.intellij.openapi.util.ObjectTree.createNodeFor(ObjectTree.java:99)
    at com.intellij.openapi.util.ObjectTree.register(ObjectTree.java:60)
    at com.intellij.openapi.util.Disposer.register(Disposer.java:73)
    at com.intellij.util.containers.DisposableWrapperList.createDisposableWrapper(DisposableWrapperList.java:254)
    at com.intellij.util.containers.DisposableWrapperList.add(DisposableWrapperList.java:63)
    at com.intellij.util.EventDispatcher.addListener(EventDispatcher.java:175)
    at com.intellij.openapi.editor.impl.event.EditorEventMulticasterImpl.addDocumentListener(EditorEventMulticasterImpl.java:120)
    at nl.tudelft.ewi.se.ciselab.testgenie.editor.Workspace.<init>(Workspace.kt:110)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:52)
    at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:771)
    at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:49)
    at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:37)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:110)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:64)
    at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:488)
    at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:471)
    at nl.tudelft.ewi.se.ciselab.testgenie.evosuite.Pipeline.runTestGeneration(Pipeline.kt:339)
    at nl.tudelft.ewi.se.ciselab.testgenie.actions.GenerateTestsActionClass.actionPerformed(GenerateTestsActionClass.kt:35)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAware$5(ActionUtil.java:273)
    at com.intellij.util.SlowOperations.lambda$allowSlowOperations$0(SlowOperations.java:77)
    at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:68)
    at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:76)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:273)
    at com.intellij.ide.actions.GotoActionAction.lambda$performAction$2(GotoActionAction.java:108)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:218)
    at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
    at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:200)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:319)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:133)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46)
    at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:189)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:969)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:839)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496)
    ... 6 more
2022-06-14 18:04:44,896 [  82456]  ERROR - tellij.openapi.util.ObjectTree - IntelliJ IDEA 2021.1.3  Build #IC-211.7628.21 
2022-06-14 18:04:44,896 [  82456]  ERROR - tellij.openapi.util.ObjectTree - JDK: 11.0.11; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2022-06-14 18:04:44,896 [  82456]  ERROR - tellij.openapi.util.ObjectTree - OS: Linux 
2022-06-14 18:04:44,896 [  82456]  ERROR - tellij.openapi.util.ObjectTree - Plugin to blame: TestGenie version: 0.0.1