Skip to content

Instantly share code, notes, and snippets.

@singalen
Last active December 24, 2019 21:06
Show Gist options
  • Save singalen/373823224a1464bf78b28219c55fc3c1 to your computer and use it in GitHub Desktop.
Save singalen/373823224a1464bf78b28219c55fc3c1 to your computer and use it in GitHub Desktop.
Wesnoth crash on iPad
preprocessor_data::preprocessor_data(preprocessor_streambuf& t,
filesystem::scoped_istream i,
const std::string& history,
const std::string& name,
int linenum,
const std::string& directory,
const std::string& domain,
std::unique_ptr<std::map<std::string, std::string>> defines,
bool is_define)
: preprocessor(t)
, in_scope_(std::move(i))
, in_(*in_scope_)
, directory_(directory)
, strings_()
, local_defines_(std::move(defines))
, tokens_()
, slowpath_(0)
, skipping_(0)
, linenum_(linenum)
, is_define_(is_define) // The crash (line 816) is here, at the end of initializers (maybe in std::move(defines)?)
{
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x000000000282bc68
VM Region Info: 0x282bc68 is not in any region. Bytes before following region: 4255712152
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 00000001002bc000-0000000100da0000 [ 10.9M] r-x/r-x SM=COW ...rwesnoth-iPad
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [2711]
Triggered by Thread: 7
0 battleforwesnoth-iPad 0x00000001003c4928 std::__1::pair<std::__1::__tree_iterator<std::__1::__value_type<std::__1::basic_string<char, std:... + 96 (string:1406)
1 battleforwesnoth-iPad 0x0000000100ac3620 preprocessor_data::preprocessor_data(preprocessor_streambuf&, std::__1::unique_ptr<std::__1::basi... + 540 (map:1431)
2 battleforwesnoth-iPad 0x0000000100ac3268 void preprocessor_streambuf::add_preprocessor<preprocessor_data, std::__1::unique_ptr<std::__1::b... + 240 (preprocessor.cpp:816)
3 battleforwesnoth-iPad 0x0000000100ac3074 preprocessor_file::init() + 344 (preprocessor.cpp:789)
4 battleforwesnoth-iPad 0x0000000100acc864 preprocessor_file::get_chunk() + 200 (preprocessor.cpp:588)
5 battleforwesnoth-iPad 0x0000000100ac13d4 preprocessor_streambuf::underflow() + 428 (preprocessor.cpp:417)
6 battleforwesnoth-iPad 0x000000010038530c tokenizer::next_token() + 2128 (streambuf:196)
7 battleforwesnoth-iPad 0x00000001003de214 (anonymous namespace)::parser::operator()() + 2404 (parser.cpp:323)
8 battleforwesnoth-iPad 0x00000001003dd860 read(config&, std::__1::basic_istream<char, std::__1::char_traits<char> >&, abstract_validator*) + 96 (parser.cpp:614)
9 battleforwesnoth-iPad 0x00000001008b6a0c game_config::config_cache::read_cache(std::__1::basic_string<char, std::__1::char_traits<char>, s... + 4812 (config_cache.cpp:151)
10 battleforwesnoth-iPad 0x00000001008b4fc8 game_config::config_cache::load_configs(std::__1::basic_string<char, std::__1::char_traits<char>,... + 68 (config_cache.cpp:297)
11 battleforwesnoth-iPad 0x00000001003d4ab0 game_config_manager::load_game_config(game_config_manager::FORCE_RELOAD_CONFIG, game_classificati... + 1856 (game_config_manager.cpp:263)
12 battleforwesnoth-iPad 0x00000001003d4214 game_config_manager::load_game_config_with_loadscreen(game_config_manager::FORCE_RELOAD_CONFIG, g... + 820 (game_config_manager.cpp:139)
13 battleforwesnoth-iPad 0x00000001003d3af4 game_config_manager::init_game_config(game_config_manager::FORCE_RELOAD_CONFIG) + 568 (game_config_manager.cpp:90)
14 battleforwesnoth-iPad 0x00000001008d7460 std::__1::__function::__func<do_gameloop(std::__1::vector<std::__1::basic_string<char, std::__1::... + 36 (wesnoth.cpp:702)
15 battleforwesnoth-iPad 0x0000000100904b70 boost::detail::thread_data<gui2::dialogs::loading_screen::pre_show(gui2::window&)::$_0>::run() + 48 (functional:1913)
16 battleforwesnoth-iPad 0x0000000100e11f10 boost::(anonymous namespace)::thread_proxy(void*) + 80 (thread.cpp:167)
17 libsystem_pthread.dylib 0x00000001912a3d8c _pthread_start + 156 (pthread.c:896)
18 libsystem_pthread.dylib 0x00000001912a776c thread_start + 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment