Bug 23471 - brogue segmentation fault at launch (line 28)
Summary: brogue segmentation fault at launch (line 28)
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA6-32-OK MGA6-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2018-08-21 20:06 CEST by Ian McDougall
Modified: 2018-10-14 02:59 CEST (History)
4 users (show)

See Also:
Source RPM: brogue-1.7.4-6.mga6, libtcod-1.6.3-1.mga6
CVE:
Status comment:


Attachments

Description Ian McDougall 2018-08-21 20:06:12 CEST
Description of problem:
brogue does not launch from GUI. From command line, result is:
/usr/games/brogue: line 28:  3681 Segmentation fault      (core dumped) $brogue_binary $*
Number in front of "Segmentation fault" changes each time.

Version-Release number of selected component (if applicable):
brogue-1.7.4-6.mga6.src.rpm

How reproducible:
On my new computer, this occurs every time. On my old computer it does not, but it is still using brogue-1.7.4-2.mga5.src.rpm, and I do not know if this is different.
Neither machine has libtcod installed, but the older (working) machine has lib64ncurses5, lib64yui7-mga-ncurses, lib64yui7-ncurses, & libncursesw6 (i586) installed while the new machine does not.

Steps to Reproduce:
1.run "brogue" at command line
Comment 1 Ian McDougall 2018-08-22 16:21:54 CEST
Correction: both machines have lib64tcod1 (libtcod-1.5.2-0.20140203.1.mga5.src.rpm on the machine that works, libtcod-1.6.3-1.mga6.src.rpm on the machine that does not).
Comment 2 Morgan Leijström 2018-08-22 21:40:33 CEST
Confirming the issue here.
Never tried it before but installed it and tried just to verify this bug.
Selected to install brogue, which also pulled lib64tcod

System: mga6-64 on intel i7, Nvidia driver, everything updated to updates testing.

CC: (none) => fri
Summary: segmentation fault at launch (line 28) => brogue segmentation fault at launch (line 28)

Comment 3 Marja Van Waes 2018-08-23 08:36:09 CEST
Assigning to the registered maintainer.

CC: (none) => marja11
Assignee: bugsquad => rverschelde

Comment 4 Rémi Verschelde 2018-08-23 11:12:54 CEST
Backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff78e6d33 in TCOD_sys_check_magic_number () from /lib64/libtcod.so.1
(gdb) bt
#0  0x00007ffff78e6d33 in TCOD_sys_check_magic_number () from /lib64/libtcod.so.1
#1  0x00007ffff78e5e00 in TCOD_sys_load_image () from /lib64/libtcod.so.1
#2  0x00007ffff78e5e72 in TCOD_sys_load_font () from /lib64/libtcod.so.1
#3  0x00007ffff78e6fc8 in TCOD_sys_init () from /lib64/libtcod.so.1
#4  0x00007ffff78cb3a7 in TCOD_console_init () from /lib64/libtcod.so.1
#5  0x000000000049e112 in loadFont ()
#6  0x000000000049e189 in gameLoop ()
#7  0x000000000049c6fc in main ()
Comment 5 Rémi Verschelde 2018-08-23 11:20:16 CEST
Full backtrace with debug symbols:

Program received signal SIGSEGV, Segmentation fault.
TCOD_sys_check_magic_number (filename=<optimized out>, size=2, data=0x7ffff7b06b20 <magic_number> "BM") at ../../src/sys_sdl_c.c:1590

(gdb) bt
#0  TCOD_sys_check_magic_number (filename=<optimized out>, size=2, data=0x7ffff7b06b20 <magic_number> "BM") at ../../src/sys_sdl_c.c:1590
#1  0x00007ffff78e5e00 in TCOD_sys_load_image (filename=0x7ffff7b06034 <TCOD_ctx+20> "/usr/share/games/brogue/fonts/font-10.png") at ../../src/sys_sdl_c.c:1447
#2  0x00007ffff78e5e72 in TCOD_sys_load_font () at ../../src/sys_sdl_c.c:189
#3  0x00007ffff78e6fc8 in TCOD_sys_init (w=100, h=34, render_state=render_state@entry=0x7f0060, fullscreen=<optimized out>, fullscreen@entry=0 '\000') at ../../src/sys_sdl_c.c:757
#4  0x00007ffff78cb3a7 in TCOD_console_init (con=<optimized out>, title=<optimized out>, fullscreen=<optimized out>) at ../../src/console_c.c:1116
#5  0x000000000049e112 in loadFont (detectSize=1) at src/platform/tcod-platform.c:57
#6  0x000000000049e189 in gameLoop () at src/platform/tcod-platform.c:72
#7  0x000000000049c6fc in main (argc=1, argv=0x7fffffffda38) at src/platform/main.c:218

