Secretchronicles / TSC

An open source two-dimensional platform game.
https://secretchronicles.org/
GNU General Public License v3.0
205 stars 49 forks source link

Segfault when selecting menu item on Linux Mint 18 #547

Closed xet7 closed 7 years ago

xet7 commented 8 years ago

@Quintus @kirbyfan64

Hi, today at this commit on devel branch:

commit 8a2d356749867631e3b842b1dedc02075df1932e
Author: Quintus
Date:   Tue Jul 19 21:41:44 2016 +0200

when I compiled with this command

rm -rf /home/USERNAME/tsc && cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/home/USERNAME/tsc .. && make && make install

TSC does start and main theme sound is playing, but when I select some menu like Options with my keyboard arrow keys down and enter, TSC segfaults. This log is from selecting Options, and also selecting Start does segfault TSC, I did not try others from main menu yet.

Logs: compile.txt gdb.txt

Quintus commented 8 years ago

I cannot reproduce this. Maybe it has to do with the Finnish translation? Can you try setting LANG to the locale-agnostic C locale before running TSC? You can do it like this:

$ export LANG=C

Please report if the issue persists.

Vale, Quintus

xet7 commented 8 years ago

@Quintus @kirbyfan64

I updated pot and po files.

Main menu loads in all cases: running TSC, under GDB, and under Valgrind.

mainmenu

Without and with GDB, after selecting some menu option from main menu, TSC segfaults.

gdb-lang-c.txt

gdb-lang-en_US.txt

gdb-lang-fi.txt

Probably at some point I had low available RAM, so I rebooted and tried again.

gdb-lang-fi-AFTER-REBOOT.txt

Running under Valgrind prevents TSC from segfaulting, I can guess menu options and even slowly play the game.

start

gameplay

options

load

save

valgrind.txt

valgrind-supressed.txt

datahead8888 commented 8 years ago

I, too, had a segfault, though I did not get to the menu screen. It happened on a malloc call (through new), which suggests there may be heap corruption. @xet7, could you post a backtrace for your segfault from gdb?

What I have found is documented here: http://forum.secretchronicles.de/topics/448

xet7 commented 8 years ago

@datahead8888

I did get to menu screen only with older buggy cegui and using valgrind.

After compiling newer cegui I did not get to main menu, segfault in all cases, also with valgrind.

But currently on Linux Mint 18 I have broken compile of cegui, so I can't add backtrace yet, maybe sometime later when I compile cegui again.

Currently I'm happy that TSC works easily on Lubuntu 16.10, see: http://forum.secretchronicles.de/topics/449 https://github.com/Secretchronicles/TSC/blob/devel/INSTALL-2016-08-01.md

Quintus commented 8 years ago

@datahead8888 try deleting ~/.cache/tsc. When adding new graphics, sometimes this happens. I have not exactly found out why yet.

Valete, Quintus

xet7 commented 8 years ago

During game Start and Options menu show this bug (screenshot above) as pointed out by @Quintus https://bitbucket.org/cegui/cegui/issues/1063/openglrenderer-on-linux-renders-cegui

The CEGUI bug is in all Ubuntu based distros that are older that Ubuntu 16.10.

On Lubuntu 16.10 Start and Options menu shows correctly:

lubuntu1610start

lubuntu1610options

I have added request for updating or backporting bugfix to older Ubuntu versions to Launchpad: https://bugs.launchpad.net/ubuntu/+source/cegui-mk2/+bug/1608114

Quintus commented 8 years ago

@xet7 I suspect the original problem is a duplicate of #560. Can you confirm that this the case so that this ticket can be closed?

xet7 commented 8 years ago

@Quintus

I today compiled CEGUI from these sources: https://launchpad.net/ubuntu/+source/cegui-mk2/0.8.7-1.2

And also TSC latest from devel branch:

commit 1429329dcd95c459c24615113cefe8ddedcb74d1
Author: Quintus
Date:   Mon Aug 22 17:48:57 2016 +0200

    Handle libxml++'s header and linking dependencies in its CMake Find module.

On Linux Mint 18 still when from main game menu when I select Start, then TSC stopped to some errors.

Log attached.

gdb.txt

Quintus commented 8 years ago

@xet7 Please delete the cache directory ~/.cache/tsc and retry.

xet7 commented 8 years ago

Ok, after clearing cache directory I got following errors.

gdb2.txt

Quintus commented 8 years ago

Hm. Something is wrong with the destructors. This appears to be some new error we have not seen yet. I don't have time to look at it right now, but we should keep it on the agenda.

Quintus commented 7 years ago

Is this still relevant? If yes, please give a detailed step-by-step guide on how to reproduce this crash.

xet7 commented 7 years ago

@Quintus

No, current TSC does not run on Mint 18 because of too old libraries, minimum requirement is Ubuntu 16.10 based distro.