- changed status to open
ArrayIndexOutOfBoundsException on launch
When executing Tools->Sketch It! (generate UML diagrams) the plugin dies immediately with the following stack trace:
running with IntelliJ 2018.1.5 (community edition) sketch it! verion .03 (Jan 21, 2018)
-1 java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:418) at java.util.ArrayList.remove(ArrayList.java:495) at org.pmesmeur.sketchit.diagram.component.ModulesHierarchyGenerator.buildModulePaths(ModulesHierarchyGenerator.java:27) at org.pmesmeur.sketchit.diagram.component.ModulesHierarchyGenerator.<init>(ModulesHierarchyGenerator.java:17) at org.pmesmeur.sketchit.diagram.component.ComponentDiagramGenerator.generate(ComponentDiagramGenerator.java:104) at org.pmesmeur.sketchit.diagram.UmlComponentDiagram.generateDiagram(UmlComponentDiagram.java:33) at org.pmesmeur.sketchit.diagram.UmlDiagram.generateDiagram(UmlDiagram.java:43) at org.pmesmeur.sketchit.diagram.UmlDiagram.generate(UmlDiagram.java:24) at org.pmesmeur.sketchit.diagram.UmlDiagramsGenerator.generateComponentDiagram(UmlDiagramsGenerator.java:27) at org.pmesmeur.sketchit.SketchIt.actionBody(SketchIt.java:40) at org.pmesmeur.sketchit.SketchIt.access$000(SketchIt.java:8) at org.pmesmeur.sketchit.SketchIt$1.run(SketchIt.java:31) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1010) at org.pmesmeur.sketchit.SketchIt.runInsideAnIntellijWriteAction(SketchIt.java:29) at org.pmesmeur.sketchit.SketchIt.actionPerformed(SketchIt.java:23) at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:220) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:237) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:301) at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:307) at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:104) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:291) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:111) at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88) at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:111) at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120) at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111) at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:528) at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:48) at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:548) at java.awt.Component.processMouseEvent(Component.java:6548) at javax.swing.JComponent.processMouseEvent(JComponent.java:3325) at java.awt.Component.processEvent(Component.java:6313) at java.awt.Container.processEvent(Container.java:2237) at java.awt.Component.dispatchEventImpl(Component.java:4903) at java.awt.Container.dispatchEventImpl(Container.java:2295) at java.awt.Component.dispatchEvent(Component.java:4725) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467) at java.awt.Container.dispatchEventImpl(Container.java:2281) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4725) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764) at java.awt.EventQueue.access$500(EventQueue.java:98) at java.awt.EventQueue$3.run(EventQueue.java:715) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) at java.awt.EventQueue$4.run(EventQueue.java:737) at java.awt.EventQueue$4.run(EventQueue.java:735) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:734) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:786) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:723) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:395) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Comments (8)
-
repo owner -
repo owner Issue
#18was marked as a duplicate of this issue. -
I have the same Issue.
-
repo owner Hello Xavier,
did you see my comment above? According to my code, the only way to have such an exception with this stack is that your project as no module (to my knowledge a project always has a module).
Is it the case with yours?
How did you create your project?
Regards,
Philippe
-
Thanks, I solved it.
-
repo owner What do you exactly mean? Thank you to explain me what you had to do in order to solve the issue?
Regards,
Philippe
-
repo owner - changed status to resolved
Cf. Pull Request #16
-
repo owner - changed status to closed
- Log in to comment
I looked at the code in the top of your stack:
and it's true that there is potentially an index ArrayIndexOutOfBoundsException.
However, the only way I can imagine is that managedModules is empty in your case!!!
Do you confirm that your project has no modules?