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

the use of ü in savegamepaths crashes the game #618

Closed
stefson opened this issue Jan 8, 2017 · 6 comments
Closed

the use of ü in savegamepaths crashes the game #618

stefson opened this issue Jan 8, 2017 · 6 comments
Labels

Comments

@stefson
Copy link
Contributor

stefson commented Jan 8, 2017

I'm running the game at commit 3eb7b5c and was about to save, added an ü in the name of the savegame, and the game crashed with

terminate called after throwing an instance of 'boost::system::system_error'
what(): boost::filesystem::path codecvt to wstring: error

Program received signal SIGABRT, Aborted.
0x00007ffff603b137 in __GI_raise (sig=sig@entry=6)
at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0 0x00007ffff603b137 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1 0x00007ffff603c57a in __GI_abort () at abort.c:89
#2 0x00007ffff670700d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/libstdc++.so.6
#3 0x00007ffff6704e96 in ?? () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/libstdc++.so.6
#4 0x00007ffff6704ee1 in std::terminate() () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/libstdc++.so.6
#5 0x00007ffff67050f8 in __cxa_throw () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/libstdc++.so.6
#6 0x00007ffff72604e1 in boost::filesystem::path_traits::convert(char const*, char const*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&, std::codecvt<wchar_t, char, __mbstate_t> const&) () from /usr/lib64/libboost_filesystem.so.1.56.0
#7 0x000000000069262e in boost::filesystem::path::wstring (cvt=..., this=0x7fffffffd070) at /usr/include/boost/filesystem/path.hpp:392
#8 boost::filesystem::path::wstring (this=0x7fffffffd070) at /usr/include/boost/filesystem/path.hpp:386
#9 iwSaveLoad::RefreshTable (this=this@entry=0x69ba650) at /var/tmp/portage/games-strategy/s25rttr-9999-r2/work/s25rttr-9999/src/ingameWindows/iwSave.cpp:109
#10 0x00000000006930c9 in iwSave::SaveLoad (this=0x69ba650) at /var/tmp/portage/games-strategy/s25rttr-9999-r2/work/s25rttr-9999/src/ingameWindows/iwSave.cpp:138
#11 0x00000000006194de in ctrlButton::Msg_LeftUp (this=0x6ac1dd0, mc=...) at /var/tmp/portage/games-strategy/s25rttr-9999-r2/work/s25rttr-9999/src/controls/ctrlButton.cpp:85
#12 0x0000000000734ad6 in Window::RelayMouseMessage (this=this@entry=0x69ba650, msg=&virtual table offset 20172, this adjustment 6, mc=...)
at /var/tmp/portage/games-strategy/s25rttr-9999-r2/work/s25rttr-9999/src/Window.cpp:185
#13 0x00000000005db801 in WindowManager::Msg_LeftUp (this=0xcc5100, mc=...) at /var/tmp/portage/games-strategy/s25rttr-9999-r2/work/s25rttr-9999/src/WindowManager.cpp:436
#14 0x00007ffff263ebc5 in ?? ()
#15 0x0000000000cd1c40 in ?? ()
#16 0x0000000002e0000f in ?? ()
#17 0x0256032d00010006 in ?? ()
#18 0x0000000000000000 in ?? ()

@stefson
Copy link
Contributor Author

stefson commented Jan 8, 2017

Appareantly I will have to delete the save game on my own, I get another crash when I try to load it. To be more precise, it crashes straight away when I click on load game, before anything from the file list can be seen.

terminate called after throwing an instance of 'boost::system::system_error'
what(): boost::filesystem::path codecvt to wstring: error

Program received signal SIGABRT, Aborted.
0x00007ffff603b137 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0 0x00007ffff603b137 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1 0x00007ffff603c57a in __GI_abort () at abort.c:89
#2 0x00007ffff670700d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/libstdc++.so.6
#3 0x00007ffff6704e96 in ?? () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/libstdc++.so.6
#4 0x00007ffff6704ee1 in std::terminate() () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/libstdc++.so.6
#5 0x00007ffff67050f8 in __cxa_throw () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/libstdc++.so.6
#6 0x00007ffff72604e1 in boost::filesystem::path_traits::convert(char const*, char const*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&, std::codecvt<wchar_t, char, __mbstate_t> const&) () from /usr/lib64/libboost_filesystem.so.1.56.0
#7 0x000000000069262e in boost::filesystem::path::wstring (cvt=..., this=0x7fffffffce20) at /usr/include/boost/filesystem/path.hpp:392
#8 boost::filesystem::path::wstring (this=0x7fffffffce20) at /usr/include/boost/filesystem/path.hpp:386
#9 iwSaveLoad::RefreshTable (this=this@entry=0x569a890) at /var/tmp/portage/games-strategy/s25rttr-9999-r2/work/s25rttr-9999/src/ingameWindows/iwSave.cpp:109
#10 0x0000000000693d7d in iwLoad::iwLoad (this=0x569a890, csi=...) at /var/tmp/portage/games-strategy/s25rttr-9999-r2/work/s25rttr-9999/src/ingameWindows/iwSave.cpp:203
#11 0x00000000006393d1 in dskSinglePlayer::PrepareLoadGame (this=)
at /var/tmp/portage/games-strategy/s25rttr-9999-r2/work/s25rttr-9999/src/desktops/dskSinglePlayer.cpp:174
#12 0x0000000000639665 in dskSinglePlayer::Msg_ButtonClick (this=0x5688ee0, ctrl_id=)
at /var/tmp/portage/games-strategy/s25rttr-9999-r2/work/s25rttr-9999/src/desktops/dskSinglePlayer.cpp:141
#13 0x00000000006194de in ctrlButton::Msg_LeftUp (this=0xe5fb30, mc=...) at /var/tmp/portage/games-strategy/s25rttr-9999-r2/work/s25rttr-9999/src/controls/ctrlButton.cpp:85
#14 0x0000000000734ad6 in Window::RelayMouseMessage (this=0x5688ee0, msg=&virtual table offset 22994, this adjustment 6, mc=...)
at /var/tmp/portage/games-strategy/s25rttr-9999-r2/work/s25rttr-9999/src/Window.cpp:185
#15 0x00000000005db861 in WindowManager::Msg_LeftUp (this=0xcc5100, mc=...) at /var/tmp/portage/games-strategy/s25rttr-9999-r2/work/s25rttr-9999/src/WindowManager.cpp:427
#16 0x00007ffff263ebc5 in ?? ()
#17 0x0000000000cd1c40 in ?? ()
#18 0x0000000002e0000f in ?? ()
#19 0x0120014700010006 in ?? ()
#20 0x0000000000000000 in ?? ()
(gdb) continue
Continuing.
[Thread 0x7ffff7fba780 (LWP 22995) exited]

@stefson
Copy link
Contributor Author

stefson commented Jan 8, 2017

I am using gentoo amd64, gcc-4.9.4 with glibc-2.23 and system-boost, if that is helpfull to anyone.

@MarkL1961
Copy link

It could be that either the game or your OS does not like that character.
I would try to rename your save from outside the game and then try to load it within the game and see if that works.
This is just what I would try so as to not lose any game progress and there is no guarantee it will work as I am not involved in the programming.

@stefson
Copy link
Contributor Author

stefson commented Jan 9, 2017

Sure, the file is written to disk anyway and can easily be renamed. It is something about boost, most users will not be familiar with solving this! ;-)

@Flow86 Flow86 added the bug label Jan 10, 2017
@Flamefire
Copy link
Member

The problem is that ListDir returns a string vector instead of a widestring or boost::path vector. So the string is then treated as a widestring which in fact it isn't. So that function (and some call places) needs to be changed which isn't easy. I'm overseas ATM so can't help there, but if someone wanna take it?

@stefson
Copy link
Contributor Author

stefson commented Jun 26, 2017

thank you! this fixed them all - ä,ö,ü,ß,é - you name it ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants