forge icon indicating copy to clipboard operation
forge copied to clipboard

Investigate possible crashes in CardRules without exception

Open Hanmac opened this issue 2 months ago • 1 comments

If for some Reason, the Game crashes inside the CardRules Constructor (like yesterday with the Android bug)

https://github.com/Card-Forge/forge/blob/8c2c32a3d898d38c1469e07c8a05c46ac558c97d/forge-core/src/main/java/forge/card/CardRules.java#L61-L91

Case A: While loading all the cards from Cardfolder.zip, then the Exception isn't logged and isn't reported to Sentry.

Case B: If the cardfolders are missing (I did a test yesterday), then it would crash in later when the Decks are loaded, when going this route, the exceptions are logged when this function is called: https://github.com/Card-Forge/forge/blob/43525ce6578555ec0abf7fe9512eddd788d9fb7f/forge-core/src/main/java/forge/card/CardRules.java#L881-L894

this issue is for looking what is different in how the functions are called, and how to fix case A so that it might not happen again.

Hanmac avatar Oct 23 '25 08:10 Hanmac