(gdb) bt full
#0  TCOD_sys_check_magic_number (filename=<optimized out>, size=2, data=0x7ffff7b06b20 <magic_number> "BM") at ../../src/sys_sdl_c.c:1590
        tmp = "\000\000\000\000\000\000\000\000x~\213\367\377\177\000\000\300j\260\367\377\177\000\000\064`\260\367\377\177\000\000`\000\177\000\000\000\000\000\360\037\337\367\377\177\000\000 `\260\367\377\177\000\000\000\000\000\000\000\000\000\000`\000\177\000\000\000\000\000\360\037\337\367\377\177\000\000\000\000\000\000\000\000\000\000ܸ\336\367\377\177\000\000\001", '\000' <repeats 15 times>, "\260\367\377\177\000\000\001\000\000\000\000\000\000"
        i = 0
        rwops = 0x7d0190
#1  0x00007ffff78e5e00 in TCOD_sys_load_image (filename=0x7ffff7b06034 <TCOD_ctx+20> "/usr/share/games/brogue/fonts/font-10.png") at ../../src/sys_sdl_c.c:1447
        img = 0x7ffff7b06ac0 <image_type>
#2  0x00007ffff78e5e72 in TCOD_sys_load_font () at ../../src/sys_sdl_c.c:189
        i = <optimized out>
        hasTransparent = 0 '\000'
        x = <optimized out>
        y = <optimized out>
#3  0x00007ffff78e6fc8 in TCOD_sys_init (w=100, h=34, render_state=render_state@entry=0x7f0060, fullscreen=<optimized out>, fullscreen@entry=0 '\000') at ../../src/sys_sdl_c.c:757
        last_font = '\000' <repeats 511 times>
#4  0x00007ffff78cb3a7 in TCOD_console_init (con=<optimized out>, title=<optimized out>, fullscreen=<optimized out>) at ../../src/console_c.c:1116
        i = <optimized out>
        dat = <optimized out>
#5  0x000000000049e112 in loadFont (detectSize=1) at src/platform/tcod-platform.c:57
        font = "/usr/share/games/brogue/fonts/font-10.png\000\000\000\000\000\000\000\300$@\000\000\000\000\000\227\030\261", <incomplete sequence \367>
#6  0x000000000049e189 in gameLoop () at src/platform/tcod-platform.c:72
No locals.
#7  0x000000000049c6fc in main (argc=1, argv=0x7fffffffda38) at src/platform/main.c:218
        i = 1

Source RPM: brogue-1.7.4-6.mga6.src.rpm => brogue-1.7.4-6.mga6, libtcod-1.6.3-1.mga6

Comment 6 Rémi Verschelde 2018-10-01 16:04:42 CEST
The problem is that libtcod 1.6.x is built against SDL 2, while brogue and its bundled libtcod 1.5.2 depend on SDL 1.2. The two can't be mixed, so the patches I wrote to build brogue against the system libtcod trigger this incompatibility.

I've fixed this by allowing brogue to build its own bundled version of libtcod 1.5.2, without relying on the system package.

Fixed in cauldron with brogue-1.7.5-1.mga7, and pushed to Mageia 6 too.

I also took the opportunity to upgrade to version 1.7.5 which was released a few days ago.


Advisory:
=========

Updated brogue package fixes launch issue

  The brogue package in Mageia 6 was built against an incompatible version of
  libtcod, leading to a segmentation fault at launch.

  This was fixed by building brogue against a bundled version of libtcod 1.5.2.

  This update also provides the new brogue version 1.7.5.

References:
 - https://www.reddit.com/r/brogueforum/comments/9ixah6/announcing_brogue_v175/


RPM in core/updates_testing:
============================

brogue-1.7.5-1.mga7


SRPM in core/updates_testing:
=============================

brogue-1.7.5-1.mga7

Assignee: rverschelde => qa-bugs

Comment 7 Thomas Andrews 2018-10-01 23:13:56 CEST
Tested this on both 64-bit and 32-bit Plasma systems. Platform: HP Probook 6550b,i3, 8GB, Intel graphics.

On both systems, installed brogue, which also pulled in lib(64)tcod. Brogue would not launch, either from the menu or the command line. Updated to brogue 1.7.5-1. Brogue now launches, both form the gui and from the command line.

Been many years since I attempted to play Rogue, but I wandered about for a while, picked up a healing potion, killed a kobold. Looks like it works to me. Window is a little large for my laptop screen, but that's for another bug.

OKing for both, and validating.

Keywords: (none) => validated_update
Whiteboard: (none) => MGA6-32-OK MGA6-64-OK
CC: (none) => andrewsfarm, sysadmin-bugs

Comment 8 Rémi Verschelde 2018-10-02 00:11:27 CEST
Thanks! Advisory uploaded.

Keywords: (none) => advisory

Comment 9 Mageia Robot 2018-10-14 02:59:32 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2018-0157.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.