basgren / railways

A plugin for RubyMine and IntelliJ IDEA Ultimate that adds a panel with routes of Ruby on Rails application.
MIT License
46 stars 18 forks source link

IDE Error with RubyMine version 2018.1 EAP [bug] #32

Closed thestelz closed 6 years ago

thestelz commented 6 years ago

Sorry to bother again, but I'm getting the following IDE Fatal Error:

org.jetbrains.plugins.ruby.ruby.lang.psi.stubs.impl.RConstantStubImpl cannot be cast to org.jetbrains.plugins.ruby.ruby.lang.psi.stubs.containers.RMethodStub
java.lang.ClassCastException: org.jetbrains.plugins.ruby.ruby.lang.psi.stubs.impl.RConstantStubImpl cannot be cast to org.jetbrains.plugins.ruby.ruby.lang.psi.stubs.containers.RMethodStub
    at org.jetbrains.plugins.ruby.ruby.lang.psi.impl.controlStructures.methods.RMethodImpl.getVisibility(RMethodImpl.java:96)
    at net.bitpot.railways.models.RailsActionInfo.getMethodVisibility(Unknown Source)
    at net.bitpot.railways.models.RailsActionInfo.getIcon(Unknown Source)
    at net.bitpot.railways.models.routes.SimpleRoute.getActionIcon(Unknown Source)
    at net.bitpot.railways.gui.RouteCellRenderer.renderRouteAction(Unknown Source)
    at net.bitpot.railways.gui.RouteCellRenderer.customizeCellRenderer(Unknown Source)
    at com.intellij.ui.ColoredTableCellRenderer.getTableCellRendererComponent(ColoredTableCellRenderer.java:36)
    at javax.swing.JTable.prepareRenderer(JTable.java:5723)
    at com.intellij.ui.table.JBTable.prepareRenderer(JBTable.java:540)
    at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2114)
    at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:2016)
    at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1812)
    at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
    at javax.swing.JComponent.paintComponent(JComponent.java:780)
    at com.intellij.ui.table.JBTable.paintComponent(JBTable.java:303)
    at javax.swing.JComponent.paint(JComponent.java:1057)
    at com.intellij.ui.table.JBTable.paint(JBTable.java:402)
    at javax.swing.JComponent.paintChildren(JComponent.java:890)
    at javax.swing.JComponent.paint(JComponent.java:1066)
    at javax.swing.JViewport.paint(JViewport.java:737)
    at com.intellij.ui.components.JBViewport.paint(JBViewport.java:236)
    at javax.swing.JComponent.paintChildren(JComponent.java:890)
    at javax.swing.JComponent.paint(JComponent.java:1066)
    at javax.swing.JComponent.paintChildren(JComponent.java:890)
    at javax.swing.JComponent.paint(JComponent.java:1066)
    at javax.swing.JComponent.paintChildren(JComponent.java:890)
    at javax.swing.JComponent.paint(JComponent.java:1066)
    at javax.swing.JComponent.paintToOffscreen(JComponent.java:5211)
    at javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(RepaintManager.java:1658)
    at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1630)
    at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1512)
    at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:306)
    at javax.swing.RepaintManager.paint(RepaintManager.java:1279)
    at javax.swing.JComponent._paintImmediately(JComponent.java:5159)
    at javax.swing.JComponent.paintImmediately(JComponent.java:4970)
    at javax.swing.RepaintManager$4.run(RepaintManager.java:838)
    at javax.swing.RepaintManager$4.run(RepaintManager.java:821)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:821)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:796)
    at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:745)
    at javax.swing.RepaintManager.access$1200(RepaintManager.java:71)
    at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1934)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
    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.awt.EventQueue.dispatchEvent(EventQueue.java:732)
    at com.intellij.ide.IdeEventQueue.i(IdeEventQueue.java:824)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:753)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:428)
    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)

Railways version: 0.8.10

I'm not sure what happened, but I copied a path name (company_profile_change_path) and went to paste it into the search box and then it errored out.

RubyMine info:

RubyMine 2018.1 EAP
Build #RM-181.3007.20, built on January 25, 2018
JRE: 1.8.0_152-release-1136-b5 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.3
thestelz commented 6 years ago

After restarting RubyMine, it fixed the issue. Not sure if you still want this ticket open as I'm not sure if I can replicate it or if it was something to do with something else

thestelz commented 6 years ago

@basgren I haven't had this issue for a while now and I'm even on a newer version of RubyMine. Sorry for being on the trigger a bit to early on this one. I can't even replicate it at all.

RubyMine 2018.1 EAP
Build #RM-181.4096.10, built on March 6, 2018
JRE: 1.8.0_152-release-1136-b16 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.3

You can close this issue out if you want as I'm not sure if you still want it open for some reason.

Thanks!

basgren commented 6 years ago

Thanks! I will take a look at it. I didn't investigate it before as early IDE versions are changing under the hood, so I prefer to wait for more or less stable build. But as the issue happened again - it's time to dig in :)

valich commented 6 years ago

Is this problem stably reproduced? I suppose it might be related to the stubs problems. It does not look like railways plugin is responsible..

thestelz commented 6 years ago

@valich I only have EAP versions of RM, so I'm not sure if it's in the stable versions or not.

That's why I said I couldn't replicate it on EAP versions anymore[1,2] and didn't want to waste @basgren time.

(ref: 1, 2)

basgren commented 6 years ago

Unfortunately, I couldn't reproduce the issue. Tried both 2018.1 and 2018.2 EAP versions. So I'm closing it for now. Feel free to reopen if the issue can be reproduced. Thanks!