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

Segmentation fault #6287

Closed
DorpsGek opened this issue Apr 26, 2015 · 2 comments
Closed

Segmentation fault #6287

DorpsGek opened this issue Apr 26, 2015 · 2 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

uzsolt opened the ticket and wrote:

I load the saved game (UZs Transport...) and want to make some modifications on the rails. Some seconds later the program exists with segmentation fault.
The crash* are attached.

System:
FreeBSD 10.1-RELEASE-p9

Attachments

Reported version: 1.5.0
Operating system: *BSD


This issue was imported from FlySpray: https://bugs.openttd.org/task/6287
@DorpsGek
Copy link
Member Author

frosch wrote:

Looks like ScriptList is using invalid iterators again:
==7040== Invalid read of size 8
==7040== at 0x4EA84F0: std::_Rb_tree_increment(std::_Rb_tree_node_base*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7040== by 0x9EE794: std::_Rb_tree_iterator<std::pair<long long const, long long> >::operator++(int) (stl_tree.h:196)
==7040== by 0x9ECC17: ScriptList::RemoveList(ScriptList*) (script_list.cpp:698)
==7040== by 0x7043DB: SQConvert::HelperT<void (ScriptList::)(ScriptList), true>::SQCall(ScriptList*, void (ScriptList::)(ScriptList), SQVM*) (squirrel_helper.hpp:269)
==7040== by 0x6F58D0: long long SQConvert::DefSQNonStaticCallback<ScriptList, void (ScriptList::)(ScriptList), (ScriptType)0>(SQVM*) (squirrel_helper.hpp:768)
==7040== by 0x6BEE44: SQVM::CallNative(SQNativeClosure*, long long, long long, SQObjectPtr&, bool&) (sqvm.cpp:1188)
==7040== by 0x6BA83F: SQVM::Execute(SQObjectPtr&, long long, long long, long long, SQObjectPtr&, unsigned long long, SQVM::ExecutionType) (sqvm.cpp:798)
==7040== by 0x694683: sq_resumecatch(SQVM*, int) (sqapi.cpp:1022)
==7040== by 0xA13FA5: Squirrel::Resume(int) (squirrel.cpp:201)
==7040== by 0xA107AD: ScriptInstance::GameLoop() (script_instance.cpp:239)
==7040== by 0x6C3595: AI::GameLoop() (ai_core.cpp:83)
==7040== by 0x91FB11: StateGameLoop() (openttd.cpp:1388)
==7040== Address 0x129a81b8 is 24 bytes inside a block of size 48 free'd
==7040== at 0x4C279DC: operator delete(void*) (vg_replace_malloc.c:457)
==7040== by 0x9F3129: __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<long long const, long long> > >::deallocate(std::_Rb_tree_node<std::pair<long long const, long long> >, unsigned long) (new_allocator.h:100)
==7040== by 0x9F215B: std::_Rb_tree<long long, std::pair<long long const, long long>, std::_Select1st<std::pair<long long const, long long> >, std::less, std::allocator<std::pair<long long const, long long> > >::_M_put_node(std::_Rb_tree_node<std::pair<long long const, long long> >
) (stl_tree.h:373)
==7040== by 0x9F091B: std::_Rb_tree<long long, std::pair<long long const, long long>, std::_Select1st<std::pair<long long const, long long> >, std::less, std::allocator<std::pair<long long const, long long> > >::_M_destroy_node(std::_Rb_tree_node<std::pair<long long const, long long> >) (stl_tree.h:420)
==7040== by 0x9F1F83: std::_Rb_tree<long long, std::pair<long long const, long long>, std::_Select1st<std::pair<long long const, long long> >, std::less, std::allocator<std::pair<long long const, long long> > >::_M_erase_aux(std::_Rb_tree_const_iterator<std::pair<long long const, long long> >) (stl_tree.h:1498)
==7040== by 0x9EFF73: std::_Rb_tree<long long, std::pair<long long const, long long>, std::_Select1st<std::pair<long long const, long long> >, std::less, std::allocator<std::pair<long long const, long long> > >::erase(std::_Rb_tree_iterator<std::pair<long long const, long long> >) (stl_tree.h:777)
==7040== by 0x9EEF4A: std::map<long long, long long, std::less, std::allocator<std::pair<long long const, long long> > >::erase(std::_Rb_tree_iterator<std::pair<long long const, long long> >) (stl_map.h:624)
==7040== by 0x9EBBAF: ScriptList::RemoveItem(long long) (script_list.cpp:461)
==7040== by 0x9ECC06: ScriptList::RemoveList(ScriptList
) (script_list.cpp:699)
==7040== by 0x7043DB: SQConvert::HelperT<void (ScriptList::)(ScriptList), true>::SQCall(ScriptList*, void (ScriptList::)(ScriptList), SQVM*) (squirrel_helper.hpp:269)
==7040== by 0x6F58D0: long long SQConvert::DefSQNonStaticCallback<ScriptList, void (ScriptList::)(ScriptList), (ScriptType)0>(SQVM*) (squirrel_helper.hpp:768)
==7040== by 0x6BEE44: SQVM::CallNative(SQNativeClosure*, long long, long long, SQObjectPtr&, bool&) (sqvm.cpp:1188)
==7040==
==7040== Invalid read of size 8
==7040== at 0x4EA850E: std::_Rb_tree_increment(std::_Rb_tree_node_base*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==7040== by 0x9EE794: std::_Rb_tree_iterator<std::pair<long long const, long long> >::operator++(int) (stl_tree.h:196)
==7040== by 0x9ECC17: ScriptList::RemoveList(ScriptList*) (script_list.cpp:698)
==7040== by 0x7043DB: SQConvert::HelperT<void (ScriptList::)(ScriptList), true>::SQCall(ScriptList*, void (ScriptList::)(ScriptList), SQVM*) (squirrel_helper.hpp:269)
==7040== by 0x6F58D0: long long SQConvert::DefSQNonStaticCallback<ScriptList, void (ScriptList::)(ScriptList), (ScriptType)0>(SQVM*) (squirrel_helper.hpp:768)
==7040== by 0x6BEE44: SQVM::CallNative(SQNativeClosure*, long long, long long, SQObjectPtr&, bool&) (sqvm.cpp:1188)
==7040== by 0x6BA83F: SQVM::Execute(SQObjectPtr&, long long, long long, long long, SQObjectPtr&, unsigned long long, SQVM::ExecutionType) (sqvm.cpp:798)
==7040== by 0x694683: sq_resumecatch(SQVM*, int) (sqapi.cpp:1022)
==7040== by 0xA13FA5: Squirrel::Resume(int) (squirrel.cpp:201)
==7040== by 0xA107AD: ScriptInstance::GameLoop() (script_instance.cpp:239)
==7040== by 0x6C3595: AI::GameLoop() (ai_core.cpp:83)
==7040== by 0x91FB11: StateGameLoop() (openttd.cpp:1388)
==7040== Address 0x11b03818 is 8 bytes inside a block of size 48 free'd
==7040== at 0x4C279DC: operator delete(void*) (vg_replace_malloc.c:457)
==7040== by 0x9F3129: __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<long long const, long long> > >::deallocate(std::_Rb_tree_node<std::pair<long long const, long long> >, unsigned long) (new_allocator.h:100)
==7040== by 0x9F215B: std::_Rb_tree<long long, std::pair<long long const, long long>, std::_Select1st<std::pair<long long const, long long> >, std::less, std::allocator<std::pair<long long const, long long> > >::_M_put_node(std::_Rb_tree_node<std::pair<long long const, long long> >
) (stl_tree.h:373)
==7040== by 0x9F091B: std::_Rb_tree<long long, std::pair<long long const, long long>, std::_Select1st<std::pair<long long const, long long> >, std::less, std::allocator<std::pair<long long const, long long> > >::_M_destroy_node(std::_Rb_tree_node<std::pair<long long const, long long> >) (stl_tree.h:420)
==7040== by 0x9F1F83: std::_Rb_tree<long long, std::pair<long long const, long long>, std::_Select1st<std::pair<long long const, long long> >, std::less, std::allocator<std::pair<long long const, long long> > >::_M_erase_aux(std::_Rb_tree_const_iterator<std::pair<long long const, long long> >) (stl_tree.h:1498)
==7040== by 0x9EFF73: std::_Rb_tree<long long, std::pair<long long const, long long>, std::_Select1st<std::pair<long long const, long long> >, std::less, std::allocator<std::pair<long long const, long long> > >::erase(std::_Rb_tree_iterator<std::pair<long long const, long long> >) (stl_tree.h:777)
==7040== by 0x9EEF4A: std::map<long long, long long, std::less, std::allocator<std::pair<long long const, long long> > >::erase(std::_Rb_tree_iterator<std::pair<long long const, long long> >) (stl_map.h:624)
==7040== by 0x9EBBAF: ScriptList::RemoveItem(long long) (script_list.cpp:461)
==7040== by 0x9ECC06: ScriptList::RemoveList(ScriptList
) (script_list.cpp:699)
==7040== by 0x7043DB: SQConvert::HelperT<void (ScriptList::)(ScriptList), true>::SQCall(ScriptList*, void (ScriptList::)(ScriptList), SQVM*) (squirrel_helper.hpp:269)
==7040== by 0x6F58D0: long long SQConvert::DefSQNonStaticCallback<ScriptList, void (ScriptList::)(ScriptList), (ScriptType)0>(SQVM*) (squirrel_helper.hpp:768)
==7040== by 0x6BEE44: SQVM::CallNative(SQNativeClosure*, long long, long long, SQObjectPtr&, bool&) (sqvm.cpp:1188)


This comment was imported from FlySpray: https://bugs.openttd.org/task/6287#comment13879

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Fixed

in r27258


This comment was imported from FlySpray: https://bugs.openttd.org/task/6287

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
@DorpsGek DorpsGek mentioned this issue Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant