Skip to content

Fixing FPE when an item is not initialised.#388

Open
devnexen wants to merge 1 commit into
TurningWheel:masterfrom
devnexen:item_fp_exception
Open

Fixing FPE when an item is not initialised.#388
devnexen wants to merge 1 commit into
TurningWheel:masterfrom
devnexen:item_fp_exception

Conversation

@devnexen

Copy link
Copy Markdown
Contributor

No description provided.

@devnexen

devnexen commented Aug 16, 2018

Copy link
Copy Markdown
Contributor Author

Spotted first with 3.1.4 version but thought it was due to missing data but then occurred again (but randomly and rarely) with 3.2.0 as well, basically 216 items while possibly 218.

Do not know if the approach would be to not load the game or this solution or making sure all data is present.

@WALLOFJUSTICE

Copy link
Copy Markdown
Collaborator

To clarify, 3.2.0 increased the number of items by 1, as well as adding a new entry to items.txt. Likely crash is on a line like (appearance % items[type].variations) where variations is uninitialised and could be 0.

Solution can also be just to properly initialise some item properties to non-0

@devnexen

devnexen commented Aug 18, 2018

Copy link
Copy Markdown
Contributor Author

Yes exactly a fpe is division by zero.

@devnexen

Copy link
Copy Markdown
Contributor Author

Tried your suggestion, realising building under Mac is ... tricky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants