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

Crash when reached X number of modifications on vehicle. #11108

Closed
adrianrieck opened this issue Feb 3, 2015 · 8 comments
Closed

Crash when reached X number of modifications on vehicle. #11108

adrianrieck opened this issue Feb 3, 2015 · 8 comments
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes.

Comments

@adrianrieck
Copy link

I have a Semi truck which I have been adding on composite armor but it seems if I add too many the game crashes.

I am running version "0.B-2849-g40d0d68-dirty"
The console shows this when it crashes:

/usr/include/c++/4.7/debug/safe_iterator.h:173:error: attempt to copy-
construct an iterator from a singular iterator.

Objects involved in the operation:
iterator "this" @ 0x0x3e5dff8 {
type = N11__gnu_debug14_Safe_iteratorINSt9__cxx199814_List_iteratorI4itemEENSt7__debug4listIS3_SaIS3_EEEEE (mutable iterator);
state = singular;
}
iterator "other" @ 0x0x5d29688 {
type = N11__gnu_debug14_Safe_iteratorINSt9__cxx199814_List_iteratorI4itemEENSt7__debug4listIS3_SaIS3_EEEEE (mutable iterator);
state = singular;
}
Aborted

If it will help I can compress and upload the savegame to reproduce the crash. Alternatively if you just want me to test against a specific version send me the git checkout url and I'll test against that.

@narc0tiq
Copy link
Contributor

narc0tiq commented Feb 3, 2015

Well, huh. 40d0d68 is about 7 days old, and it's not unlikely one of the 135 commits (excluding merges) since then fixed it. Equally, though, nothing comes to mind that would've had an effect.

Try to reproduce it in the latest (unmodified, too -- your "dirty" version could contain anything, for all we know) and report back. You should always be doing so anyway, since it helps neither us nor you if you report issues that are already fixed.

@adrianrieck
Copy link
Author

It still happens in "0.B-3044-geb53449-dirty"

My version dirty because of the following:

$ git status
 On branch master
 Changes not staged for commit:
   (use "git add <file>..." to update what will be committed)
   (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   cataclysm-launcher

 Untracked files:
   (use "git add <file>..." to include in what will be committed)

    libSDL2-2.0.so.0
    libSDL2_image-2.0.so.0
    libSDL2_ttf-2.0.so.0

$ git diff cataclysm-launcher
diff --git a/cataclysm-launcher b/cataclysm-launcher
index f64569b..ed137ce 100755
--- a/cataclysm-launcher
+++ b/cataclysm-launcher
@@ -1,4 +1,5 @@
 #!/bin/sh
+export LD_LIBRARY_PATH='/media/data/cata/latestdebug/Cataclysm-DDA'
 TARGET_FILE=$0

 cd `dirname $TARGET_FILE`

@adrianrieck
Copy link
Author

I can get the savegame to a 1.6M compressed tarball. Let me know where I can email/upload if that helps.

@adrianrieck
Copy link
Author

Here is the backtrace from gdb, maybe it could help?

(gdb) run
Starting program: /media/data/cata/latestdebug/Cataclysm-DDA/cataclysm-tiles 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff5e79700 (LWP 9626)]
/usr/include/c++/4.7/debug/safe_iterator.h:173:error: attempt to copy-
    construct an iterator from a singular iterator.

Objects involved in the operation:
iterator "this" @ 0x0x4da5b08 {
type = N11__gnu_debug14_Safe_iteratorINSt9__cxx199814_List_iteratorI4itemEENSt7__debug4listIS3_SaIS3_EEEEE (mutable iterator);
  state = singular;
}
iterator "other" @ 0x0x4da7708 {
type = N11__gnu_debug14_Safe_iteratorINSt9__cxx199814_List_iteratorI4itemEENSt7__debug4listIS3_SaIS3_EEEEE (mutable iterator);
  state = singular;
}

Program received signal SIGABRT, Aborted.
0x00007ffff6b8d165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff6b8d165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff6b903e0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff743431d in __gnu_debug::_Error_formatter::_M_error() const () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00000000004272f4 in __gnu_debug::_Safe_iterator<std::__cxx1998::_List_iterator<item>, std::__debug::list<item, std::allocator<item> > >::_Safe_iterator (this=0x4da5b08, __x=...) at /usr/include/c++/4.7/debug/safe_iterator.h:169
#4  0x000000000042c445 in item_reference::item_reference (this=0x4da5af0) at src/active_item_cache.h:10
#5  0x000000000042c4be in std::__cxx1998::_List_node<item_reference>::_List_node<item_reference const&> (this=0x4da5ae0)
    at /usr/include/c++/4.7/bits/stl_list.h:115
