Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#26386 - [fceux] rebuilding the package fix a segfault

Attached to Project: Community Packages
Opened by Jarett Stevens (systemj) - Tuesday, 11 October 2011, 02:21 GMT
Last edited by Alexander F. Rødseth (xyproto) - Wednesday, 12 October 2011, 15:41 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Gavin Bisesi (Daenyth)
Angel Velasquez (angvp)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
After starting fceux without specifying a ROM image and then choosing one through the menu, it will segfault after about 15-20 seconds; this happens every time.

I originally filed this same report with the fceux project on SourceForge, but rebuilding the package locally fixed it. I believe it just needs to be rebuilt against the recently updated SDL libraries.

I have not tested the 32bit version.

Oddly, it does not segfault if:
1) If I specify a ROM image on the command line
2) If I run fceux under strace
3) If I run fceux under time

BAD OUTPUT:
$ fceux
Starting FCEUX 2.1.5...
Loading /home/jcs/roms/nes/MEGAMAN2.NES...

004e34a0 PRG ROM: 16 x 16KiB
CHR ROM: 0 x 8KiB
ROM CRC32: 0x0fcfc04d
ROM MD5: 0x0527a0ee512f69e08b8db6dc97964632
Mapper #: 1
Mapper name: MMC1
Mirroring: Vertical
Battery-backed: No
Trained: No

Initializing video...Initializing with OpenGL (Disable with '-opengl 0').
Video Mode: 256 x 224 x 32 bpp
Paletted texture extension not found. Using slower texture format...
Loading SDL sound with alsa driver...
ALSA lib pcm.c:7316:(snd_pcm_recover) underrun occurred
Segmentation fault


GOOD OUTPUT:

$ fceux roms/nes/MEGAMAN2.NES
Starting FCEUX 2.1.5...
Loading roms/nes/MEGAMAN2.NES...

004e34a0 PRG ROM: 16 x 16KiB
CHR ROM: 0 x 8KiB
ROM CRC32: 0x0fcfc04d
ROM MD5: 0x0527a0ee512f69e08b8db6dc97964632
Mapper #: 1
Mapper name: MMC1
Mirroring: Vertical
Battery-backed: No
Trained: No

Initializing video...Initializing with OpenGL (Disable with '-opengl 0').
Video Mode: 256 x 224 x 32 bpp
Paletted texture extension not found. Using slower texture format...
Loading SDL sound with alsa driver...
ALSA lib pcm.c:7316:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7316:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7316:(snd_pcm_recover) underrun occurred
(continues similar until exit)

I'm using the Arch Linux package:

$ pacman -Si fceux
Repository : community
Name : fceux
Version : 2.1.5-1
URL : http://fceux.com/web/home.html
Licenses : GPL
Groups : None
Provides : fceu gfceux
Depends On : sdl lua gtk2
Optional Deps : xchm: for viewing the help manual
Conflicts With : None
Replaces : fceu gfceux
Download Size : 726.84 K
Installed Size : 1536.00 K
Packager : Angel Velásquez <angvp@archlinux.org>
Architecture : x86_64
Build Date : Thu 16 Jun 2011 02:23:59 PM CDT
MD5 Sum : 1c2fe8c2a832d8f01260eaef91acfcd0
Description : A fast and ultra-compatible NES/Famicom emulator with
SDL, OpenGL and SVGALIB support

This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Wednesday, 12 October 2011, 15:41 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed the segfault by not compiling with opengl.
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 12 October 2011, 09:01 GMT
I can reproduce the segfault, but it does not segfault if run under gdb either. Planning to compile with debug symbols and start gdb with fceux and the core file.
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 12 October 2011, 14:54 GMT
Tried building with scons DEBUG=1, not stripping, -g, -O0 etc. The debug version still segfaults, but I'm unable to get a sensible backtrace (as it only crashes when not running in gdb).
Comment by Jarett Stevens (systemj) - Wednesday, 12 October 2011, 15:06 GMT
If you're able to get a core file (maybe set ulimit -c to 102400) you might be able to get a backtrace through that. On my locally rebuilt version which is working it's linked against:

sdl 1.2.14-9
lua 5.1.4-8
gtk2 2.24.6-2
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 12 October 2011, 15:25 GMT
Managed to create a binary that didn't segfault, trying to find out which scons option it was that did the trick.
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 12 October 2011, 15:25 GMT
I did get a core file, but gdb was none the wiser.

Loading...