Joshuas-MacBook-Pro:xboard-83f3a4e herecomethej$ gdb ./xboard
GNU gdb 6.3.50-20050815 (Apple version gdb-1822) (Sun Aug 5 03:00:42 UTC 2012)
Copyright 2004 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-apple-darwin"...Reading symbols for shared libraries ................ done
(gdb) run -debug
Starting program: /Users/herecomethej/Downloads/xboard-83f3a4e/xboard -debug
Reading symbols for shared libraries +++++++++++++++...................................................................................................................................................................... done
Assertion failed: (_cairo_status_is_error (status)), function _cairo_error, file cairo-error.c, line 68.
Program received signal SIGABRT, Aborted.
0x00007fff8f9e0d46 in __kill ()
(gdb) bt
#0 0x00007fff8f9e0d46 in __kill ()
#1 0x00007fff88b0bdf0 in abort ()
#2 0x00007fff88b0ce2a in __assert_rtn ()
#3 0x00000001009ea2ce in _cairo_error ()
#4 0x00000001009e292b in _cairo_set_error ()
#5 0x0000000100548c5a in rsvg_cairo_render_path ()
#6 0x0000000100546255 in rsvg_render_path ()
#7 0x000000010053dff0 in rsvg_node_draw ()
#8 0x000000010053e08a in _rsvg_node_draw_children ()
#9 0x000000010053dff0 in rsvg_node_draw ()
#10 0x000000010053e78d in rsvg_node_svg_draw ()
#11 0x000000010053dff0 in rsvg_node_draw ()
#12 0x000000010054a448 in rsvg_handle_render_cairo_sub ()
#13 0x0000000100078423 in LoadSVG ()
#14 0x000000010007891d in ScaleOnePiece ()
#15 0x00000001000790f2 in CreatePNGPieces ()
#16 0x000000010007915d in CreateAnyPieces ()
#17 0x0000000100071ddb in main ()
(gdb)
Well, assuming that it still crashes inside rsvg_handle_render_cairo, as the previous gdb stack trace suggested, and that the rsvg_handle_get_dimensions still reported proper dimensions (the svg piece images are indeed 100x100), I would say this is a clear bug in the svg library. Because it seems that we make a perfectly normal rendering request, (no funny scaling, because of division by 0 or something like that) on a valid cairo surface.
To make absolutely sure nothing funny is going on we should perhaps print squareSize as well (it could be corrupted elsewhere in the code); change the printf statement to:
But if those do not pointto any abnormality, there must be something wrong in the rsvg lib. It is already a slight anomaly that gdb says we call rsvg_handle_render_cairo_sub from LoadSVG.
"dimensions 100x100 sq=87" which seems normal. I'm going to agree, I didn't get this issue with the fink install so i guess the answer is to clean the slate again and go back to that. At least now I know what's in my /usr/local folder XD.
Thank-you for your help. I'll let you know if/when I'm successful.
I cleaned up the code history a bit in the repository, adapting the old X11 front-end at any stage such that at any stage it can be built without error. Arun provided a dual-build Makefile, so the same source tar ball can be used to build both GTK and X11 version.
The trick is to specify with ./configure what you want:
./configure --with-gtk
or
./configure --with-Xaw
(the latter is the default) After that a simple "make" will build the specified version. You might have to remove all .o files if you build one after the other.
I pushed this to the gtk2 branch in the hgm.nubati repository. The X11 build from this should be equivalent yo the most-recent master version, using the cairo graphics. Some of the dialogs are reformatted however, because they became too tall in the GTK version.
The GTK version is still alpha, although I made some more things work (sizing and window positioning), and fixed a nasty bug which caused it to hang in analysis.
...
CC gtk/xengineoutput.o
CCLD xboard
Undefined symbols for architecture x86_64:
"_gtk_dialog_get_widget_for_response", referenced from:
_GenericPopUp in xoptions.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [xboard] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
This is with the version in the master branch as Arun fixed some issues with the GTK needing x11 stuff which gave me issues before.
On a very minor separate issue (I just don't know where to put it). I noticed that on the Xaw version, on FICS, with the auto update of games on the seekgraph, dots are no longer disappearing when the game is removed. I have no idea about ICC. Did FICS change the command you were using?
I think this is a problem with the GTK version. We will look into how we can avoid using GTK calls that are only available in later versions.
I will check out the seek-graph stuff. It could be an ´expose´ problem. (i.e. the drawing is updated, but the update is not copied automatically to the display.) Can you chack if the points that ought to have disappeared do indeed disappear whan you cover then with another window, and then expose them again?
I know you are busy with other things atm, and the gtk stuff has still a long way to go. But should you ever get a chance, I tried compiling the gtk version of xboard in OSX again with your latest source code. Now i get