#83 Crash drawing track with "autodownload" map layer

closed-fixed
nobody
Interface (19)
5
2013-03-22
2011-08-19
Juergen Kremp
No

I have Viking 1.2.1.0 installed on Windows XP SP3. I observed this behavior with all previous versions also.

I have a map layer (Openstreetmap Mapnik) with "Autodownload / Use Viking Zoom Level".
When I then draw a track and move the map by "Middle Mouse / Click and Drag", I frequently get runtime error as shown in attachment.

When I disable "Autodownload", the crashes vanish.

Interesting observation: For this ticket, I tried to make Screen Video of the effect. Recording screen video makes my PC quite slow. That way slowed down, I could not reproduce the crash even with the wildest moves in Viking, but when I stopped the screen recording, I had it instantly. So it's likely a timing issue in Viking.

Discussion

  • Juergen Kremp
    Juergen Kremp
    2011-08-19

     
    Attachments
  • Juergen Kremp
    Juergen Kremp
    2011-08-19

    Update: Using a less resource-consuming screen-recorder, I could make a video of the issue.

    You can view it here: http://screenr.com/OWgs

     
  • Rob Norris
    Rob Norris
    2011-08-21

    Hmm, I can't reproduce this using Linux.
    I tend to use the track creation tool quite a lot and not observed this behaviour, as far as I can remember.

    I have a feeling that lowing the priority used for the new track (re)draw line may help. However I don't really understand this code fully - it makes no difference on my system - so I could be completely wrong, but it could be better on Windows. [I have no way of testing this]

    Code change below for anyone interested:
    diff --git a/src/viktrwlayer.c b/src/viktrwlayer.c
    index f4171d2..c373c6b 100644
    --- a/src/viktrwlayer.c
    +++ b/src/viktrwlayer.c
    @@ -4750,7 +4750,7 @@ static VikLayerToolFuncStatus tool_new_track_move ( VikTrwLayer *vtl, GdkEventMo
    passalong->y2 = event->y;

    /* this will sync and undraw when we have time to */
    - g_idle_add_full (G_PRIORITY_HIGH_IDLE + 10, ct_sync, passalong, NULL);
    + g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ct_sync, passalong, NULL);
    vtl->ct_sync_done = FALSE;
    return VIK_LAYER_TOOL_ACK_GRAB_FOCUS;
    }

     
  • Rob Norris
    Rob Norris
    2013-03-22

    The final place where multi thread update conflicts were resolved in version 1.4

     
  • Rob Norris
    Rob Norris
    2013-03-22

    • status: open --> closed-fixed