Card-Forge / Card-Forge/forge

Investigate possible crashes in CardRules without exception

Open
#8,986 1 comment 0 reactions 2 assignees Claimed by @tool4ever View on GitHub
Game Mechanics GUI keep
Dominant language
Java
Stars
2.7k
Forks
1.1k
Avg merge
1d 1h
Merged PRs (30d)
158

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.