-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 on game load #15628
Comments
Yes, it would be helpful. Please post it. |
I had originally not included this because the save directory was fairly large, but I forgot how well JSON compresses. :) https://www.dropbox.com/s/jeysste12k6s16a/Lakeshire.7z When reproducing, please note that the crash only happens on a debug build, as that checking isn't done on a release compile. |
I couldn't reproduce it on 60561b6. However, your save requires the "Arts' Guns" mod which I don't have. Maybe it's somehow responsible for the crash. But I could get a (probably different) segfault on the starting screen when I tried to build without lua support. It was certainly caused by the missing mod and I'm going to fix it. |
...which has had some recent compatibility problems with |
Didn't know about that (actually, I haven't even heard about that mod before). |
It could be related to that mod, I suppose, though being a JSON-only mod if it causes a crash there's still a bug hiding somewhere. It's unfortunately (or fortunately, depending on how you look at it) not a problem I can easily reproduce. |
I'm not especially familiar with that mod - didn't it include a source patch or am I mistaken? If its pure JSON it's either unrelated or as you say |
This crashdump is ringing a vauge bell for me. Rotting items in the cargo were crashing with a similar backtrace because of some bugs in the debug containers stl support shipped with debian wheezy (libstdc++ 4.7.2). Looking at your library paths I'm guessing you're on... Fedora 23? Perhaps there is a similar issue with the debugging containers on your compiler. Does it still crash if you compile it on a different machine? Also, I'm going to predict that even with that compiler, it probably won't crash if you do a release build. |
I spent a bit of time comparing the header on the three platforms. (4.7.2 era, 4.9.2 era, and 5.3 era) The debug check in question goes way back to DR 408 @ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15523 and seems to be slightly different on all 3 (the only difference between 4.7.2 and 4.9.2 era is the addition of _GLIBCXX_NOEXCEPT. 5.3 has some changes that were done to work around some race condition in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62313 ) I am not near skilled enough in c++ to determine if it's the libstdc++ debug checks that are wrong or active_item_cache that is wrong. |
I'm not sure if Artyom's used a source patch in the past, but it certainly doesn't now. Yeah, that stack trace is from Fedora 23. I also got an essentially-identical crash in Windows when compiling under mingw64 (msys2). That seems to be using GCC 5.3.0, so not much different from the 5.3.1 in F23. Unfortunately I don't have any more-different platforms handy, at least which are able to compile a functioning CDDA. |
The more I look at this, the more I think that the check is legit and active_item_cache is depending on undefined behavior. I think that map::process_items_in_vehicle's blind iteration on cur_veh->active_items.get() might be problematic when some items are deleteing themselves during processing. The confusing bit is where it only seems to crash on certain compiler versions. Maybe this is dependent on some implementation details inside the compiler. Or maybe the 4.9.2 era header doesn't trigger the debug properly somehow. I brought up a FC23 vm and was able to reproduce some of the other cases of this crash. The save posted in #14381 for example is back to crashing on FC23 (press | and wait 30 minutes) |
Items deleting themselves? That would be bad practice and should probably be reported as a bug by itself too. Could it be related to explosions? Explosions can damage and destroy surrounding items, which could invalidate the existing iterator. |
No, it's items rotting away. |
specifically, as far as I can tell it's items rotting away while process_items_in_vehicle is looping over the active items. I am only assuming that this is what happens, can't prove it yet. SOMETHING is screwing up an iterator somewhere in there though. |
Duplicated in #25934 which has a better reproducer. |
Orginally found on version cb34c3a, but continued after I reverted to 6dad07e.
Not sure what the cause of this one is, haven't been able to figure out much of anything, even what causes this type of error. But, I have a savegame which crashes on load (or sometimes after 1 step) with the following:
If posting the savegame would help, please let me know.
The text was updated successfully, but these errors were encountered: