Client problems on Linux
Moderator: Board moderators
Client problems on Linux
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.
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.
-
- Forum Fanatic
- Posts: 852
- Joined: Sun Jun 13, 2004 2:07 am
- Location: Hemel Hempstead
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.
which dies for whatever reason. I replaced both instances with the following:
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.
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);
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);
-
- Forum Aficionado
- Posts: 1994
- Joined: Tue Apr 29, 2003 5:55 pm
- Location: Minnesota, USA
- Contact:
A patch can be sent here: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.
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.
-
- Forum Aficionado
- Posts: 1994
- Joined: Tue Apr 29, 2003 5:55 pm
- Location: Minnesota, USA
- Contact:
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:
Regards
Andreas Jochens
Package: crossfire-client
Severity: normal
Tags: patch
When building 'crossfire-client' on amd64 with gcc-4.0, I get the following error:
With the attached patch 'crossfire-client' can be compiled on amd64 using gcc-4.0.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'
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
Eric Meyer
-
- Forum Fanatic
- Posts: 852
- Joined: Sun Jun 13, 2004 2:07 am
- Location: Hemel Hempstead
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.
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
*/