Page 1 of 2

Client problems on Linux

Posted: Tue May 10, 2005 6:21 pm
by jan
This is the setup:

I have Gentoo LInux on a AMD 64 bit; I checked the client out from cvs and built it. When I start it (either gcfclient or cfclient) the following happens:

1. It says 'Can't connect to metaserver: Connection refused'

2. I then type in a server address and it dies (without a coredump - I probably haven't set that up yet). Its last gasp is:

libpng error: Invalid image width
Segmentation fault

So what's up here? I tried it on Windows too (XP) and the same happens.

Posted: Tue May 10, 2005 7:11 pm
by Aaron
gentoo 32bit, p2, but non-cvs, and im fine. maybe a recent change borked something badly?

Posted: Tue May 10, 2005 10:48 pm
by cavesomething
my eye is drawn to the '64-bit' in the original post.

Does anyone know if CF Client (in particular the image code, since that is what seems to be misbehaving) is 64-bit safe?

Was the windows XP setup the recently released 64-bit edition also?

Posted: Wed May 11, 2005 9:35 am
by Ryo
cavesomething wrote:Was the windows XP setup the recently released 64-bit edition also?
Nope (at least, not by me, maybe someone else did?). But Windows has issues with latest GTK, 2.6.x. It works fine with 2.4.x, though...
Still haven't found why.

Posted: Sat May 14, 2005 12:36 am
by Casper
Was it not to do with the native windows thing integtation (when GTK will use the Windows theme used as if it was the GTK theme)?

Posted: Mon May 23, 2005 4:13 pm
by deadmeat
I fixed this error in the gtk-v2 client:

libpng error: Invalid image width
Segmentation fault

The error was occuring in png.c and probably relates to a bug or something in libpng on my platform (also AMD64, altho using Ubuntu). In the function png_to_data() it currently calls.

Code: Select all

png_get_IHDR(png_ptr, info_ptr, (png_uint_32*)width, (png_uint_32*)height, &bit_depth, &color_type, &interlace_type, &compression_type, &filter_type);
which dies for whatever reason. I replaced both instances with the following:

Code: Select all

*width = png_get_image_width(png_ptr, info_ptr);
*height = png_get_image_height(png_ptr, info_ptr);
bit_depth = png_get_bit_depth(png_ptr, info_ptr);
color_type = png_get_color_type(png_ptr, info_ptr);
interlace_type = png_get_interlace_type(png_ptr, info_ptr);
compression_type = png_get_compression_type(png_ptr, info_ptr);
I would submit a patch but I can't work out whom to send it to and I can't decide if its a bug with libpng on my machine or something that should be fixed in the crossfire client. Of course YMMV.

Posted: Mon May 23, 2005 4:55 pm
by Leaf
deadmeat wrote: I would submit a patch but I can't work out whom to send it to and I can't decide if its a bug with libpng on my machine or something that should be fixed in the crossfire client.
A patch can be sent here:

http://sourceforge.net/tracker/?group_i ... tid=313833

With a summary or details of what you pretty much included on here - possible bug fix which requires further testing/analysis.

Posted: Wed Sep 28, 2005 3:57 pm
by Leaf
This just arrived on the debian-bugs mailing list, not sure how much (if, at all..) it's related to this thread or not.


Package: crossfire-client
Severity: normal
Tags: patch

When building 'crossfire-client' on amd64 with gcc-4.0, I get the following error:
if cc -DHAVE_CONFIG_H -I. -I. -I.. -I../common -I../pixmaps -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -DDATADIR=\"/usr/share\"
-DBINDIR=\"/usr/games\" -g -Wall -O2 -MT gcfclient-config.o -MD -MP -MF ".deps/gcfclient-config.Tpo" -c -o gcfclient-config.o `test -f 'config.c' || echo './'`config.c;
\
then mv -f ".deps/gcfclient-config.Tpo" ".deps/gcfclient-config.Po"; else rm -f ".deps/gcfclient-config.Tpo"; exit 1; fi
config.c:120: error: static declaration of 'gtkwin_config' follows non-static declaration
gx11.h:66: error: previous declaration of 'gtkwin_config' was here
make[3]: *** [gcfclient-config.o] Error 1
make[3]: Leaving directory `/crossfire-client-1.7.0/gtk'
With the attached patch 'crossfire-client' can be compiled on amd64 using gcc-4.0.

Regards
Andreas Jochens

Code: Select all

diff -urN ../tmp-orig/crossfire-client-1.7.0/gtk/config.c ./gtk/config.c
--- ../tmp-orig/crossfire-client-1.7.0/gtk/config.c     2004-04-19 08:35:11.000000000 +0200
+++ ./gtk/config.c      2005-03-07 16:38:06.582593724 +0100
@@ -117,6 +117,7 @@
     char       *label;
 } CButtons;

+#define gtkwin_config gtkwin_config_local
 static GtkWidget *gtkwin_config = NULL,            /* main window */
     *faceset_combo;                        /* Combo box for faceset selection */

Posted: Wed Oct 19, 2005 4:03 pm
by woo
I've been considering a amd 64 bit recently - did you guys ever get your client working with this patch?

Posted: Wed Oct 19, 2005 6:37 pm
by cavesomething
gcfclient didn't work in CVS with an AMD64.

Ragnor patched it to work when I brought this up a while ago, AFAIK he hasn't submitted the fix (a one liner)

With it gcfclient works fine in normal (non SDL) mode.

In SDL mode it doesn't display properly, but I believe this may be an SDL issue since scummvm breaks similarly.

if you're interested, this is the diff.

Code: Select all

Index: gtk/gx11.c
===================================================================
RCS file: /cvsroot/crossfire/client/gtk/gx11.c,v
retrieving revision 1.78
diff -C5 -r1.78 gx11.c
*** gtk/gx11.c  22 Sep 2005 04:57:40 -0000      1.78
--- gtk/gx11.c  19 Oct 2005 18:36:25 -0000
***************
*** 497,506 ****
--- 497,507 ----
        pixmaps[0]->map_image =  pixmaps[0]->icon_image;
        pixmaps[0]->fog_image =  pixmaps[0]->icon_image;
        pixmaps[0]->map_mask =  pixmaps[0]->icon_mask;
      }
      pixmaps[0]->icon_width = pixmaps[0]->icon_height = pixmaps[0]->map_width = pixmaps[0]->map_height = map_image_size;
+     pixmaps[0]->smooth_face = 0;

      /* Don't do anything special for SDL image - rather, that drawing
       * code will check to see if there is no data
       */