Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. "Read more...":https://support.plan.io/news/187

Bug #887748

closed

Segfault in Qt client city dialog

Added by Alexandro Ignatiev over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
gui-qt
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Maybe this is not only Qt-related, my Gtk client city dialog hangs often as well but not segfaults.

Thread 1 "freeciv-qt" received signal SIGSEGV, Segmentation fault.
0x00005555556fb1a8 in fill_sprite_array (t=<optimized out>, 
    sprs=sprs@entry=0x7fffffffc9c0, layer=layer@entry=LAYER_WORKERTASK, 
    ptile=<optimized out>, ptile@entry=0x55555b092298, pedge=0x0, pcorner=0x0, 
    punit=0x0, pcity=0x0, citymode=0x55555b88ca20, putype=0x0)
    at tilespec.c:5884
5884                ADD_SPRITE(t->sprites.extras[extra_index(ptask->tgt)].rmact,
(gdb) backtrace
#0  0x00005555556fb1a8 in fill_sprite_array
    (t=<optimized out>, sprs=sprs@entry=0x7fffffffc9c0, layer=layer@entry=LAYER_WORKERTASK, ptile=<optimized out>, 
    ptile@entry=0x55555b092298, pedge=0x0, pcorner=0x0, punit=0x0, pcity=0x0, citymode=0x55555b88ca20, putype=0x0) at tilespec.c:5884
#1  0x00005555556c5e94 in put_one_element
    (pcanvas=pcanvas@entry=0x555559662e80, zoom=zoom@entry=1, layer=layer@entry=LAYER_WORKERTASK, ptile=ptile@entry=0x55555b092298, pedge=<optimized out>, pcorner=<optimized out>, punit=<optimized out>, pcity=0x0, canvas_x=192, canvas_y=192, citymode=0x55555b88ca20, putype=0x0) at mapview_common.c:1325
#2  0x000055555577c5fc in city_dialog_redraw_map
    (pcity=pcity@entry=0x55555b88ca20, pcanvas=0x555559662e80)
    at citydlg_common.c:206
#3  0x000055555571bd6a in city_map::set_pixmap(city*, float)
    (this=0x555559c8d630, pcity=0x55555b88ca20, z=<optimized out>)
    at citydlg.cpp:1255
#4  0x0000555555728524 in city_dialog::refresh() (this=0x7fffb8019ac0)
    at citydlg.cpp:2843
#5  0x000055555570375b in cities_update_callback (data=<optimized out>)
    at update_queue.c:606
#6  cities_update_callback (data=<optimized out>) at update_queue.c:580
#7  0x0000555555703482 in update_unqueue (data=<optimized out>)
    at update_queue.c:319
#8  0x00005555556434e7 in mr_idle::idling() (this=0x5555562d0618)
    at mapview.cpp:175


Files

0010-Qt-Fix-clearing-of-worker-tasks.patch (1.33 KB) 0010-Qt-Fix-clearing-of-worker-tasks.patch master Marko Lindqvist, 2020-10-08 05:34 AM
0006-Qt-Fix-clearing-of-worker-tasks.patch (832 Bytes) 0006-Qt-Fix-clearing-of-worker-tasks.patch S3_0, S2_6 Marko Lindqvist, 2020-10-08 05:34 AM
0005-Qt-Fix-clearing-of-worker-tasks.patch (1.43 KB) 0005-Qt-Fix-clearing-of-worker-tasks.patch master Marko Lindqvist, 2020-10-12 10:51 AM
0003-Qt-Fix-clearing-of-worker-tasks.patch (931 Bytes) 0003-Qt-Fix-clearing-of-worker-tasks.patch S3_0, S2_6 Marko Lindqvist, 2020-10-12 10:51 AM

Related issues

Related to Freeciv - Bug #885482: Client fails at unspecified unit activity targetClosedMarko Lindqvist

Actions
Related to Freeciv - Feature #901938: Validate city worker tasksClosedSveinung Kvilhaugsvik

Actions
Actions #1

Updated by Alexandro Ignatiev over 2 years ago

  • Related to Bug #885482: Client fails at unspecified unit activity target added
Actions #2

Updated by Alexandro Ignatiev over 2 years ago

The patch I've recently published on Bug #885482 seems to belong more here then there. It helps.

Actions #3

Updated by Marko Lindqvist over 2 years ago

Which branch is that backtrace from? Line numbers seem to match with none.

Actions #4

Updated by Alexandro Ignatiev over 2 years ago

It's a modified branch but I can reproduce it on a standard client. Probably there is a related problem in specifying worker tasks, especially in Qt where there is seemingly no way to cancel a task and scrolling with RMB that is the main way to navigate the main map produces menus on city maps. Currently, I have one or two cities in LT54 that can't be opened in any standard clients after some misclicks in Qt.'
This is listing from LT54 current S2_6 branch.

Thread 1 "freeciv-gtk3" received signal SIGSEGV, Segmentation fault.
0x000055555560d624 in fill_sprite_array (t=<optimized out>, 
    sprs=sprs@entry=0x7fffffffce40, layer=layer@entry=LAYER_WORKERTASK, 
    ptile=<optimized out>, ptile@entry=0x55555d01b658, pedge=0x0, pcorner=0x0, 
    punit=0x0, pcity=0x0, citymode=0x55555d7b4d40, putype=0x0)
    at tilespec.c:5888
warning: Source file is more recent than executable.
5888                ADD_SPRITE(t->sprites.extras[extra_index(ptask->tgt)].rmact,
(gdb) backtrace
#0  0x000055555560d624 in fill_sprite_array
    (t=<optimized out>, sprs=sprs@entry=0x7fffffffce40, layer=layer@entry=LAYER_WORKERTASK, ptile=<optimized out>, 
    ptile@entry=0x55555d01b658, pedge=0x0, pcorner=0x0, punit=0x0, pcity=0x0, citymode=0x55555d7b4d40, putype=0x0) at tilespec.c:5888
#1  0x00005555555dbf04 in put_one_element
    (pcanvas=pcanvas@entry=0x7fffffffd730, zoom=zoom@entry=1, layer=layer@entry=LAYER_WORKERTASK, ptile=ptile@entry=0x55555d01b658, pedge=<optimized out>, pcorner=<optimized out>, punit=<optimized out>, pcity=0x0, canvas_x=192, canvas_y=0, citymode=0x55555d7b4d40, putype=0x0) at mapview_common.c:1325
#2  0x00005555555acff4 in city_dialog_redraw_map
    (pcity=0x55555d7b4d40, pcanvas=pcanvas@entry=0x7fffffffd730)
    at citydlg_common.c:210
#3  0x00005555556210dc in city_dialog_update_map (pdialog=0x55555b0101c0)
    at citydlg.c:1872
#4  0x0000555555623a7e in real_city_dialog_refresh (pcity=0x55555d7b4d40)
    at citydlg.c:499
#5  0x0000555555624d35 in create_city_dialog (pcity=0x55555d7b4d40)
    at citydlg.c:1661
#6  real_city_dialog_popup (pcity=0x55555d7b4d40) at citydlg.c:561
#7  0x000055555561494d in cities_update_callback (data=<optimized out>)
    at update_queue.c:608
#8  cities_update_callback (data=<optimized out>) at update_queue.c:581

Actions #5

Updated by Marko Lindqvist over 2 years ago

Alexandro Ignatiev wrote:

Probably there is a related problem in specifying worker tasks, especially in Qt

Qt-client worker task clearing does not send proper package, but uninitialized data. That results in garbage worker task instead of clearing existing one. The garbage task might seem like there is no task at all in the gui.

I think fixing that problem is what should happen in this ticket. Bug #885482 might still be valid independently (I guess it would at least for garbage tasks already created by older versions)

Actions #6

Updated by Marko Lindqvist over 2 years ago

  • Status changed from Resolved to In Progress

In testing it turns out that also closing the worker task context menu without selecting anything results in garbage task. This is despite the "if (!act) { return }" check

Actions #8

Updated by Marko Lindqvist over 2 years ago

  • Status changed from In Progress to Resolved
Actions #9

Updated by Marko Lindqvist over 2 years ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist
Actions #10

Updated by Marko Lindqvist over 2 years ago

  • Sprint/Milestone changed from 2.6.3 to 2.6.2.1
Actions #11

Updated by Sveinung Kvilhaugsvik over 2 years ago

Also available in: Atom PDF