If I start the applications it will close after a short while (1 sec).
I got the folowing Output:
Generator is (c) James Ponder 1997-2003, all rights reserved. v0.35
No configuration file found, using defaults.
1 joysticks detected
Joystick 0: Padix Co. Ltd. USB, Vibration 3D Joystick
[---- ] Using overlay with format fourcc=0x59565955 (UYVY)
Please use the GTK menu to quit this program properly.
Fatal signal: Segmentation Fault (SDL Parachute Deployed)
Ok, if you can compile it yourself, it shouldn't be difficult to find the source of the bug. What flags did you pass to configure? You use a x86-64 machine, right?
Then reproduce crash and type "bt full" at gdb's prompt. I've looked at the sources
and see no blatant double-free bug. I suspect this might rather be a bug in one
of the used libraries.
Do you mean with "main" the path of the application?
1. try:
style@Linux:~/bin$ gdb ./generator-gtk
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".
2. try
style@Linux:~/bin$ gdb generator-gtk
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) bt full
No stack.
3. try
style@Linux:~/bin$ n/
bash: n/: No such file or directory
style@Linux:~/bin$ gdb main/generator-gtk
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...main/generator-gtk: No such file or directory.
Starting program: /home/style/bin/generator-gtk
[Thread debugging using libthread_db enabled]
[New Thread 46912521129152 (LWP 16059)]
Generator is (c) James Ponder 1997-2003, all rights reserved. v0.35
0 joysticks detected
[---- ] Using overlay with format fourcc=0x59565955 (UYVY)
Please use the GTK menu to quit this program properly.
[---- ] country=JUE
[---- ] country=U
[---- ] USA: 1; Japan: 0; Europe: 0; TV Mode: NTSC
[---- ] Loaded 'Sonic The Hedgehog 3'/'Sonic The Hedgehog 3' (Mk-1079-0 A8F2 U)
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912521129152 (LWP 16059)]
0x00000000004f2744 in z80_emulate ()
Last 3 lines appear if I push play
Next 3 lines appear if I push 200%
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912521129152 (LWP 16084)]
0x00002aaaabfb1c05 in free () from /lib/libc.so.6
Are you sure you have compiled it using --cmz80 and loaded the correct binary i.e. not the one you have installed before? z80_emulate() is not called or used unless you decided to use raze.
Before running configure [...] and make, run "make depend" to clear the results from the previous configure run.
When you invoke gdb pass the full path to generator-gtk not just "generator-gtk" because in the latter case it would load the generator-gtk found according to your PATH variable. Assuming your current directory is the sources directory of generator, start it with
style@Linux:~/Download/generator-0.35-cbiere-r2$ CFLAGS='-O0 -g3' ./configure --without-gcc --with-gtk --with-cmz80 --prefix=/home/style
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
configure: WARNING: Processor type not known - processor optimisations off!
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking soundcard.h usability... no
checking soundcard.h presence... no
checking for soundcard.h... no
checking sys/soundcard.h usability... yes
checking sys/soundcard.h presence... yes
checking for sys/soundcard.h... yes
checking whether libossaudio is necessary... no
checking for GCC 2... no
checking for GCC 3 or newer... yes
configure: WARNING: You did not opt for gcc optimisations!
checking for jpeg_start_compress in -ljpeg... yes
checking for BZ2_bzReadOpen in -lbz2... no
checking for gzopen in -lz... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking whether make sets $(MAKE)... (cached) yes
checking for library containing strerror... none required
checking for a BSD-compatible install... /usr/bin/install -c
checking return type of signal handlers... void
checking for ANSI C header files... (cached) yes
checking for X... libraries /usr/X11R6/lib, headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for gtk-config... /usr/bin/gtk-config
checking for GTK - version >= 1.2.10... yes
checking for sdl-config... /usr/local/bin/sdl-config
checking for SDL - version >= 1.2.6... yes
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for unsigned char... yes
checking size of unsigned char... 1
checking for unsigned short... yes
checking size of unsigned short... 2
checking for unsigned int... yes
checking size of unsigned int... 4
checking for unsigned long... yes
checking size of unsigned long... 8
checking for unsigned long long... yes
checking size of unsigned long long... 8
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking bzlib.h usability... no
checking bzlib.h presence... no
checking for bzlib.h... no
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking tcl8.0.h usability... no
checking tcl8.0.h presence... no
checking for tcl8.0.h... no
checking tk8.0.h usability... no
checking tk8.0.h presence... no
checking for tk8.0.h... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating cpu68k/Makefile
config.status: creating raze/Makefile
config.status: creating cmz80/Makefile
config.status: creating ym2612/Makefile
config.status: creating main/Makefile
config.status: creating sn76496/Makefile
config.status: creating glade/Makefile
config.status: creating gtkopts/Makefile
config.status: creating raze/raze.asm
config.status: creating config.h
config.status: executing depfiles commands
style@Linux:~/Download/generator-0.35-cbiere-r2$ make
make all-recursive
make[1]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2'
Making all in glade
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/glade'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/glade'Making all in gtkopts
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/gtkopts'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/gtkopts'
Making all in cmz80
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/cmz80'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/cmz80'Making all in cpu68k
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/cpu68k'
make all-am
make[3]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/cpu68k'
make[3]: Für das Ziel »all-am« ist nichts zu tun.
make[3]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/cpu68k'
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/cpu68k'
Making all in ym2612
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/ym2612'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/ym2612'
Making all in sn76496
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/sn76496'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/sn76496'
Making all in main
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/main'make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/main'
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2'
make[2]: Für das Ziel »all-am« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2'
make[1]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2'
style@Linux:~/Download/generator-0.35-cbiere-r2$ make
make all-recursive
make[1]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2'
Making all in glade
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/glade'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/glade'Making all in gtkopts
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/gtkopts'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/gtkopts'
Making all in cmz80
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/cmz80'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/cmz80'Making all in cpu68k
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/cpu68k'
make all-am
make[3]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/cpu68k'
make[3]: Für das Ziel »all-am« ist nichts zu tun.
make[3]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/cpu68k'
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/cpu68k'
Making all in ym2612
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/ym2612'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/ym2612'
Making all in sn76496
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/sn76496'
make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/sn76496'
Making all in main
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/main'make[2]: Für das Ziel »all« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/main'
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2'
make[2]: Für das Ziel »all-am« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2'
make[1]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2'
style@Linux:~/Download/generator-0.35-cbiere-r2$ make install
Making install in glade
make[1]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/glade'
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/glade'
make[2]: Für das Ziel »install-exec-am« ist nichts zu tun.
make[2]: Für das Ziel »install-data-am« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/glade'make[1]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/glade'Making install in gtkopts
make[1]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/gtkopts'
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/gtkopts'
make[2]: Für das Ziel »install-exec-am« ist nichts zu tun.
make[2]: Für das Ziel »install-data-am« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/gtkopts'
make[1]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/gtkopts'
Making install in cmz80
make[1]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/cmz80'
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/cmz80'
make[2]: Für das Ziel »install-exec-am« ist nichts zu tun.
make[2]: Für das Ziel »install-data-am« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/cmz80'make[1]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/cmz80'Making install in cpu68k
make[1]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/cpu68k'
make install-am
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/cpu68k'
make[3]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/cpu68k'
make[3]: Für das Ziel »install-exec-am« ist nichts zu tun.
make[3]: Für das Ziel »install-data-am« ist nichts zu tun.
make[3]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/cpu68k'
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/cpu68k'
make[1]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/cpu68k'
Making install in ym2612
make[1]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/ym2612'
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/ym2612'
make[2]: Für das Ziel »install-exec-am« ist nichts zu tun.
make[2]: Für das Ziel »install-data-am« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/ym2612'
make[1]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/ym2612'
Making install in sn76496
make[1]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/sn76496'
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/sn76496'
make[2]: Für das Ziel »install-exec-am« ist nichts zu tun.
make[2]: Für das Ziel »install-data-am« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/sn76496'
make[1]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/sn76496'
Making install in main
make[1]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/main'make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2/main'test -z "/home/style/bin" || mkdir -p -- "/home/style/bin"
/usr/bin/install -c 'generator-gtk' '/home/style/bin/generator-gtk'
make[2]: Für das Ziel »install-data-am« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/main'
make[1]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2/main'
make[1]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2'
make[2]: Entering directory `/home/style/Download/generator-0.35-cbiere-r2'
make[2]: Für das Ziel »install-exec-am« ist nichts zu tun.
make[2]: Für das Ziel »install-data-am« ist nichts zu tun.
make[2]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2'
make[1]: Leaving directory `/home/style/Download/generator-0.35-cbiere-r2'
That looks as if nothing was compiled actually. So you re-installed the result of a previous compile process. Also sorry again. I meant "make distclean" not "make depend".