Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 85454 - pingus segfaults on amd64 at startup
Summary: pingus segfaults on amd64 at startup
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
: 99942 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-15 21:20 UTC by Jay Knight
Modified: 2006-04-06 12:57 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jay Knight 2005-03-15 21:20:00 UTC
--Backtrace--
#0  0x0000002a96b5e803 in memcpy () from /lib/libc.so.6
#1  0x0000002a95f25d80 in SubBlitter_Transparent<unsigned>::blt_noclip(CL_Blit_Transparent*, CL_Target*, int, int, int) () from /usr/lib/libclanDisplay.so.2
#2  0x0000002a95f24474 in CL_Blit_Transparent::blt_noclip(CL_Target*, int, int, int) () from /usr/lib/libclanDisplay.so.2
#3  0x0000002a95f27339 in CL_CardSurface_Blitter::put_screen(int, int, int, CL_Target*) () from /usr/lib/libclanDisplay.so.2
#4  0x0000002a95f3e1a3 in CL_Surface_Generic::put_screen(int, int, int, CL_DisplayCard*) () from /usr/lib/libclanDisplay.so.2
#5  0x0000000000505565 in std::list<CL_Slot_v3<CL_InputDevice*, int, int>*, std::allocator<CL_Slot_v3<CL_InputDevice*, int, int>*> >::erase(std::_List_iterator<CL_Slot_v3<CL_InputDevice*, int, int>*>) ()
#6  0x0000000000516b1f in std::_Rb_tree<std::string, std::pair<std::string const, int>, std::_Select1st<std::pair<std::string const, int> >, std::less<std::string>, std::allocator<std::pair<std::string const, int> > >::insert_unique(std::_Rb_tree_iterator<std::pair<std::string const, int> >, std::pair<std::string const, int> const&) ()
#7  0x00000000005173e6 in std::_Rb_tree<std::string, std::pair<std::string const, int>, std::_Select1st<std::pair<std::string const, int> >, std::less<std::string>, std::allocator<std::pair<std::string const, int> > >::insert_unique(std::_Rb_tree_iterator<std::pair<std::string const, int> >, std::pair<std::string const, int> const&) ()
#8  0x000000000051867f in std::_Rb_tree<std::string, std::pair<std::string const, int>, std::_Select1st<std::pair<std::string const, int> >, std::less<std::string>, std::allocator<std::pair<std::string const, int> > >::insert_unique(std::_Rb_tree_iterator<std::pair<std::string const, int> >, std::pair<std::string const, int> const&) ()
#9  0x000000000044356f in std::_Rb_tree<std::string, std::pair<std::string const, std::string>, std::_Select1st<std::pair<std::string const, std::string> >, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >::_M_erase(std::_Rb_tree_node<std::pair<std::string const, std::string> >*) ()
#10 0x0000000000443e65 in std::_Rb_tree<std::string, std::pair<std::string const, std::string>, std::_Select1st<std::pair<std::string const, std::string> >, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >::_M_erase(std::_Rb_tree_node<std::pair<std::string const, std::string> >*) ()
#11 0x0000002a957bcf0c in main () from /usr/lib/libclanApp.so.2
#12 0x0000002a96b0be31 in __libc_start_main () from /lib/libc.so.6
#13 0x000000000040a7ca in ?? ()


Reproducible: Always
Steps to Reproduce:
1. Merge games-puzzle/pingus
2. run pingus
3. click start

Actual Results:  
Crashes

Expected Results:  
Don't crash, play the game

Portage 2.0.51.19 (default-linux/amd64/2004.3, gcc-3.4.3,
glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r14 x86_64)
=================================================================
System uname: 2.6.9-gentoo-r14 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 25 2005, 08:38:55)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acpi alsa amd64 bash-completion berkdb bitmap-fonts cdr crypt cups curl
dvd dvdread emul-linux-x86 encode esd fam flac font-server fortran freetype gif
gpm gtk imlib ipv6 java jp2 jpeg junit krb4 ldap libwww lzw lzw-tiff mad motif
mp3 ncurses nls oggvorbis opengl oss pam perl png posix python qt readline ssl
svg symlink tcpd tetex tiff truetype truetype-fonts type1-fonts usb userlocales
xml xml2 xpm xrandr xsl xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 1 Alex Howells (RETIRED) gentoo-dev 2005-03-28 10:41:29 UTC
Please let me know if this is still a problem under Gentoo 2005.0
Comment 2 Mike Leonetti 2005-04-04 23:57:02 UTC
It still segfaults for me under Gentoo 2005.0 on version 0.6.0-r1 but I'm not sure how to display all of that fancy backtrace info.  I can give you my emerge info, though.

It throws out a billion XMLHelper errors and then explodes saying:
exit(EXIT_FAILURE);
Segmentation fault

Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r5 x86_64)
=================================================================
System uname: 2.6.11-gentoo-r5 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.6.10
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 17 2005, 13:16:43)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=athlon64 -O3 -pipe -funroll-loops -fomit-frame-pointer -fforce-addr -fprefetch-loop-arrays"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -O3 -pipe -funroll-loops -fomit-frame-pointer -fforce-addr -fprefetch-loop-arrays"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks fixpackages sandbox"
GENTOO_MIRRORS="http://gentoo.ccccom.com http://mirror.usu.edu/mirrors/gentoo/ ftp://gentoo.ccccom.com http://gentoo.llarian.net/ http://gentoo.chem.wisc.edu/gentoo/"
LANG="en_US.UTF-8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X acl acpi alsa apm avi bitmap-fonts bmp canna cddb cdparanoia cdr cjk crypt cups curl dvd dvdread encode font-server fortran gcj gif gtk gtk2 imagemagick imlib java jp2 jpeg lcms live lzw lzw-tiff mad mp3 mpeg ncurses nls nodroproot nptl oggvorbis opengl pam pcre perl pic png pnp python readline rtc samba sdl ssl tcpd tiff truetype truetype-fonts type1-fonts usb userlocales xml xml2 xpm xrandr xv xvid zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS
Comment 3 Paolo Ornati 2005-04-25 03:19:37 UTC
Same problem here.

emerge --info

Gentoo Base System version 1.4.16
Portage 2.0.51.19 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r1, 2.6.11.7 x86_64)
=================================================================
System uname: 2.6.11.7 x86_64 AMD Athlon(tm) 64 Processor 3200+
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 21 2005, 22:32:03)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="http://gentoo.inode.at"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 16bit X a52 aac acpi4linux alsa asm audiofile avi bash-completion blender-game bzip2 ccache cdda cdparanoia codecs cscope css cups dpms dv dvd dvdr dvdread emacs emul-linux encode fame ffmpeg freetype ftp gimp gimpprint glut gnome gpm gstreamer gtk gtk2 java jpeg lm_sensors mikmod mmap mp3 mpeg mpeg4 mplayer multilib ncurses nls nptl nptlonly oggvorbis opengl pam pdflib png rtc sdl tcpd truetype truetype-fonts userlocales utf8 xvid"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 4 Luis Medinas (RETIRED) gentoo-dev 2005-07-22 11:46:56 UTC
I can confirm it segfaults here is my gdb output

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912510348704 (LWP 23730)]
0x0000003a4c872ae3 in memcpy () from /lib/tls/libc.so.6
Comment 5 Jim Laflin 2005-07-22 17:56:38 UTC
Same here

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 30255)]
0x00002aaaac143593 in memcpy () from /lib/libc.so.6

emerge --info follows
Portage 2.0.51.22-r2 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.5-r0,
2.6.12-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.12-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.10
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon64 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac alsa amarok amd64 avi berkdb bitmap-fonts cdb cdr crypt cups curl doc
dvd dvdr encode fam foomaticdb fortran gif gphoto2 gpm gstreamer gtk gtk2
imagemagick imlib ipv6 java jpeg junit kde lm_sensors lzw lzw-tiff mad mp3 mpeg
msn ncurses nls nocd nvidia opengl pam pdflib perl png python qt quicktime
readline real sdl spell ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts
usb userlocales v4l vcd xine xml2 xmms xpm xv zlib userland_GNU kernel_linux
elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 6 Pacho Ramos gentoo-dev 2005-08-17 11:14:34 UTC
I have the same problem:
http://bugs.gentoo.org/show_bug.cgi?id=99942
Comment 7 Mr. Bones. (RETIRED) gentoo-dev 2005-08-17 11:28:53 UTC
*** Bug 99942 has been marked as a duplicate of this bug. ***
Comment 8 Pacho Ramos gentoo-dev 2005-09-05 10:38:18 UTC
It seems that pingus only crash if you are using gcc 3.4.
I have tried to compile pingus without gcc34 patch (bug 63773) but it doesn
Comment 9 Pacho Ramos gentoo-dev 2005-09-05 10:38:18 UTC
It seems that pingus only crash if you are using gcc 3.4.
I have tried to compile pingus without gcc34 patch (bug 63773) but it doesn´t
compile :(

Any ideas?

Thanks and sorry my poor english
Comment 10 Pacho Ramos gentoo-dev 2005-09-06 10:19:14 UTC
About patches applied to pingus 0.6 sources.

There are two patches: pingus-0.6.0-gcc3.patch and pingus-0.6.0-gcc34.patch.

Their content is the following.
________
pingus-0.6.0-gcc3.patch
________

Pingus uses assert() but never includes assert.h, boo !

http://bugs.gentoo.org/show_bug.cgi?id=28281

--- pingus-0.6.0/src/blitter.cxx
+++ pingus-0.6.0/src/blitter.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include <config.h>
 #include <stdio.h>
 #include "pingus_error.hxx"
--- pingus-0.6.0/src/col_map.cxx
+++ pingus-0.6.0/src/col_map.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include <iostream>
 #include <ClanLib/Display/SurfaceProviders/canvas.h>
 #include "gui/graphic_context.hxx"
--- pingus-0.6.0/src/console.cxx
+++ pingus-0.6.0/src/console.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include <config.h>
 #include <ClanLib/Display/Display/display.h>
 #include <ClanLib/Display/Font/font.h>
--- pingus-0.6.0/src/demo_recorder.cxx
+++ pingus-0.6.0/src/demo_recorder.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include <time.h>
 #include <iostream>
 #include "system.hxx"
--- pingus-0.6.0/src/editor/generic_property_frame.cxx
+++ pingus-0.6.0/src/editor/generic_property_frame.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include <iostream>
 #include <ClanLib/GUI/label.h>
 #include <ClanLib/GUI/inputbox.h>
--- pingus-0.6.0/src/gui/root_gui_manager.cxx
+++ pingus-0.6.0/src/gui/root_gui_manager.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include "root_gui_manager.hxx"
 #include "../input/controller.hxx"
 
--- pingus-0.6.0/src/pingu_holder.cxx
+++ pingus-0.6.0/src/pingu_holder.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include <iostream>
 #include "pingu_holder.hxx"
 #include "pingu.hxx"
--- pingus-0.6.0/src/savegame_manager.cxx
+++ pingus-0.6.0/src/savegame_manager.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include <iostream>
 #include <fstream>
 #include "system.hxx"
--- pingus-0.6.0/src/worldmap/dot.cxx
+++ pingus-0.6.0/src/worldmap/dot.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include <iostream>
 #include "../xml_file_reader.hxx"
 #include "dot.hxx"
--- pingus-0.6.0/src/worldmap/graph.hxx
+++ pingus-0.6.0/src/worldmap/graph.hxx
@@ -20,6 +20,8 @@
 #ifndef HEADER_GRAPH_HXX
 #define HEADER_GRAPH_HXX
 
+#include <assert.h>
 #include <algorithm>
 #include <vector>
+#include <iostream>
 
______________________________________________________________________

pingus-0.6.0-gcc34.patch
___________

Make sure we type the cast properly.

http://bugs.gentoo.org/show_bug.cgi?id=63773

--- src/story_screen.cxx
+++ src/story_screen.cxx
@@ -142,7 +142,7 @@
 
   if (!page_displayed_completly)
     {
-      unsigned int len = static_cast<unsigned int>(20.0f * time_passed);
+      size_t len = static_cast<size_t>(20.0f * time_passed);
       display_text = current_page.text.substr(0,
Math::min(current_page.text.length(), len));
 
       if (current_page.text.length() < len)
______________

I have simplified pingus-0.6.0-gcc3.patch:

______
pingus-0.6.0-gcc3.patch
______

Pingus uses assert() but never includes assert.h, boo !

http://bugs.gentoo.org/show_bug.cgi?id=28281

--- pingus-0.6.0/src/worldmap/graph.hxx
+++ pingus-0.6.0/src/worldmap/graph.hxx
@@ -20,6 +20,8 @@
 
+#include <assert.h>
 #include <algorithm>
 #include <vector>
+#include <iostream>
_______________

Whith the gcc34 patch and the simplified gcc3 patch, pingus compiles succesfully
but it still crashing with the same error :(. I think that the problem would be
the grah.hxx patch (in gcc3 patch), but, if I don
Comment 11 Pacho Ramos gentoo-dev 2005-09-06 10:19:14 UTC
About patches applied to pingus 0.6 sources.

There are two patches: pingus-0.6.0-gcc3.patch and pingus-0.6.0-gcc34.patch.

Their content is the following.
________
pingus-0.6.0-gcc3.patch
________

Pingus uses assert() but never includes assert.h, boo !

http://bugs.gentoo.org/show_bug.cgi?id=28281

--- pingus-0.6.0/src/blitter.cxx
+++ pingus-0.6.0/src/blitter.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include <config.h>
 #include <stdio.h>
 #include "pingus_error.hxx"
--- pingus-0.6.0/src/col_map.cxx
+++ pingus-0.6.0/src/col_map.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include <iostream>
 #include <ClanLib/Display/SurfaceProviders/canvas.h>
 #include "gui/graphic_context.hxx"
--- pingus-0.6.0/src/console.cxx
+++ pingus-0.6.0/src/console.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include <config.h>
 #include <ClanLib/Display/Display/display.h>
 #include <ClanLib/Display/Font/font.h>
--- pingus-0.6.0/src/demo_recorder.cxx
+++ pingus-0.6.0/src/demo_recorder.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include <time.h>
 #include <iostream>
 #include "system.hxx"
--- pingus-0.6.0/src/editor/generic_property_frame.cxx
+++ pingus-0.6.0/src/editor/generic_property_frame.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include <iostream>
 #include <ClanLib/GUI/label.h>
 #include <ClanLib/GUI/inputbox.h>
--- pingus-0.6.0/src/gui/root_gui_manager.cxx
+++ pingus-0.6.0/src/gui/root_gui_manager.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include "root_gui_manager.hxx"
 #include "../input/controller.hxx"
 
--- pingus-0.6.0/src/pingu_holder.cxx
+++ pingus-0.6.0/src/pingu_holder.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include <iostream>
 #include "pingu_holder.hxx"
 #include "pingu.hxx"
--- pingus-0.6.0/src/savegame_manager.cxx
+++ pingus-0.6.0/src/savegame_manager.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include <iostream>
 #include <fstream>
 #include "system.hxx"
--- pingus-0.6.0/src/worldmap/dot.cxx
+++ pingus-0.6.0/src/worldmap/dot.cxx
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <assert.h>
 #include <iostream>
 #include "../xml_file_reader.hxx"
 #include "dot.hxx"
--- pingus-0.6.0/src/worldmap/graph.hxx
+++ pingus-0.6.0/src/worldmap/graph.hxx
@@ -20,6 +20,8 @@
 #ifndef HEADER_GRAPH_HXX
 #define HEADER_GRAPH_HXX
 
+#include <assert.h>
 #include <algorithm>
 #include <vector>
+#include <iostream>
 
______________________________________________________________________

pingus-0.6.0-gcc34.patch
___________

Make sure we type the cast properly.

http://bugs.gentoo.org/show_bug.cgi?id=63773

--- src/story_screen.cxx
+++ src/story_screen.cxx
@@ -142,7 +142,7 @@
 
   if (!page_displayed_completly)
     {
-      unsigned int len = static_cast<unsigned int>(20.0f * time_passed);
+      size_t len = static_cast<size_t>(20.0f * time_passed);
       display_text = current_page.text.substr(0,
Math::min(current_page.text.length(), len));
 
       if (current_page.text.length() < len)
______________

I have simplified pingus-0.6.0-gcc3.patch:

______
pingus-0.6.0-gcc3.patch
______

Pingus uses assert() but never includes assert.h, boo !

http://bugs.gentoo.org/show_bug.cgi?id=28281

--- pingus-0.6.0/src/worldmap/graph.hxx
+++ pingus-0.6.0/src/worldmap/graph.hxx
@@ -20,6 +20,8 @@
 
+#include <assert.h>
 #include <algorithm>
 #include <vector>
+#include <iostream>
_______________

Whith the gcc34 patch and the simplified gcc3 patch, pingus compiles succesfully
but it still crashing with the same error :(. I think that the problem would be
the grah.hxx patch (in gcc3 patch), but, if I don´t apply this patch, pingus
doesn't compile :(
Comment 12 Pacho Ramos gentoo-dev 2005-09-06 10:36:09 UTC
I will try to use a debian patch for pingus
Comment 13 Pacho Ramos gentoo-dev 2005-09-15 10:43:56 UTC
I have compiled the pingus tarball from debian
(http://packages.debian.org/unstable/games/pingus) with the debian patch and the
gcc34 patch from gentoo and it fails with the same error (?).
Does it need another patch for solve the problem or the gentoo gcc34 patch is
breaking pingus?

____

I think that pingus should be marked as testing until the bug is fixed, but it
is only an opinion...
Comment 14 Pacho Ramos gentoo-dev 2005-09-28 09:58:42 UTC
Is there anybody that runs pingus on amd64 succesfully?
Comment 15 Simon Stelling (RETIRED) gentoo-dev 2005-10-08 06:59:23 UTC
(In reply to comment #11)
> I think that pingus should be marked as testing until the bug is fixed, but it
> is only an opinion...

i completely removed the keyword for now
Comment 16 Pacho Ramos gentoo-dev 2005-10-10 05:26:06 UTC
I have tried to compile using pingus suse src rpms with its patches and I have 
the same problem.
I think that is a problem with gcc 3.4
Comment 17 Simon Stelling (RETIRED) gentoo-dev 2006-01-20 07:45:27 UTC
if it's a problem with gcc-3.4, it's better assigned to the maintainers
Comment 18 Mr. Bones. (RETIRED) gentoo-dev 2006-01-20 07:51:14 UTC
It works fine for me on x86 with gcc34 so I'd like someone with an amd64 to try out  and commit the patches.
Comment 19 Simon Stelling (RETIRED) gentoo-dev 2006-01-20 08:04:51 UTC
oh well, back to amd64 then :/
Comment 20 Patrick McLean gentoo-dev 2006-02-02 14:12:50 UTC
This seems to be an upstream issue, it's crashing for me too.
Comment 21 Pacho Ramos gentoo-dev 2006-02-03 05:26:58 UTC
On what machine are you trying to run it?

Thanks
Comment 22 Scott Stoddard (RETIRED) gentoo-dev 2006-02-03 05:47:55 UTC
The problem with this is not pingus I think...rather it is clanlib.  Look at the similarity in the bactrace here to comment #16 of bug #64522.  My guess is that this is a sometimes-present 64bit issue in the earlier versions of clanlib.  The new clanlib has removed the SubBlitter_Transparent and several other functions in the similar section of the API (which unfortunately breaks compatibility for both clanbomber and pingus...).
Comment 23 Scott Stoddard (RETIRED) gentoo-dev 2006-04-06 12:57:15 UTC
Okay, at this point then closing this as UPSTREAM and I've filed a bug with the pingus devs http://savannah.nongnu.org/bugs/index.php?func=detailitem&item_id=16289 although I'm not holding out a lot of hope for a quick solution (upstream looks inactive).