linux 2.6: zsnes crashes on start

Found a bug? Please report it, but remember to follow the bug reporting guidelines.
Missing a sane feature? Let us know!
But please do NOT request ports to other systems.

Moderator: ZSNES Mods

Post Reply
Seelenfeuer
New Member
Posts: 4
Joined: Thu Aug 17, 2006 11:14 am

linux 2.6: zsnes crashes on start

Post by Seelenfeuer »

Hi there!
I recently wanted to play some snes-games again. Since i started zsnes the last time it has been a while and there were numerous system-changes (went from amd to intel (whole system was recompiled), from gcc-3.4 to gcc-4.1, etc). When i start zsnes i get the following errors:

Code: Select all

# zsnes

ZSNES v1.42 (c) 1997-2005, ZSNES Team

Be sure to check http://www.zsnes.com/ for the latest version.
Please report crashes to zsnes-devel@lists.sourceforge.net.

ZSNES is written by the ZSNES Team (See AUTHORS.TXT)
ZSNES comes with ABSOLUTELY NO WARRANTY.  This is free software,
and you are welcome to redistribute it under certain conditions;
please read 'LICENSE' thoroughly before doing so.

Use ZSNES -? for command line definitions.

*** glibc detected *** zsnes: munmap_chunk(): invalid pointer: 0xbfca1c19 ***
======= Backtrace: =========
/lib/libc.so.6[0x4ee59dea]
/lib/libc.so.6[0x4ee5a15e]
zsnes[0x80daff6]
zsnes[0x80d4d0a]
/lib/libc.so.6(__libc_start_main+0xe6)[0x4ee0d866]
zsnes(__gxx_personality_v0+0xdd)[0x804be81]
======= Memory map: ========
08048000-082f2000 r-xp 00000000 03:06 172089     /usr/games/bin/zsnes
082f2000-08345000 rw-p 002aa000 03:06 172089     /usr/games/bin/zsnes
08345000-085d1000 rw-p 08345000 00:00 0          [heap]
41000000-41004000 r-xp 00000000 03:06 62012      /usr/lib/libfusion-0.9.so.24.0.0
41004000-41005000 rw-p 00003000 03:06 62012      /usr/lib/libfusion-0.9.so.24.0.0
4122a000-4122c000 r-xp 00000000 03:06 329622     /usr/lib/libXau.so.6.0.0
4122c000-4122d000 rw-p 00001000 03:06 329622     /usr/lib/libXau.so.6.0.0
41236000-41237000 r-xp 00000000 03:06 62685      /usr/lib/opengl/nvidia/tls/libnvidia-tls.so.1.0.8762
41237000-41238000 rw-p 00000000 03:06 62685      /usr/lib/opengl/nvidia/tls/libnvidia-tls.so.1.0.8762
41312000-4135c000 r-xp 00000000 03:06 27150      /usr/lib/libdirectfb-0.9.so.24.0.0
4135c000-4135e000 rw-p 0004a000 03:06 27150      /usr/lib/libdirectfb-0.9.so.24.0.0
41360000-4136c000 r-xp 00000000 03:06 62537      /usr/lib/libdirect-0.9.so.24.0.0
4136c000-4136d000 rw-p 0000b000 03:06 62537      /usr/lib/libdirect-0.9.so.24.0.0
413e9000-413f6000 r-xp 00000000 03:06 90354      /usr/lib/libXext.so.6.4.0
413f6000-413f7000 rw-p 0000c000 03:06 90354      /usr/lib/libXext.so.6.4.0
414a4000-41518000 r-xp 00000000 03:06 96697      /usr/lib/opengl/nvidia/lib/libGL.so.1.0.8762
41518000-41531000 rwxp 00074000 03:06 96697      /usr/lib/opengl/nvidia/lib/libGL.so.1.0.8762
41531000-41533000 rwxp 41531000 00:00 0
415bf000-4161e000 r-xp 00000000 03:06 74816      /usr/lib/libvga.so.1.9.25
4161e000-41624000 rw-p 0005f000 03:06 74816      /usr/lib/libvga.so.1.9.25
41624000-4163c000 rw-p 41624000 00:00 0
4171a000-41800000 r-xp 00000000 03:06 61308      /usr/lib/libX11.so.6.2.0
41800000-41804000 rw-p 000e6000 03:06 61308      /usr/lib/libX11.so.6.2.0
41be6000-41bef000 r-xp 00000000 03:06 49393      /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libgcc_s.so.1
41bef000-41bf0000 rw-p 00008000 03:06 49393      /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libgcc_s.so.1
41d36000-41d93000 r-xp 00000000 03:06 2303       /usr/lib/libSDL-1.2.so.0.7.2
41d93000-41d95000 rw-p 0005c000 03:06 2303       /usr/lib/libSDL-1.2.so.0.7.2
41d95000-41dbe000 rw-p 41d95000 00:00 0
420c9000-42199000 r-xp 00000000 03:06 70317      /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libstdc++.so.6.0.8
42199000-4219d000 r--p 000d0000 03:06 70317      /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libstdc++.so.6.0.8
4219d000-4219e000 rw-p 000d4000 03:06 70317      /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libstdc++.so.6.0.8
4219e000-421a4000 rw-p 4219e000 00:00 0
421a6000-42989000 r-xp 00000000 03:06 22774      /usr/lib/opengl/nvidia/lib/libGLcore.so.1.0.8762
42989000-429b9000 rwxp 007e2000 03:06 22774      /usr/lib/opengl/nvidia/lib/libGLcore.so.1.0.8762
429b9000-429bd000 rwxp 429b9000 00:00 0
4e5bf000-4e5d8000 r-xp 00000000 03:02 17689      /lib/ld-2.4.so
4e5d8000-4e5d9000 r--p 00018000 03:02 17689      /lib/ld-2.4.so
4e5d9000-4e5da000 rw-p 00019000 03:02 17689      /lib/ld-2.4.so
4edf8000-4ef0a000 r-xp 00000000 03:02 17690      /lib/libc-2.4.so
4ef0a000-4ef0c000 r--p 00111000 03:02 17690      /lib/libc-2.4.so
4ef0c000-4ef0e000 rw-p 00113000 03:02 17690      /lib/libc-2.4.so
4ef0e000-4ef11000 rw-p 4ef0e000 00:00 0
4ef13000-4ef35000 r-xp 00000000 03:02 17711      /lib/libm-2.4.so
4ef35000-4ef37000 rw-p 00021000 03:02 17711      /lib/libm-2.4.so
4ef39000-4ef3b000 r-xp 00000000 03:02 17724      /lib/libdl-2.4.so
4ef3b000-4ef3d000 rw-p 00001000 03:02 17724      /lib/libdl-2.4.so
4ef3f000-4ef50000 r-xp 00000000 03:02 17701      /lib/libz.so.1.2.3
4ef50000-4ef51000 rw-p 00010000 03:02 17701      /lib/libz.so.1.2.3
4f045000-4f049000 r-xp 00000000 03:06 338215     /usr/lib/libXdmcp.so.6.0.0
4f049000-4f04a000 rw-p 00003000 03:06 338215     /usr/lib/libXdmcp.so.6.0.0
4f05c000-4f06b000 r-xp 00000000 03:02 17729      /lib/libpthread-2.4.so
4f06b000-4f06c000 r--p 0000e000 03:02 17729      /lib/libpthread-2.4.so
4f06c000-4f06d000 rw-p 0000f000 03:02 17729      /lib/libpthread-2.4.so
4f06d000-4f06f000 rw-p 4f06d000 00:00 0
4f801000-4f824000 r-xp 00000000 03:06 338213     /usr/lib/libpng.so.3.1.2.8
4f824000-4f825000 rw-p 00022000 03:06 338213     /usr/lib/libpng.so.3.1.2.8
b7f12000-b7f78000 rw-p b7f12000 00:00 0
b7f9f000-b7fa0000 rw-p b7f9f000 00:00 0
b7fa0000-b7fa2000 rwxp 00000000 00:0d 794        /dev/zero
b7fa2000-b7fa3000 rw-p b7fa2000 00:00 0
bfc8d000-bfca0000 rwxp bfc8d000 00:00 0          [stack]
bfca0000-bfca3000 rw-p bfca0000 00:00 0
ffffe000-fffff000 ---p 00000000 00:00 0          [vdso]
Aborted
I already recompiled it, there was no difference.

My system is:
Gentoo linux with 2.6.13-kernel and gentoo-patchset
Intel Pentium 4 (x86) 2,4GHz with HT
1024mb DDR-RAM
GCC-4.1.1 (vanilla)

Further debugging-output can be posted (traces, output with debugging-flags set, etc), just dont wanna flood the forums... ;)

Regards
Seelenfeuer
dr-nix
New Member
Posts: 9
Joined: Sat Oct 30, 2004 10:59 am
Location: Sweden

Post by dr-nix »

tried switching back to an older version of gcc and recompiling again ?
- i typed "rm -rf /*" and now my system won't boot
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Use the search feature, this has been reported a dozen times already.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Seelenfeuer
New Member
Posts: 4
Joined: Thu Aug 17, 2006 11:14 am

Post by Seelenfeuer »

Yes, i did, but i think then it crashes because glibc was compiled with 4.1.1 and i dont want to recompilemy whole system with an old gcc-version just to run zsnes.... any other ideas?
Seelenfeuer
New Member
Posts: 4
Joined: Thu Aug 17, 2006 11:14 am

Post by Seelenfeuer »

I DID search, but i didnt find it. Maybe you should just make a sticky thread with "if zsnes 1.42 crashes on linux with glibc 2.4 use cvs" or something alike...

Regards
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

A quick zboard search of glibc would have turned out answers to your problem.

Point your SVN client to https://svn.bountysource.com/zsnes/trunk
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Seelenfeuer
New Member
Posts: 4
Joined: Thu Aug 17, 2006 11:14 am

Post by Seelenfeuer »

ok, next time :)

i used cvs from sourceforge, it fixed the error, too.

Regards
j4Ck 7h3 r1pp0r
New Member
Posts: 4
Joined: Tue Aug 22, 2006 9:49 pm

Post by j4Ck 7h3 r1pp0r »

hi, i got the same problem
system is suse 10.1 with all standard stuff that comes with it and nasm-0.98.39

so i wgot -r the svn directory tree Deathlike2 pointed to and did aclocal && autoconf && automake.
but automake complains about the missing Makefile.am (understandable, cause it isnt there). where do i get it from?
j4Ck 7h3 r1pp0r
New Member
Posts: 4
Joined: Tue Aug 22, 2006 9:49 pm

Post by j4Ck 7h3 r1pp0r »

oh oops hehe shoudve read the install.txt :oops:

so i do ./autogen.sh then gmake
but gmake complains "no rules to make curses.h needed by debugger.o. Stop."
what now?
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

Obtain PDCurses...
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
j4Ck 7h3 r1pp0r
New Member
Posts: 4
Joined: Tue Aug 22, 2006 9:49 pm

Post by j4Ck 7h3 r1pp0r »

still no dice
i compiled and installed PDCurses 2.8
still the same error. how do i point zsnes to the pdcurses directory?
spoon0042
Rookie
Posts: 46
Joined: Mon Jun 12, 2006 9:52 pm

Post by spoon0042 »

You probably want to install libncurses5-dev or similar.
j4Ck 7h3 r1pp0r
New Member
Posts: 4
Joined: Tue Aug 22, 2006 9:49 pm

Post by j4Ck 7h3 r1pp0r »

bug in the makefile??

libncurses-devel was already installed. pdcurses was good for nothing, kicked it back out before final compilation.
so, somewhere in the makefile, i changed the linker option "-lcurses" to "-lncurses" and it finally compiled.

could this be a typo in hte makefile, or maybe a distro-specific glitch?
spoon0042
Rookie
Posts: 46
Joined: Mon Jun 12, 2006 9:52 pm

Post by spoon0042 »

I don't know, I think a lot of distros have links so anything "curses" gets pointed to "ncurses". Although looking at the configure script it does seem to just assume -lcurses exists rather than doing the standard configure detection magic. Either way you only need it if you're building the debugger, which seems to be enabled by default. Not sure how useful that is.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

I've changed -lcurses to -lncurses since this is the way to go (or should be) for most distros.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Deathlike2 wrote:I've changed -lcurses to -lncurses since this is the way to go (or should be) for most distros.
No that is horribly incorrect. Only a few Linux distros lack curses, and ncurses is lacking on practically every non GNU loving system. -lcurses should be used if anything.

But as I mentioned in our team talk build thread a while ago detection is what we should be doing, and is now done.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Post Reply