#6  0x000000000042bbe6 in __gnu_cxx::new_allocator<std::__cxx1998::_List_node<item_reference> >::construct<std::__cxx1998::_List_node<item_reference><item_reference const&> > (this=0x7fffffffd390, __p=0x4da5ae0) at /usr/include/c++/4.7/ext/new_allocator.h:110
#7  0x000000000042ab3c in std::__cxx1998::list<item_reference, std::allocator<item_reference> >::_M_create_node<item_reference const&> (this=0x7fffffffd390)
    at /usr/include/c++/4.7/bits/stl_list.h:503
#8  0x0000000000429552 in std::__cxx1998::list<item_reference, std::allocator<item_reference> >::_M_insert<item_reference const&> (this=0x7fffffffd390, 
    __position=...) at /usr/include/c++/4.7/bits/stl_list.h:1533
#9  0x0000000000427da0 in std::__cxx1998::list<item_reference, std::allocator<item_reference> >::push_back (this=0x7fffffffd390, __x=...)
    at /usr/include/c++/4.7/bits/stl_list.h:997
#10 0x0000000000425aae in active_item_cache::get (this=0x4ced958) at src/active_item_cache.cpp:42
#11 0x000000000094d854 in map::process_items_in_vehicle<bool (*)(item_stack&, __gnu_debug::_Safe_iterator<std::__cxx1998::_List_iterator<item>, std::__debug::list<item, std::allocator<item> > >&, point, std::string)> (this=0x25a1138, cur_veh=0x4ced5f0, current_submap=0x4cf9a70, 
    processor=0x930d84 <process_map_items(item_stack&, std::__debug::list<item, std::allocator<item> >::iterator&, point, std::string)>, signal=...)
    at src/map.cpp:3186
#12 0x00000000009495a5 in map::process_items_in_vehicles<bool (*)(item_stack&, __gnu_debug::_Safe_iterator<std::__cxx1998::_List_iterator<item>, std::__debug::list<item, std::allocator<item> > >&, point, std::string)> (this=0x25a1138, current_submap=0x4cf9a70, 
    processor=0x930d84 <process_map_items(item_stack&, std::__debug::list<item, std::allocator<item> >::iterator&, point, std::string)>, signal=...)
    at src/map.cpp:3174
#13 0x0000000000944bea in map::process_items<bool (*)(item_stack&, __gnu_debug::_Safe_iterator<std::__cxx1998::_List_iterator<item>, std::__debug::list<item, std::allocator<item> > >&, point, std::string)> (this=0x25a1138, active=true, 
    processor=0x930d84 <process_map_items(item_stack&, std::__debug::list<item, std::allocator<item> >::iterator&, point, std::string)>, signal=...)
    at src/map.cpp:3130
#14 0x00000000009312f9 in map::process_active_items (this=0x25a1138) at src/map.cpp:3119
#15 0x000000000066da37 in game::do_turn (this=0x25a1010) at src/game.cpp:1477
#16 0x00000000008fcabc in main (argc=0, argv=0x7fffffffe3f0) at src/main.cpp:295

@adrianrieck
Copy link
Author

I am starting to suspect this has nothing to do with composite armor but actually the X number of modifications you can do on a vehicle maybe? It seems to happen now regardless what modification I try do to the truck.

@adrianrieck adrianrieck changed the title Crash when adding more composite armor on vehicle. Crash when reached X number of modifications on vehicle. Feb 3, 2015
@kevingranade
Copy link
Member

kevingranade commented Feb 4, 2015 via email

@KA101 KA101 added the <Crash / Freeze> Fatal bug that results in hangs or crashes. label Feb 4, 2015
@bdragon28
Copy link
Contributor

I was getting this crash too. I suspect it's a problem with GCC 4.7's debugging headers. I couldn't get this to happen when I compiled with GCC 4.9.

@adrianrieck
Copy link
Author

I can confirm bdragon28's advice when I recompiled with GCC 4.9 the crash does not happen.

So I think we can close this if there are no objections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes.
Projects
None yet
Development

No branches or pull requests

5 participants