I have been seeing crashes when I click on the right hand side of the
speed/time graph for a track. The track has about a minute of 0km/h
points at the end and it looks like problem may occur when it tries to
calculate the corresponding position on the elevation/distance graph.
Printing out some of the variables gives:
[jburgess@... src]$ ./viking
event_x=817.000000 img_width=990 x=657.000000, limit 670
x2(829.8104323) width(990)
event_x=829.810432 img_width=990 x=669.810432, limit 670
The program 'viking' received an X Window System error.
...
I believe the problem one is "x=669.810432, limit 670". When
draw_graph_mark() tries to save +-saved_width/2, the upper bound goes
beyond 670. The attached patch fixes it for me.
One odd thing is that this only seems to happen if the very first click
is on the RHS, if I click anywhere else first, then the click on the
right there is no crash.
A full back trace is below.
Jon
[Thread 0x7fffef081950 (LWP 15442) exited]
event_x=816.000000 img_width=990 x=656.000000
event_x=829.810432 img_width=990 x=669.810432
Breakpoint 2, gdk_x_error (display=0x6fae00, error=0x7fffffffd260) at gdkmain-x11.c:613
613 {
Missing separate debuginfos, use: debuginfo-install GConf2-2.24.0-1.fc10.x86_64 ORBit2-2.14.16-1.fc10.x86_64 bug-buddy-2.24.2-1.fc10.x86_64 cyrus-sasl-lib-2.1.22-19.fc10.x86_64 dbus-glib-0.76-3.fc10.x86_64 dbus-libs-1.2.4-2.fc10.x86_64 elfutils-libelf-0.140-1.fc10.x86_64 expat-2.0.1-5.x86_64 gamin-0.1.9-6.fc10.x86_64 gpsd-2.37-2.fc9.x86_64 gtk-nodoka-engine-0.7.2-1.fc10.x86_64 gvfs-1.0.3-6.fc10.x86_64 keyutils-libs-1.2-3.fc9.x86_64 libXau-1.0.4-1.fc10.x86_64 libXdmcp-1.0.2-6.fc10.x86_64 libbeagle-0.3.5-1.fc9.x86_64 libcanberra-0.10-3.fc10.x86_64 libcanberra-gtk2-0.10-3.fc10.x86_64 libcap-2.10-2.fc10.x86_64 libcurl-7.19.4-1.fc10.x86_64 libgcc-4.3.2-7.x86_64 libidn-0.6.14-8.x86_64 libogg-1.1.3-9.fc9.x86_64 libselinux-2.0.73-1.fc10.x86_64 libssh2-0.18-7.fc9.x86_64 libstdc++-4.3.2-7.x86_64 libtdb-1.1.1-27.fc10.x86_64 libtool-ltdl-1.5.26-4.fc10.x86_64 libvorbis-1.2.0-5.fc10.x86_64 libxcb-1.1.91-5.fc10.x86_64 libxml2-2.7.3-1.fc10.x86_64 nspr-4.7.3-2.fc10.x86_64 nss-3.12.2.0-4.fc10.x86_64 openldap-2.4.12-1.fc10.x86_64 openssl-0.9.8g-12.fc10.x86_64 pixman-0.12.0-2.fc10.x86_64
(gdb) bt
#0 gdk_x_error (display=0x6fae00, error=0x7fffffffd260) at gdkmain-x11.c:613
#1 0x0000003e02845444 in _XError (dpy=0x6fae00, rep=0x7fffee2a6260) at XlibInt.c:2905
#2 0x0000003e0284d273 in _XReply (dpy=0x6fae00, rep=0x7fffffffd364, extra=0, discard=0) at xcb_io.c:425
#3 0x0000003e02829497 in XGetImage (dpy=0x6fae00, d=77598590, x=667, y=0, width=5, height=300, plane_mask=18446744073709551615, format=2) at GetImage.c:77
#4 0x0000003d75a52baf in get_full_image (drawable=0x7ffff07934c0, src_x=-12080, src_y=<value optimized out>, width=5, height=300) at gdkimage-x11.c:433
#5 0x0000003d75a536b4 in _gdk_x11_copy_to_image (drawable=0x7ffff07934c0, image=0x0, src_x=667, src_y=0, dest_x=0, dest_y=0, width=5, height=300)
at gdkimage-x11.c:504
#6 0x0000003d75a1f939 in IA__gdk_drawable_copy_to_image (drawable=0x7ffff07934c0, image=0x0, src_x=667, src_y=0, dest_x=0, dest_y=0, width=5, height=300)
at gdkdraw.c:1072
#7 0x0000003d75a1f939 in IA__gdk_drawable_copy_to_image (drawable=0x7fffee594c40, image=0x0, src_x=667, src_y=0, dest_x=0, dest_y=0, width=5, height=300)
at gdkdraw.c:1072
#8 0x00000000004308f6 in draw_graph_mark (image=0x7fffee3d6e60, event_x=829.81043232698096, img_width=<value optimized out>, gc=0x81d9b0, saved_img=0x7fffee46a658)
at viktrwlayer_propwin.c:172
#9 0x0000000000430c28 in track_graph_click (event_box=0x79bb40, event=0x7fffee28c660, pass_along=<value optimized out>, is_vt_graph=1) at viktrwlayer_propwin.c:230
#10 0x0000000000430c8e in track_vt_click (event_box=0x6fae00, event=0x7fffffffd260, pass_along=0x4a00f7e) at viktrwlayer_propwin.c:246
#11 0x0000003d76329a08 in _gtk_marshal_BOOLEAN__BOXED (closure=0x7fffee28f8b0, return_value=0x7fffffffd990, n_param_values=<value optimized out>,
param_values=0x7fffee2ab600, invocation_hint=<value optimized out>, marshal_data=0x430c80) at gtkmarshalers.c:84
#12 0x0000003f8760b7dd in IA__g_closure_invoke (closure=0x7fffee28f8b0, return_value=0x7fffffffd990, n_param_values=2, param_values=0x7fffee2ab600,
invocation_hint=0x7fffffffd950) at gclosure.c:767
#13 0x0000003f876214bd in signal_emit_unlocked_R (node=0x745180, detail=0, instance=0x79bb40, emission_return=0x7fffffffdad0, instance_and_params=0x7fffee2ab600)
at gsignal.c:3244
#14 0x0000003f876229ea in IA__g_signal_emit_valist (instance=0x79bb40, signal_id=<value optimized out>, detail=0, var_args=0x7fffffffdb30) at gsignal.c:2987
#15 0x0000003f87623093 in IA__g_signal_emit (instance=0x6fae00, signal_id=4294955616, detail=77598590) at gsignal.c:3034
---Type <return> to continue, or q <return> to quit---
#16 0x0000003d7642c7de in gtk_widget_event_internal (widget=0x79bb40, event=0x7fffee28c660) at gtkwidget.c:4745
#17 0x0000003d76322373 in IA__gtk_propagate_event (widget=0x79bb40, event=0x7fffee28c660) at gtkmain.c:2391
#18 0x0000003d76323493 in IA__gtk_main_do_event (event=0x7fffee28c660) at gtkmain.c:1596
#19 0x0000003d75a4deac in gdk_event_dispatch (source=<value optimized out>, callback=<value optimized out>, user_data=<value optimized out>) at gdkevents-x11.c:2365
#20 0x0000003f86e3779b in g_main_dispatch () at gmain.c:2144
#21 IA__g_main_context_dispatch (context=0x711a30) at gmain.c:2697
#22 0x0000003f86e3af6d in g_main_context_iterate (context=0x711a30, block=1, dispatch=1, self=<value optimized out>) at gmain.c:2778
#23 0x0000003f86e3b49d in IA__g_main_loop_run (loop=0x7ffff0712740) at gmain.c:2986
#24 0x0000003d763238a7 in IA__gtk_main () at gtkmain.c:1200
#25 0x000000000040e2c5 in main (argc=1, argv=0x7fffffffdfb8) at main.c:199
|