FS#35132 - [wesnoth] Version 1.10.6-3 SEGFAULT at start

Attached to Project: Community Packages
Opened by ap0calypse (ap0calypse) - Tuesday, 07 May 2013, 13:57 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Monday, 13 May 2013, 21:57 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

Description:

After updating to 1.10.6-3 via pacman, the game doesn't start anymore. I deleted everything (.local/share/wesnoth, .config/wesnoth, .cache/wesnoth) and tried again, but without success.

here is the error message, Is there a VERBOSE-mode so that i can get more information about the error?


########
Battle for Wesnoth v1.10.6
Started on Tue May 7 15:56:19 2013

20130507 15:56:19 error filesystem: Could not open '/home/ap0calypse/.config/wesnoth/preferences' for reading.

Data directory: /usr/share/wesnoth
User configuration directory: /home/ap0calypse/.config/wesnoth
User data directory: /home/ap0calypse/.local/share/wesnoth/1.10
Cache directory: /home/ap0calypse/.cache/wesnoth
Checking video mode: 1024x768x32...
setting mode to 1024x768x32
Segmentation fault (core dumped)
########

The error about the missing preferences file is not important, it doesn't work either way.

Additional info:
* package version(s)
* config and/or log files etc.


Steps to reproduce:

* upgrade to latest version of wesnoth
* start
* fail after setting video mode
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Monday, 13 May 2013, 21:57 GMT
Reason for closing:  Fixed
Comment by lainme (lainme) - Tuesday, 07 May 2013, 17:06 GMT
same here. Since the update is only an rebuild against libpng16, I tried to roll back only wesnoth and installed libpng15 from aur, the problem went away.

Here is the backtrace from core dump. I didn't compile wesnoth with debugging symbols.

(gdb) bt
#0 0x00007f04205d25e6 in __memcpy_ssse3_back () from /usr/lib/libc.so.6
#1 0x0000000000c825f6 in write_key_val_visitor::operator()(t_string const&) const ()
#2 0x0000000000c827f2 in write_key_val(std::ostream&, std::string const&, config::attribute_value const&, unsigned int, std::string&) ()
#3 0x0000000000c82b3b in ?? ()
#4 0x0000000000c82b99 in ?? ()
#5 0x0000000000c82ca8 in write(std::ostream&, config const&, unsigned int) ()
#6 0x000000000081006c in game_config::config_cache::write_file(std::string, config const&) ()
#7 0x0000000000814f2f in game_config::config_cache::read_cache(std::string const&, config&) ()
#8 0x00000000008161b9 in game_config::config_cache::load_configs(std::string const&, config&) ()
#9 0x000000000087a977 in game_controller::load_game_cfg(bool) ()
#10 0x000000000087bc4c in game_controller::init_config(bool) ()
#11 0x00000000006afba2 in _start ()
Comment by Michael Kogan (Photon) - Thursday, 09 May 2013, 17:43 GMT
For me it works for some time but then crashes randomly with segfault.
Comment by Matthias Blaicher (mabl) - Saturday, 11 May 2013, 12:22 GMT
I also have the same problem. After deleting the cache files, Wesnoth now hangs during load. Here is a debug build backtrace:

