<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39364 >

Ulrik Sverdrup wrote:
> I would like to help test the patch, however I have not been able to
> reproduce the crash. I compiled S2_1 from svn just before this patch
> with
>  ./configure --enable-client=gtk --disable-nls --disable-gtktest
> which built the gtk2 client, on Ubuntu 6.10/ppc
> 
That just means that somehow the string is in the same place in memory,
section_file_free didn't wipe anything, so the pointer is still good.  For
whatever reason, that's not how it works here (MacOSX ppc).

The patch itself (gtk_list_store_set before section_file_free) is simple.


> I can start ./civ, click the scenario button, select a scenario a start 
> playing.
> 
> Any ideas? What should I try to test this patch?
> 
When I'm talking about further testing, it means using gdb and walking
through the code to ensure it does everything as expected.  (That's how
the missing "part" parameter was found.)

There's really no other way to test the section file routines.  There are
some commented out freelog lines that I'd activated during my testing, but
very limited.

Likewise, the gtk_list_store_set routines: do they actually copy and free
the strings?  I'm not sure, but it works (for me) now.  The documentation
(http://developer.gnome.org/doc/API/2.0/gtk/GtkListStore.html) says it does
for some kinds of objects, but not for others.  And the second Google hit
is a complaint about "segmentation fault with a gtk_list_store_set", so it
may be a common problem!

Anyway, it took me several odd weekends (and 30 crash dumps) to understand
the problem, as the code is not well documented.  I kept getting frustrated
and giving up and doing something else.

What might be especially useful is to port the code to other clients.  The
name and description are only displayed for gtk.

Or to improve the display in gtk, it's rather ugly.



_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to