Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Crash at world load in a freshly unpacked game" #14400

Merged
merged 2 commits into from Dec 13, 2015

Conversation

Projects
None yet
4 participants
@BevapDin
Copy link
Contributor

commented Dec 12, 2015

Fixes #14399, there was still some code that trows std::string and not a proper exception, those thrown strings don't get caught and make the game crash. Now it uses proper error reporting via the JSON classes, which throws a proper exception.

The exception is triggered by the teashop which apparently tries to place furniture (f_mutpoppy), but says it wants to place terrain. That does not work as the game tries to place a terrain named "f_mutpoppy", but there is no such terrain.

BevapDin added some commits Dec 12, 2015

Replace throwing std::strings with calling Json::throw_error.
It throw the an exception that is properly caught.

Note: the check for `pjo.has_string("id")` is not needed at all. The following call to `get_string` will fail on its own if the JSON does not contain that member.
Fix mapgen: correct the type of the object to place.
Loading the data fails as there is no *terrain* f_mutpoppy, only a furniture of that type.
@mugling

This comment has been minimized.

Copy link
Contributor

commented Dec 12, 2015

Compiles and resolves #14399 for me

@remyroy

This comment has been minimized.

Copy link
Contributor

commented Dec 13, 2015

Many persons are awaiting this fix in experimental judging by the amount of duplicate issues on github, forum posts and reddit posts.

sparr added a commit that referenced this pull request Dec 13, 2015

Merge pull request #14400 from BevapDin/wyk
Fix "Crash at world load in a freshly unpacked game"

@sparr sparr merged commit 1f7d1bc into CleverRaven:master Dec 13, 2015

1 check passed

default
Details

@BevapDin BevapDin deleted the BevapDin:wyk branch Dec 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.