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

Tried to access invalid map position #27850

Closed
dmtrygrey opened this issue Jan 25, 2019 · 3 comments
Closed

Tried to access invalid map position #27850

dmtrygrey opened this issue Jan 25, 2019 · 3 comments
Labels
<Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` <Crash / Freeze> Fatal bug that results in hangs or crashes. Map / Mapgen Overmap, Mapgen, Map extras, Map display
Milestone

Comments

@dmtrygrey
Copy link

Describe the bug
Randomly crashed when I was walking in a forest. Couldn't replicate.

Versions and configuration(please complete the following information):

  • OS: debian x64
  • Game Version 0.C-37051-g0525397e52
  • Graphics version TILES
  • Mods loaded (almost all of them)

Additional context
Debug log

-----------------------------------------
19:26:57.307 : Starting log.
19:26:57.307 INFO : Cataclysm DDA version 0.C-37051-g0525397e52
19:26:57.309 INFO : Number of render drivers on your system: 3
19:26:57.309 INFO : Render driver: 0/opengl
19:26:57.309 INFO : Render driver: 1/opengles2
19:26:57.309 INFO : Render driver: 2/software
19:26:57.474 INFO : SDL version used during compile is 2.0.8
19:26:57.474 INFO : SDL version used during linking and in runtime is 2.0.8
19:26:57.603 INFO : Active renderer: 1/opengles2
19:26:57.950 INFO : USE_COLOR_MODULATED_TEXTURES is set to 0
19:26:57.988 WARNING : opendir [./mods/] failed with "No such file or directory".
21:09:35.346 ERROR : (error message will follow backtrace)
	./cataclysm-tiles(_Z21debug_write_backtraceRSo+0x2f) [0x5590ad4d643a]
	./cataclysm-tiles(_Z8DebugLog10DebugLevel10DebugClass+0x104) [0x5590ad4d698f]
	./cataclysm-tiles(_ZNK13color_manager10name_to_idERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x50) [0x5590ad48bef2]
	./cataclysm-tiles(_ZNK13color_manager13name_to_colorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x9) [0x5590ad48bf1f]
	./cataclysm-tiles(_Z17color_from_stringRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x17b) [0x5590ad48fd2c]
	./cataclysm-tiles(_Z17load_season_arrayISt5arrayI8nc_colorLm4EEPFS1_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvR10JsonObjectSA_RT_T0_+0x3a) [0x5590ad6f9b48]
	./cataclysm-tiles(_ZN17map_data_common_t11load_symbolER10JsonObject+0x36c) [0x5590ad6f4af6]
	./cataclysm-tiles(_ZN5ter_t4loadER10JsonObjectRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x109) [0x5590ad6f6485]
	./cataclysm-tiles(_ZN15generic_factoryI5ter_tE4loadER10JsonObjectRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xef) [0x5590ad6fde29]
	./cataclysm-tiles(_Z12load_terrainR10JsonObjectRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x55) [0x5590ad6f6b47]
	./cataclysm-tiles(_ZN17DynamicDataLoader11load_objectER10JsonObjectRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_S9_+0x102) [0x5590ad5d8ce2]
	./cataclysm-tiles(_ZN17DynamicDataLoader18load_all_from_jsonER6JsonInRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER10loading_uiS9_S9_+0xfc) [0x5590ad5d9c94]
	./cataclysm-tiles(_ZN17DynamicDataLoader19load_data_from_pathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_R10loading_ui+0x198) [0x5590ad5d9ea8]
	./cataclysm-tiles(_ZN4game18load_data_from_dirERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_R10loading_ui+0x4e) [0x5590ad54ffc4]
	./cataclysm-tiles(_ZN4game10load_packsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorI9string_idI15MOD_INFORMATIONESaISB_EER10loading_ui+0x164) [0x5590ad5628ce]
	./cataclysm-tiles(_ZN4game19load_world_modfilesER10loading_ui+0x3b7) [0x5590ad562edd]
	./cataclysm-tiles(_ZN4game5setupEv+0x7a) [0x5590ad56305c]
	./cataclysm-tiles(_ZN9main_menu17new_character_tabEv+0x4af) [0x5590ad6c36a1]
	./cataclysm-tiles(_ZN9main_menu14opening_screenEv+0x6db) [0x5590ad6c5463]
	./cataclysm-tiles(main+0x1453) [0x5590ad358b52]

	Attempting to repeat stack trace using debug symbols...
	debug_write_backtrace(std::ostream&)
	??:?
	DebugLog(DebugLevel, DebugClass)
	??:?
	color_manager::name_to_id(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const
	??:?
	color_manager::name_to_color(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const
	??:?
	color_from_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	void load_season_array<std::array<nc_color, 4ul>, nc_color (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>(JsonObject&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::array<nc_color, 4ul>&, nc_color (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))
	??:?
	map_data_common_t::load_symbol(JsonObject&)
	??:?
	ter_t::load(JsonObject&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	generic_factory<ter_t>::load(JsonObject&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	load_terrain(JsonObject&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	DynamicDataLoader::load_object(JsonObject&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	DynamicDataLoader::load_all_from_json(JsonIn&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, loading_ui&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	DynamicDataLoader::load_data_from_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, loading_ui&)
	??:?
	game::load_data_from_dir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, loading_ui&)
	??:?
	game::load_packs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<string_id<MOD_INFORMATION>, std::allocator<string_id<MOD_INFORMATION> > > const&, loading_ui&)
	??:?
	game::load_world_modfiles(loading_ui&)
	??:?
	game::setup()
	??:?
	main_menu::new_character_tab()
	??:?
	main_menu::opening_screen()
	??:?
	main
	??:?
Backtrace emission took 0 seconds.
couldn't parse color: c_black_light_red
21:09:35.529 ERROR : couldn't parse color: c_magenta_light_cyan
21:09:35.580 ERROR : couldn't parse color: c_yellow   
21:09:35.753 WARNING : opendir [./save/Topmost/mods] failed with "No such file or directory".
21:09:41.211 INFO : Loaded tileset: MSX++DEAD_PEOPLE
21:19:35.679 ERROR : (error message will follow backtrace)
	./cataclysm-tiles(_Z21debug_write_backtraceRSo+0x2f) [0x5590ad4d643a]
	./cataclysm-tiles(_Z8DebugLog10DebugLevel10DebugClass+0x104) [0x5590ad4d698f]
	./cataclysm-tiles(_ZNK13color_manager10name_to_idERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x50) [0x5590ad48bef2]
	./cataclysm-tiles(_ZNK13color_manager13name_to_colorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x9) [0x5590ad48bf1f]
	./cataclysm-tiles(_Z17color_from_stringRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x17b) [0x5590ad48fd2c]
	./cataclysm-tiles(_Z17load_season_arrayISt5arrayI8nc_colorLm4EEPFS1_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvR10JsonObjectSA_RT_T0_+0x3a) [0x5590ad6f9b48]
	./cataclysm-tiles(_ZN17map_data_common_t11load_symbolER10JsonObject+0x36c) [0x5590ad6f4af6]
	./cataclysm-tiles(_ZN5ter_t4loadER10JsonObjectRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x109) [0x5590ad6f6485]
	./cataclysm-tiles(_ZN15generic_factoryI5ter_tE4loadER10JsonObjectRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xef) [0x5590ad6fde29]
	./cataclysm-tiles(_Z12load_terrainR10JsonObjectRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x55) [0x5590ad6f6b47]
	./cataclysm-tiles(_ZN17DynamicDataLoader11load_objectER10JsonObjectRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_S9_+0x102) [0x5590ad5d8ce2]
	./cataclysm-tiles(_ZN17DynamicDataLoader18load_all_from_jsonER6JsonInRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER10loading_uiS9_S9_+0xfc) [0x5590ad5d9c94]
	./cataclysm-tiles(_ZN17DynamicDataLoader19load_data_from_pathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_R10loading_ui+0x198) [0x5590ad5d9ea8]
	./cataclysm-tiles(_ZN4game18load_data_from_dirERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_R10loading_ui+0x4e) [0x5590ad54ffc4]
	./cataclysm-tiles(_ZN4game10load_packsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorI9string_idI15MOD_INFORMATIONESaISB_EER10loading_ui+0x164) [0x5590ad5628ce]
	./cataclysm-tiles(_ZN4game19load_world_modfilesER10loading_ui+0x3b7) [0x5590ad562edd]
	./cataclysm-tiles(_ZN4game5setupEv+0x7a) [0x5590ad56305c]
	./cataclysm-tiles(_ZN9main_menu17new_character_tabEv+0x4af) [0x5590ad6c36a1]
	./cataclysm-tiles(_ZN9main_menu14opening_screenEv+0x6db) [0x5590ad6c5463]
	./cataclysm-tiles(main+0x1453) [0x5590ad358b52]

	Attempting to repeat stack trace using debug symbols...
	debug_write_backtrace(std::ostream&)
	??:?
	DebugLog(DebugLevel, DebugClass)
	??:?
	color_manager::name_to_id(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const
	??:?
	color_manager::name_to_color(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const
	??:?
	color_from_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	void load_season_array<std::array<nc_color, 4ul>, nc_color (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>(JsonObject&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::array<nc_color, 4ul>&, nc_color (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))
	??:?
	map_data_common_t::load_symbol(JsonObject&)
	??:?
	ter_t::load(JsonObject&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	generic_factory<ter_t>::load(JsonObject&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	load_terrain(JsonObject&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	DynamicDataLoader::load_object(JsonObject&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	DynamicDataLoader::load_all_from_json(JsonIn&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, loading_ui&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	DynamicDataLoader::load_data_from_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, loading_ui&)
	??:?
	game::load_data_from_dir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, loading_ui&)
	??:?
	game::load_packs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<string_id<MOD_INFORMATION>, std::allocator<string_id<MOD_INFORMATION> > > const&, loading_ui&)
	??:?
	game::load_world_modfiles(loading_ui&)
	??:?
	game::setup()
	??:?
	main_menu::new_character_tab()
	??:?
	main_menu::opening_screen()
	??:?
	main
	??:?
Backtrace emission took 0 seconds.
couldn't parse color: c_black_light_red
21:19:35.861 ERROR : couldn't parse color: c_magenta_light_cyan
21:19:35.908 ERROR : couldn't parse color: c_yellow   
21:19:36.071 WARNING : opendir [./save/Topmost/mods] failed with "No such file or directory".
21:19:37.715 INFO : Loaded tileset: MSX++DEAD_PEOPLE
22:40:50.711 ERROR : (error message will follow backtrace)
	./cataclysm-tiles(_Z21debug_write_backtraceRSo+0x2f) [0x5590ad4d643a]
	./cataclysm-tiles(_Z8DebugLog10DebugLevel10DebugClass+0x104) [0x5590ad4d698f]
	./cataclysm-tiles(_ZNK13color_manager10name_to_idERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x50) [0x5590ad48bef2]
	./cataclysm-tiles(_ZNK13color_manager13name_to_colorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x9) [0x5590ad48bf1f]
	./cataclysm-tiles(_Z17color_from_stringRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x17b) [0x5590ad48fd2c]
	./cataclysm-tiles(_Z17load_season_arrayISt5arrayI8nc_colorLm4EEPFS1_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvR10JsonObjectSA_RT_T0_+0x3a) [0x5590ad6f9b48]
	./cataclysm-tiles(_ZN17map_data_common_t11load_symbolER10JsonObject+0x36c) [0x5590ad6f4af6]
	./cataclysm-tiles(_ZN5ter_t4loadER10JsonObjectRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x109) [0x5590ad6f6485]
	./cataclysm-tiles(_ZN15generic_factoryI5ter_tE4loadER10JsonObjectRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xef) [0x5590ad6fde29]
	./cataclysm-tiles(_Z12load_terrainR10JsonObjectRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x55) [0x5590ad6f6b47]
	./cataclysm-tiles(_ZN17DynamicDataLoader11load_objectER10JsonObjectRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_S9_+0x102) [0x5590ad5d8ce2]
	./cataclysm-tiles(_ZN17DynamicDataLoader18load_all_from_jsonER6JsonInRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER10loading_uiS9_S9_+0xfc) [0x5590ad5d9c94]
	./cataclysm-tiles(_ZN17DynamicDataLoader19load_data_from_pathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_R10loading_ui+0x198) [0x5590ad5d9ea8]
	./cataclysm-tiles(_ZN4game18load_data_from_dirERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_R10loading_ui+0x4e) [0x5590ad54ffc4]
	./cataclysm-tiles(_ZN4game10load_packsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorI9string_idI15MOD_INFORMATIONESaISB_EER10loading_ui+0x164) [0x5590ad5628ce]
	./cataclysm-tiles(_ZN4game19load_world_modfilesER10loading_ui+0x3b7) [0x5590ad562edd]
	./cataclysm-tiles(_ZN4game5setupEv+0x7a) [0x5590ad56305c]
	./cataclysm-tiles(_ZN9main_menu17new_character_tabEv+0x4af) [0x5590ad6c36a1]
	./cataclysm-tiles(_ZN9main_menu14opening_screenEv+0x6db) [0x5590ad6c5463]
	./cataclysm-tiles(main+0x1453) [0x5590ad358b52]

	Attempting to repeat stack trace using debug symbols...
	debug_write_backtrace(std::ostream&)
	??:?
	DebugLog(DebugLevel, DebugClass)
	??:?
	color_manager::name_to_id(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const
	??:?
	color_manager::name_to_color(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const
	??:?
	color_from_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	void load_season_array<std::array<nc_color, 4ul>, nc_color (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>(JsonObject&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::array<nc_color, 4ul>&, nc_color (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))
	??:?
	map_data_common_t::load_symbol(JsonObject&)
	??:?
	ter_t::load(JsonObject&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	generic_factory<ter_t>::load(JsonObject&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	load_terrain(JsonObject&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	DynamicDataLoader::load_object(JsonObject&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	DynamicDataLoader::load_all_from_json(JsonIn&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, loading_ui&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	DynamicDataLoader::load_data_from_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, loading_ui&)
	??:?
	game::load_data_from_dir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, loading_ui&)
	??:?
	game::load_packs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<string_id<MOD_INFORMATION>, std::allocator<string_id<MOD_INFORMATION> > > const&, loading_ui&)
	??:?
	game::load_world_modfiles(loading_ui&)
	??:?
	game::setup()
	??:?
	main_menu::new_character_tab()
	??:?
	main_menu::opening_screen()
	??:?
	main
	??:?
Backtrace emission took 0 seconds.
couldn't parse color: c_black_light_red
22:40:50.892 ERROR : couldn't parse color: c_magenta_light_cyan
22:40:50.942 ERROR : couldn't parse color: c_yellow   
22:40:51.114 WARNING : opendir [./save/Topmost/mods] failed with "No such file or directory".
22:40:52.764 INFO : Loaded tileset: MSX++DEAD_PEOPLE
23:45:19.464 ERROR : (error message will follow backtrace)
	./cataclysm-tiles(_Z21debug_write_backtraceRSo+0x2f) [0x5590ad4d643a]
	./cataclysm-tiles(_Z8DebugLog10DebugLevel10DebugClass+0x104) [0x5590ad4d698f]
	./cataclysm-tiles(_Z12realDebugmsgPKcS0_S0_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x12d) [0x5590ad4d6ed5]
	./cataclysm-tiles(_Z12realDebugmsgIJRKiS1_S1_EEvPKcS3_S3_S3_DpOT_+0xda) [0x5590ad6e60d2]
	./cataclysm-tiles(_ZNK3map10get_nonantERK8tripoint+0x57) [0x5590ad6cdb49]
	./cataclysm-tiles(_ZNK3map18get_submap_at_gridERK8tripoint+0x9) [0x5590ad6cdb73]
	./cataclysm-tiles(_ZNK3map13get_submap_atERK8tripoint+0x77) [0x5590ad6cfdeb]
	./cataclysm-tiles(_ZNK3map3terERK8tripoint+0x31) [0x5590ad6d0503]
	./cataclysm-tiles(_ZNK3map12has_flag_terE12ter_bitflagsRK8tripoint+0xf) [0x5590ad6d0be9]
	./cataclysm-tiles(_ZN3map18add_vehicle_to_mapESt10unique_ptrI7vehicleSt14default_deleteIS1_EEb+0xe9) [0x5590ad701cc3]
	./cataclysm-tiles(_ZN3map11add_vehicleERK9string_idI17vehicle_prototypeERK8tripointiiib+0x259) [0x5590ad70bc23]
	./cataclysm-tiles(_ZN3map11add_vehicleERK9string_idI12VehicleGroupERK5pointiiib+0x69) [0x5590ad7267b9]
	./cataclysm-tiles(_ZNK15jmapgen_vehicle5applyERK10mapgendataRK11jmapgen_intS5_f+0xc6) [0x5590ad739e0e]
	./cataclysm-tiles(_ZNK15jmapgen_objects5applyERK10mapgendataf+0x5c) [0x5590ad6ffe74]
	./cataclysm-tiles(_ZNK15jmapgen_objects5applyERK10mapgendataiif+0x22) [0x5590ad6ffeb6]
	./cataclysm-tiles(_ZN20mapgen_function_json8generateEP3mapRK6int_idI6oter_tERK10mapgendataRK10time_pointf+0xda) [0x5590ad7056bc]
	./cataclysm-tiles(_ZN3map8draw_mapERK6int_idI6oter_tES4_S4_S4_S4_S4_S4_S4_S4_S4_S4_RK10time_pointfiPK17regional_settings+0x278) [0x5590ad70bfea]
	./cataclysm-tiles(_ZN3map8generateEiiiRK10time_point+0x49f) [0x5590ad726339]
	./cataclysm-tiles(_ZN3map5loadnEiiib+0x40a) [0x5590ad6dab6e]
	./cataclysm-tiles(_ZN3map5shiftEii+0x3dc) [0x5590ad6db236]

	Attempting to repeat stack trace using debug symbols...
	debug_write_backtrace(std::ostream&)
	??:?
	DebugLog(DebugLevel, DebugClass)
	??:?
	realDebugmsg(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
	??:?
	void realDebugmsg<int const&, int const&, int const&>(char const*, char const*, char const*, char const*, int const&, int const&, int const&)
	??:?
	map::get_nonant(tripoint const&) const
	??:?
	map::get_submap_at_grid(tripoint const&) const
	??:?
	map::get_submap_at(tripoint const&) const
	??:?
	map::ter(tripoint const&) const
	??:?
	map::has_flag_ter(ter_bitflags, tripoint const&) const
	??:?
	map::add_vehicle_to_map(std::unique_ptr<vehicle, std::default_delete<vehicle> >, bool)
	??:?
	map::add_vehicle(string_id<vehicle_prototype> const&, tripoint const&, int, int, int, bool)
	??:?
	map::add_vehicle(string_id<VehicleGroup> const&, point const&, int, int, int, bool)
	??:?
	jmapgen_vehicle::apply(mapgendata const&, jmapgen_int const&, jmapgen_int const&, float) const
	??:?
	jmapgen_objects::apply(mapgendata const&, float) const
	??:?
	jmapgen_objects::apply(mapgendata const&, int, int, float) const
	??:?
	mapgen_function_json::generate(map*, int_id<oter_t> const&, mapgendata const&, time_point const&, float)
	??:?
	map::draw_map(int_id<oter_t> const&, int_id<oter_t> const&, int_id<oter_t> const&, int_id<oter_t> const&, int_id<oter_t> const&, int_id<oter_t> const&, int_id<oter_t> const&, int_id<oter_t> const&, int_id<oter_t> const&, int_id<oter_t> const&, int_id<oter_t> const&, time_point const&, float, int, regional_settings const*)
	??:?
	map::generate(int, int, int, time_point const&)
	??:?
	map::loadn(int, int, int, bool)
	??:?
	map::shift(int, int)
	??:?
Backtrace emission took 0 seconds.
src/map.cpp:7730 [size_t map::get_nonant(const tripoint&) const] Tried to access invalid map position at grid (2,0,0)
23:45:28.651 ERROR : src/map.cpp:7730 [size_t map::get_nonant(const tripoint&) const] Tried to access invalid map position at grid (2,0,0)
23:45:29.519 ERROR : src/map.cpp:7730 [size_t map::get_nonant(const tripoint&) const] Tried to access invalid map position at grid (2,0,0)
23:45:33.704 ERROR : src/map.cpp:7730 [size_t map::get_nonant(const tripoint&) const] Tried to access invalid map position at grid (2,1,0)
23:45:40.218 : Log shutdown.
-----------------------------------------
@kevingranade
Copy link
Member

This is almost certainly an error with #27825 , it's triggering mapgen (which creates a tinymap), attempts to place a vehicle, but the vehicle extends off the edge of the tinymap (happens normally, not a bug), the new bounds checking lets some checks through which are then rejected (correctly) by get_nonant.

Most likely it just needs to have the bounds adjusted, I might have just misunderstood something about setting up the arguments.

@kevingranade kevingranade added this to the 0.D milestone Jan 25, 2019
@kevingranade kevingranade added <Bug> This needs to be fixed <Crash / Freeze> Fatal bug that results in hangs or crashes. Map / Mapgen Overmap, Mapgen, Map extras, Map display [C++] Changes (can be) made in C++. Previously named `Code` labels Jan 25, 2019
@kevingranade
Copy link
Member

Based on running this in the debugger, it looks like it's actually calling map::inbounds() instead of the new tinymap::inbounds I added, so it's not checking with the right boundaries.

@kevingranade
Copy link
Member

Turns out I forgot to add the virtual keyword to map::inbounds, so it wasn't getting invoked.
On the plus side, now there's a unit test 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` <Crash / Freeze> Fatal bug that results in hangs or crashes. Map / Mapgen Overmap, Mapgen, Map extras, Map display
Projects
None yet
Development

No branches or pull requests

2 participants