bugFreeciv - Bugs: bug #21942, Crash when opening city window...

 
 
Show feedback again

bug #21942: Crash when opening city window with gtk3

Submitted by:  David Fernandez <bardo>
Submitted on:  Sun Apr 20 00:53:45 2014  
 
Category: client-gtk-3.0Severity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: trunk r25130Operating System: None
Planned Release: 2.4.5, 2.5.0, 2.6.0, 3.0.0Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun Feb 8 05:30:33 2015, SVN revision 28022:

Fixed a crash in construction of citydlg governor -tab. Also fixes a minor memory leak.
The crash was ever encountered in gtk3-client only, but the fix is made to both gtk-clients.

Reported by David Fernandez and amie78

See bug #21942

(Browse SVN revision 28022)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun Feb 8 05:30:25 2015, SVN revision 28021:

Fixed a crash in construction of citydlg governor -tab. Also fixes a minor memory leak.
The crash was ever encountered in gtk3-client only, but the fix is made to both gtk-clients.

Reported by David Fernandez and amie78

See bug #21942

(Browse SVN revision 28021)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun Feb 8 05:30:17 2015, SVN revision 28020:

Fixed a crash in construction of citydlg governor -tab. Also fixes a minor memory leak.
The crash was ever encountered in gtk3-client only, but the fix is made to both gtk-clients.

Reported by David Fernandez and amie78

See bug #21942

(Browse SVN revision 28020)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu Feb 5 03:21:17 2015, comment #11:

Tested the patch with S2_5 (rev27747, gtk3), and it fixes the crash for me.
Good job, thank you.

About bug #21851, it either does not affect gtk3, or this patch fixes it too, because there is no memory leak when I scroll the items of the production menu. Tested with default theme, and also with oxygen.

I just noticed a minor visual glitch when I place the mouse over an item of the dropdown menu, and then I use the mouse wheel to scroll down. The items are highlighted when they pass under the cursor, and then not properly un-highlighted. Note that there is no glitch if I use the cursor keys or the mouse alone, but only when mixed with the mouse wheel. Attached screenshot:

(file #23726)

David Fernandez <bardo>
Thu Feb 5 01:30:26 2015, comment #10:

The fact that I cannot reproduce seems to indicate that our versions of gtk behave differently.

From you backtrace one can see that when cma presets are being filled to the list, gtk signals cause cell_data_func() to be called already when the row is being created. It would be only next operation to add data (cma preset name) to it. cell_data_func() crashes when feeded row with NULL preset name on it.

Attached patch should protect cell_data_func() against such a crash. It also fixes the minimal memory leak of fetched preset name not being freed. Patch makes the change to both gtk2- and gtk3-client as it makes things only safer - can't hurt gtk2-client either.

I hope you gtk signals cell_data_func() also at the right time - when actual preset name then is there. It not doing that would mean that the currently preset currently selected for the city would not be drawn italix & bold when city dialog is (re)opened.

(file #23722)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu Feb 5 00:29:10 2015, comment #9:

Reported to affect S2_5 too on bug #21851

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun Oct 19 14:19:45 2014, comment #8:

Bug #22833 is another report of this (same backtrace signature).

Jacob Nevins <jtn>
Project Administrator
Sun Jun 15 09:56:53 2014, comment #7:

The first attached file was the gdb backtrace with kubuntu 13.10.
This one with kubuntu 14.04, TRUNK rev25130, and gtk3 client.

The gtk2 client of same revision seems to work fine for me. I can even see the unit animations that I haven't seen for long time.

(file #21025)

David Fernandez <bardo>
Sat Jun 14 19:14:07 2014, comment #6:

As my problem is probably separate from this one, I opened new ticket for it to keep it clear which problem each bit of gathered information is related to: bug #22193

Can you provide backtrace from your crashing client?

> gdb client/freeciv-gtk3


In gdb prompt:

> run


Play until it crashes and returns to gdb prompt. Then:

> backtrace full

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat Jun 14 14:41:40 2014, comment #5:

Let me know if there is something I can do to help find the cause.

David Fernandez <bardo>
Sat Jun 14 09:09:07 2014, comment #4:

Maybe related: In crosser development version based Windows builds from freeciv trunk all clients crash when city dialog is being opened. Have not yet tested with older crosser revision (that is known be working earlier) or other freeciv branches.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Fri Jun 13 17:41:34 2014, comment #3:

> it seems something related to the 64 bits OS. Doesn't it?


It just shows that you're using 64 bit version. In recent years all the 32bit/64bit incompatibilities in freeciv have been problems with 32bits as such systems are rarely used by the development team any more (I switched to 64bit OS 2006, so...)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Fri Jun 13 17:34:03 2014, comment #2:

I just updated to kubuntu 14.04, I compiled rev25134 with gtk3 enabled, and it keep crashing when I build my first city.

David Fernandez <bardo>
Sun Apr 20 01:00:37 2014, comment #1:

This is the gdb output, and it seems something related to the 64 bits OS. Doesn't it?

>(freeciv-gtk3:11667): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -3 and height 424


>(freeciv-gtk3:11667): Gdk-CRITICAL **: gdk_window_process_updates: assertion 'GDK_IS_WINDOW (window)' failed


>Program received signal SIGSEGV, Segmentation fault.

__strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:164
164 ../sysdeps/x86_64/multiarch/strcmp-sse42.S: No existe el archivo o el directorio.

My system info:
- kubuntu 13.10 (64 bits)
- kernel 3.11.0-19-generic
- kde 4.11.5
- intel HD graphics 2500

David Fernandez <bardo>
Sun Apr 20 00:53:45 2014, original submission:

When I start a game with gtk3 client, the game crashes as soon as I build the first city.
If I load a savegame, the game crashes when I open a city window.

This is the error output:

>(freeciv-gtk3:12423): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -3 and height 424
>Segmentation fault (core dumped)


Attached file with backtrace from gdb.

David Fernandez <bardo>

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #23726:  production_menu.jpg added by bardo (117kB - image/jpeg)
file #23722:  CmaNotNamedYet.patch added by cazfi (2kB - text/x-diff)
file #20529:  gtk3 crash.txt added by bardo (11kB - text/plain)

 

Depends on the following items: None found

Digest:
   task dependencies.

 

Carbon-Copy List
  • -unavailable- added by jtn (Updated the item)
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by bardo (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Error: not logged in

     

     

    Follow 12 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Feb 8 05:30:50 2015cazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Thu Feb 5 03:21:17 2015bardoAttached File-=>Added production_menu.jpg, #23726
    Thu Feb 5 01:30:26 2015cazfiAttached File-=>Added CmaNotNamedYet.patch, #23722
      StatusNone=>Ready For Test
      Planned Release2.5.0, 2.6.0=>2.4.5, 2.5.0, 2.6.0, 3.0.0
    Thu Feb 5 00:29:10 2015cazfiPlanned Release=>2.5.0, 2.6.0
    Sun Oct 19 14:19:45 2014jtnCategoryNone=>client-gtk-3.0
    Sat Aug 2 21:47:24 2014jtnRelease=>trunk r25130
    Sun Jun 15 09:56:53 2014bardoAttached File-=>Added gtk3 crash - gdb backtrace2.txt, #21025
    Sun Apr 20 00:53:45 2014bardoAttached File-=>Added gtk3 crash.txt, #20529
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup