I installed stock binary of Wesnoth on FreeBSD 11, this is on a virtualbox VM, I have a similar setup on FreeBSD 10.3 amd64 and Wesnoth works fine, details from the affected installation: [..] % uname -a FreeBSD freebsd 11.0-RELEASE-p2 FreeBSD 11.0-RELEASE-p2 #0: Mon Oct 24 06:55:27 UTC 2016 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 % freebsd-version 11.0-RELEASE-p7 % pkg info wesnoth wesnoth-1.12.6_1,1 Name : wesnoth Version : 1.12.6_1,1 Installed on : Sun Jan 15 11:10:23 2017 IST Origin : games/wesnoth Architecture : freebsd:11:x86:64 Prefix : /usr/local Categories : games Licenses : GPLv3 or GPLv2 Maintainer : tz@FreeBSD.org WWW : http://www.wesnoth.org/ Comment : Fantasy turn-based strategy game Options : ANA : off CAMPAIGN : on DOCS : on FRIBIDI : on LOWMEM : off NLS : on NOTIFY : on OPENMP : on RAWSOCKETS : off SERVER : on TEST : off TOOLS : on Annotations : cpe : cpe:2.3:a:wesnoth:battle_for_wesnoth:1.12.6:::::freebsd11:x64:1 repo_type : binary repository : FreeBSD Flat size : 469MiB [..] When I run the GNU debugger on the core, I get: [..] (gdb) core wesnoth.core Core was generated by `wesnoth'. Program terminated with signal 6, Aborted. #0 0x000000080607e55a in ?? () (gdb) [..]
Same issue. Backtrace: -- #0 0x000000080608255a in thr_kill () from /lib/libc.so.7 [New Thread 80da95300 (LWP 100196/<unknown>)] [New Thread 80da93a00 (LWP 100190/<unknown>)] [New Thread 80da16000 (LWP 100948/<unknown>)] (gdb) bt #0 0x000000080608255a in thr_kill () from /lib/libc.so.7 #1 0x000000080608252b in raise () from /lib/libc.so.7 #2 0x0000000806082499 in abort () from /lib/libc.so.7 #3 0x0000000805752078 in __cxa_call_unexpected () from /lib/libcxxrt.so.1 #4 0x00000008025c8b7f in boost::locale::conv::impl::convert_to<wchar_t> () from /usr/local/lib/libboost_locale.so.1.63.0 #5 0x00000008025c853d in boost::locale::conv::to_utf<wchar_t> () from /usr/local/lib/libboost_locale.so.1.63.0 #6 0x00000008025e3511 in boost::locale::util::simple_converter_impl::simple_converter_impl () from /usr/local/lib/libboost_locale.so.1.63.0 #7 0x00000008025e3175 in boost::locale::util::create_simple_codecvt () from /usr/local/lib/libboost_locale.so.1.63.0 #8 0x00000008025e6a93 in boost::locale::impl_icu::create_codecvt () from /usr/local/lib/libboost_locale.so.1.63.0 #9 0x00000008025f1c41 in boost::locale::impl_icu::icu_localization_backend::install () from /usr/local/lib/libboost_locale.so.1.63.0 #10 0x00000008025d5c98 in boost::locale::localization_backend_manager::impl::actual_backend::install () from /usr/local/lib/libboost_locale.so.1.63.0 #11 0x00000008025d1cdd in boost::locale::generator::generate () from /usr/local/lib/libboost_locale.so.1.63.0 #12 0x00000008025d1a8d in boost::locale::generator::generate () from /usr/local/lib/libboost_locale.so.1.63.0 #13 0x0000000000b6f170 in boost::detail::sp_counted_impl_p<boost::filesystem::detail::dir_itr_imp>::dispose () #14 0x00007fffffffd0c0 in ?? () #15 0x0000000803b97519 in pthread_mutex_lock () from /lib/libthr.so.3 Previous frame inner to this frame (corrupt stack?) --
Looks like wesnoth assume UTF-8 charset by default. as work-around: env LANG=en_US.UTF-8 wesnoth As solution: - add info to pkg-message? or patch wesnoth for setenv(3) on the start when LANG is empty or LC_LOCALE=C ?
Thanks for getting into the issue! :) I will hopefully have some time this week and check your solution-suggestions!
Hello, back from illness i'm currently looking at this issue. While not too lucky with it, i would prefer a message put into pkg-message. Do you thing the follow text is clear enough and provides enough hints for the situation: === Start === Attention: Wesnoth will crash when not using an UTF-8 charset. If in doubt set charset before starting wesnoth: env LANG=en_US.UTF-8 wesnoth === End === Greetings, Torsten
A commit references this bug: Author: tz Date: Tue May 16 12:27:43 UTC 2017 New revision: 440997 URL: https://svnweb.freebsd.org/changeset/ports/440997 Log: games/wesnoth: add pkg-message for charset information Wesnoth assumes an UTF-8 charset by default. Using another one will result in a crash of Wesnoth. Since the charset depends on the env, the user needs to take care itself. PR: 216500 Submitted by: mzs_47@yahoo.co.in Changes: head/games/wesnoth/pkg-message
Committed, thanks for the PR and your work on this issue!