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 caused by erasing map elements while iterating in System.cpp. #1436

Conversation

LGM-Doyle
Copy link
Contributor

This might fix the crash reported in the forum, where after the Experimentors are active the game crashes on OSX.

In System::Copy there is for loop iterating over the map of starlanes and deleting elements. It does not account for the deleted elements while iterating so it could step into nowhere.

This PR fixes that problem. However, since I can't replicate the crash it may not fix the crash.

@LGM-Doyle LGM-Doyle added category:bug The Issue/PR describes or solves a perceived malfunction within the game. component:internal The Issue/PR deals with any project component that has no explicit `component` label. labels Mar 24, 2017
@LGM-Doyle LGM-Doyle added this to the v0.4.7 milestone Mar 24, 2017
@geoffthemedio
Copy link
Member

looks reasonable

@geoffthemedio geoffthemedio merged commit 3cef249 into freeorion:master Mar 24, 2017
@Vezzra
Copy link
Member

Vezzra commented Mar 24, 2017

And just for the records, it indeed fixed the issue, at least on my system. The save game provided in that forum thread no longer crashes when executing the next turn. 👍

@Vezzra Vezzra added the status:merged All relevant commits of this PR were merged into the master development branch. label Mar 24, 2017
@LGM-Doyle LGM-Doyle deleted the fix_bug_osx_intermitent_crash_when_experimetors_active branch March 24, 2017 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bug The Issue/PR describes or solves a perceived malfunction within the game. component:internal The Issue/PR deals with any project component that has no explicit `component` label. status:merged All relevant commits of this PR were merged into the master development branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants