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
Crash in VehicleGroupWindow::GroupNameSorter #7838
Comments
Please attach other crash files, at least crash.dmp. |
sorry I thought the message just asked for the text in the box. I played for a few more hrs but It never crashed again, these are the files that were still sitting there in my user folder. I opened this save file to resume playing, not sure if that affects it. |
|
hm, someone mentioned vehicle grouping in #7831. I did have the vehicle group window open IIRC |
Game crash while attempting to create a new group. Created plenty of groups and a couple subgroups before with no issues. Github won't let me upload dmp and sav files. |
You have to zip them first before you upload them. |
crash.zip |
After some more testing, it appears to be an issue with creating subgroups. |
Additional code weirdness - there are 2 GroupNameSorters - company_gui.cpp & group_gui.cpp, which are identical . Not sure why... |
This could be related to this issue: JGRennison/OpenTTD-patches@4338541 The odd resolved string caching mechanism in GroupNameSorter can violate strict weak ordering. |
Seems plausible? But "Line 160" is this: Line 158 in 2086143
So it must be crashing because |
If the sort comparator does not meet the sort invariants then the behaviour is undefined, and std::sort implementations are entitled to run over either bound of the input. e.g. https://stackoverflow.com/questions/18291620/why-will-stdsort-crash-if-the-comparison-function-is-not-as-operator https://stackoverflow.com/questions/24048022/what-causes-stdsort-to-access-address-out-of-range |
Aha. Yes, that would do it. By all means PR that, though it'd be nice if the global variables could be removed entirely (perhaps with variable capture?) |
Inlining the comparator at the call site would allow the globals to be removed. I'll see what I can do later today. |
This could be caused by an engine being renamed, and the old name being cached from a previous sort. See: OpenTTD#7838
This could be caused by a group being renamed, and the old name being cached from a previous sort. See: OpenTTD#7838
Did it again. This time trying to make a new group while having Ungrouped Trains selected. |
This could be caused by an engine being renamed, and the old name being cached from a previous sort. See: #7838
This could be caused by a group being renamed, and the old name being cached from a previous sort. See: #7838
This could be caused by an engine being renamed, and the old name being cached from a previous sort. See: OpenTTD#7838
This could be caused by a group being renamed, and the old name being cached from a previous sort. See: OpenTTD#7838
Fixed in #8223 |
This could be caused by an engine being renamed, and the old name being cached from a previous sort. See: OpenTTD#7838
This could be caused by a group being renamed, and the old name being cached from a previous sort. See: OpenTTD#7838
This could be caused by an engine being renamed, and the old name being cached from a previous sort. See: OpenTTD#7838
This could be caused by a group being renamed, and the old name being cached from a previous sort. See: OpenTTD#7838
This could be caused by an engine being renamed, and the old name being cached from a previous sort. See: #7838
This could be caused by a group being renamed, and the old name being cached from a previous sort. See: #7838
I got a random crash and it took me here
Expected result
game plays normally
Actual result
Steps to reproduce
was just plaing the game normally
The text was updated successfully, but these errors were encountered: