Client problems on Linux

A place for people to post strange occurances that could be potential bugs.

Moderator: Board moderators

jan

Client problems on Linux

Post 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.
Aaron
Senior member
Posts: 496
Joined: Sun Jan 30, 2005 9:04 pm
Location: New Jersey
Contact:

Post by Aaron »

gentoo 32bit, p2, but non-cvs, and im fine. maybe a recent change borked something badly?
cavesomething
Forum Fanatic
Posts: 852
Joined: Sun Jun 13, 2004 2:07 am
Location: Hemel Hempstead

Post 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?
Ryo
Forum Fanatic
Posts: 752
Joined: Mon May 19, 2003 9:16 pm
Location: Paris, France

Post 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.
Casper
Senior member
Posts: 288
Joined: Fri Aug 06, 2004 7:17 pm
Location: UK/Ukraine

Post 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)?
deadmeat
One hit wonder
Posts: 1
Joined: Mon May 23, 2005 2:49 pm

Post 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.
Leaf
Forum Aficionado
Posts: 1994
Joined: Tue Apr 29, 2003 5:55 pm
Location: Minnesota, USA
Contact:

Post 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.
Leaf
Forum Aficionado
Posts: 1994
Joined: Tue Apr 29, 2003 5:55 pm
Location: Minnesota, USA
Contact:

Post 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 */
"Put another, more succinct way: don't complain, contribute. It's more satisfying in the long run, and it's more constructive."
Eric Meyer
woo
Senior member
Posts: 427
Joined: Tue Jun 15, 2004 10:32 pm
Location: Atlanta, GA
Contact:

Post by woo »

I've been considering a amd 64 bit recently - did you guys ever get your client working with this patch?
cavesomething
Forum Fanatic
Posts: 852
Joined: Sun Jun 13, 2004 2:07 am
Location: Hemel Hempstead

Post 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
       */

Post Reply