GNOME Bugzilla – Bug 596419
libchamplain freezes after setting decel-rate
Last modified: 2009-10-26 23:26:28 UTC
libchamplain freezes with 100% cpu usage after setting decel-rate to 1.0. It can be reproduced by adding the following patch to launcher-gtk.c and then clicking on the map several times. --- launcher-gtk.c.orig 2009-09-14 17:36:27.000000000 +0200 +++ launcher-gtk.c 2009-09-26 13:05:05.000000000 +0200 @@ -213,6 +213,8 @@ g_object_set (G_OBJECT (view), "scroll-mode", CHAMPLAIN_SCROLL_MODE_KINETIC, "zoom-level", 5, NULL); + g_object_set(G_OBJECT(view), "decel-rate", 1.0, NULL); + layer = create_marker_layer (view); champlain_view_add_layer(view, layer); champlain_layer_hide_all_markers (CHAMPLAIN_LAYER (layer)); I am testing it with clutter 1.0.4 and libchamplain 0.4.0.
The mathematical reason behind this is than a 1.0 deceleration rate never actually decelerate. It has to be 1.0+. So libchamplain loops until the speed reaches 0 but it never happens with a deceleration rate of 1.0. It should probably not accept 1.0 as a possible value.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report. 0.4.2 has a fix for that by not allowing values lower than 1.0001