GUI: ClassCastException with JDesktopIcon on mouse dragging
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 940
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 160
Description
For extra reference I was playing against AI using Velici-ramp-tor precon against Jeskay Strikers precon. This happened trying to end my turn after not being able to attack because of ghostly prison.
Another note, i heavily use the shortcut keys to use mainly 3 actions: to end, to your turn, to main.
I used to end with a remapped key of "w" and then this error happened. Haven't really had much issues before, but figured to give as much detail as i can.
Error type: CLIENT - unhandled error in GUI - ClassCastException
Client version: 1.4.58-V1 (build: 2025-10-06 20:20)
Java version: 1.8.0_201
Default charset: UTF-8
javax.swing.JInternalFrame$JDesktopIcon cannot be cast to javax.swing.JInternalFrame
Stack trace:
javax.swing.DefaultDesktopManager.endDraggingFrame(DefaultDesktopManager.java:401)
javax.swing.plaf.basic.BasicDesktopIconUI$MouseInputHandler.mouseReleased(BasicDesktopIconUI.java:210)
java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
java.awt.Component.processMouseEvent(Component.java:6539)
javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
java.awt.Component.processEvent(Component.java:6304)
java.awt.Container.processEvent(Container.java:2239)
java.awt.Component.dispatchEventImpl(Component.java:4889)
java.awt.Container.dispatchEventImpl(Container.java:2297)
java.awt.Component.dispatchEvent(Component.java:4711)
and other 24 lines
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported Swing stack trace, especially DefaultDesktopManager.endDraggingFrame and BasicDesktopIconUI$MouseInputHandler.mouseReleased, and reproduce the error while dragging the GUI or using the reported shortcut. Done means ending the turn in the described situation no longer raises the JDesktopIcon ClassCastException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100