magefree / mage

Magic Another Game Engine
http://xmage.today
MIT License
1.8k stars 748 forks source link

ClassCastException - CardView to PermanentView #12524

Open erantun opened 1 week ago

erantun commented 1 week ago

I tried casting Mirrormade on a board with only Bound by Moonsilver and an incubate token. I got this error:

3

For a while I could do nothing, I didn't see the card anywhere but my opponent could see it on the stack. After a while the card came back to my hand and I regained control. I tried casting it again (silly me) but it just blocked again. This time I couldn't do anything and each time I tried to select a game piece it kept showing this error:

4

It didn't come back to before casting and rollback didn't solve it. The rollback happened but the second error stayed. Conceding worked but disconnected soon after, I don't know if the two can be related.

I have no logs but if there's a way to get them I'd be happy to share.

xenohedron commented 1 week ago

Checking for casts without instanceof - this was the only one I found with a cursory search:

https://github.com/magefree/mage/blob/e38a79f23147dd872cfbd8b8b9cf067154dfdf9c/Mage.Client/src/main/java/org/mage/card/arcane/CardPanel.java#L834-L842

xenohedron commented 1 week ago

No apparent related error in server logs

JayDi85 commented 1 week ago

Cached images search in MTGO render mode use unchecked PermanentView too:

shot_240626_140852 shot_240626_140959

JayDi85 commented 1 week ago

Last one must be fine: shot_240626_143151

So it's getOriginalPermanent problem