(gdb) bt
#0 0x00007ffff46cb5e6 in __memcpy_ssse3_back () from /usr/lib/libc.so.6
#1 0x0000000000c83b66 in copy (__n=23571401, __s2=0x1802b1f "", __s1=0x7fffe4169028 "") at /usr/include/c++/4.8.0/bits/char_traits.h:271
#2 _M_copy (__n=23571401, __s=0x1802b1f "", __d=0x7fffe4169028 "") at /usr/include/c++/4.8.0/bits/basic_string.h:359
#3 _S_copy_chars (__k2=<optimized out>, __k1=0x1802b1f "", __p=0x7fffe4169028 "") at /usr/include/c++/4.8.0/bits/basic_string.h:404
#4 _S_copy_chars (__k2=..., __k1=..., __p=0x7fffe4169028 "") at /usr/include/c++/4.8.0/bits/basic_string.h:396
#5 _S_construct<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char> > > (__a=..., __end=..., __beg=...) at /usr/include/c++/4.8.0/bits/basic_string.tcc:140
#6 _S_construct_aux<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char> > > (__a=..., __end=..., __beg=...) at /usr/include/c++/4.8.0/bits/basic_string.h:1725
#7 _S_construct<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char> > > (__a=..., __end=..., __beg=0 '\000') at /usr/include/c++/4.8.0/bits/basic_string.h:1746
#8 basic_string<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char> > > (__a=..., __end=..., __beg=0 '\000', this=0x7fffffffc290) at /usr/include/c++/4.8.0/bits/basic_string.tcc:229
#9 write_key_val_visitor::operator() (this=this@entry=0x7fffffffc350, value=...) at /home/mabl/tmp/wesnoth/src/wesnoth-1.10.6/src/serialization/parser.cpp:454
#10 0x0000000000c83d62 in internal_visit<t_string const> (operand=..., this=<synthetic pointer>) at /usr/include/boost/variant/variant.hpp:1017
#11 visitation_impl_invoke_impl<boost::detail::variant::invoke_visitor<write_key_val_visitor const>, void const*, t_string> (storage=<optimized out>, visitor=<synthetic pointer>) at /usr/include/boost/variant/detail/visitation_impl.hpp:130
#12 visitation_impl_invoke<boost::detail::variant::invoke_visitor<write_key_val_visitor const>, void const*, t_string, boost::variant<boost::blank, bool, double, std::basic_string<char>, t_string>::has_fallback_type_> (internal_which=<optimized out>, t=0x0,
storage=<optimized out>, visitor=<synthetic pointer>) at /usr/include/boost/variant/detail/visitation_impl.hpp:173
#13 visitation_impl<mpl_::int_<0>, boost::detail::variant::visitation_impl_step<boost::mpl::l_iter<boost::mpl::l_item<mpl_::long_<5l>, boost::blank, boost::mpl::l_item<mpl_::long_<4l>, bool, boost::mpl::l_item<mpl_::long_<3l>, double, boost::mpl::l_item<mpl_::long_<2l>, std::basic_string<char>, boost::mpl::l_item<mpl_::long_<1l>, t_string, boost::mpl::l_end> > > > > >, boost::mpl::l_iter<boost::mpl::l_end> >, boost::detail::variant::invoke_visitor<write_key_val_visitor const>, void const*, boost::variant<boost::blank, bool, double, std::basic_string<char>, t_string>::has_fallback_type_> (no_backup_flag=..., storage=<optimized out>, visitor=<synthetic pointer>, logical_which=<optimized out>, internal_which=<optimized out>)
at /usr/include/boost/variant/detail/visitation_impl.hpp:256
#14 internal_apply_visitor_impl<boost::detail::variant::invoke_visitor<write_key_val_visitor const>, void const*> (storage=<optimized out>, visitor=<synthetic pointer>, logical_which=<optimized out>, internal_which=<optimized out>)
at /usr/include/boost/variant/variant.hpp:2326
#15 internal_apply_visitor<boost::detail::variant::invoke_visitor<write_key_val_visitor const> > (visitor=<synthetic pointer>, this=0x7fffffffc518) at /usr/include/boost/variant/variant.hpp:2348
#16 apply_visitor<write_key_val_visitor const> (visitor=..., this=0x7fffffffc518) at /usr/include/boost/variant/variant.hpp:2370
#17 apply_visitor<write_key_val_visitor, boost::variant<boost::blank, bool, double, std::basic_string<char>, t_string> const> (visitable=..., visitor=...) at /usr/include/boost/variant/detail/apply_visitor_unary.hpp:76
#18 write_key_val (out=..., key="EASY", value=..., level=level@entry=1, textdomain="wesnoth") at /home/mabl/tmp/wesnoth/src/wesnoth-1.10.6/src/serialization/parser.cpp:487
#19 0x0000000000c840ab in write_internal (cfg=..., out=..., textdomain="wesnoth", tab=tab@entry=1) at /home/mabl/tmp/wesnoth/src/wesnoth-1.10.6/src/serialization/parser.cpp:507
#20 0x0000000000c84109 in write_internal (cfg=..., out=..., textdomain="wesnoth", tab=tab@entry=0) at /home/mabl/tmp/wesnoth/src/wesnoth-1.10.6/src/serialization/parser.cpp:513
#21 0x0000000000c84218 in write (out=..., cfg=..., level=0) at /home/mabl/tmp/wesnoth/src/wesnoth-1.10.6/src/serialization/parser.cpp:521
#22 0x0000000000c7d6d2 in config_writer::write (this=this@entry=0x7fffffffc4e0, cfg=...) at /home/mabl/tmp/wesnoth/src/wesnoth-1.10.6/src/serialization/binary_or_text.cpp:61
#23 0x000000000081002c in game_config::config_cache::write_file (this=this@entry=0x141cd80 <game_config::config_cache::instance()::cache>, path="/home/mabl/.cache/wesnoth/cache-v1.10.6-4b03bc13fbef76435b20adb444ffd64774ad1e10.gz", cfg=...)
at /home/mabl/tmp/wesnoth/src/wesnoth-1.10.6/src/config_cache.cpp:99
#24 0x0000000000814eef in game_config::config_cache::read_cache (this=this@entry=0x141cd80 <game_config::config_cache::instance()::cache>, path="/usr/share/wesnoth/data", cfg=...) at /home/mabl/tmp/wesnoth/src/wesnoth-1.10.6/src/config_cache.cpp:238
#25 0x0000000000816179 in game_config::config_cache::load_configs (this=0x141cd80 <game_config::config_cache::instance()::cache>, path="/usr/share/wesnoth/data", cfg=...) at /home/mabl/tmp/wesnoth/src/wesnoth-1.10.6/src/config_cache.cpp:285
#26 0x00000000008162b5 in game_config::config_cache::get_config (this=<optimized out>, path="/usr/share/wesnoth/data", cfg=...) at /home/mabl/tmp/wesnoth/src/wesnoth-1.10.6/src/config_cache.cpp:91
#27 0x000000000087a987 in game_controller::load_game_cfg (this=this@entry=0x14521f0, force=force@entry=false) at /home/mabl/tmp/wesnoth/src/wesnoth-1.10.6/src/game_controller.cpp:1133
#28 0x000000000087bc5c in game_controller::init_config (this=0x14521f0, force=<optimized out>) at /home/mabl/tmp/wesnoth/src/wesnoth-1.10.6/src/game_controller.cpp:293
#29 0x00000000006afc92 in do_gameloop (argc=argc@entry=1, argv=argv@entry=0x7fffffffdbf8) at /home/mabl/tmp/wesnoth/src/wesnoth-1.10.6/src/game.cpp:418
#30 0x0000000000694af2 in main (argc=1, argv=0x7fffffffdbf8) at /home/mabl/tmp/wesnoth/src/wesnoth-1.10.6/src/game.cpp:642
Comment by Matthias Blaicher (mabl) - Saturday, 11 May 2013, 12:56 GMT
Looks like there is an upstream bug for it: https://gna.org/bugs/index.php?20742

The forum patch solves the the problem for me:

diff -aur wesnoth-1.10.6/src/tstring.hpp wesnoth-1.10.6-patched/src/tstring.hpp
--- wesnoth-1.10.6/src/tstring.hpp 2013-01-01 10:34:55.000000000 +0100
+++ wesnoth-1.10.6-patched/src/tstring.hpp 2013-05-11 14:39:46.339670258 +0200
@@ -145,7 +145,7 @@
static t_string from_serialized(const std::string& string) { return t_string(base::from_serialized(string)); }
std::string to_serialized() const { return get().to_serialized(); }

- operator t_string_base() const { return get(); }
+ operator const t_string_base &() const { return get(); }

t_string operator+(const t_string& o) const { return get() + o.get(); }
t_string operator+(const std::string& o) const { return get() + o; }

Since this patch is already upstream and was only forgotten in this release, it might be possible to patch in Arch until there is a fixed release of wesnoth?

Loading...