After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 596419 - libchamplain freezes after setting decel-rate
libchamplain freezes after setting decel-rate
Status: RESOLVED FIXED
Product: libchamplain
Classification: Core
Component: view
0.4.x
Other Linux
: Normal normal
: 0.6
Assigned To: libchamplain-maint
libchamplain-maint
Depends on:
Blocks:
 
 
Reported: 2009-09-26 11:17 UTC by Vladimir Nadvornik
Modified: 2009-10-26 23:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vladimir Nadvornik 2009-09-26 11:17:17 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.
Comment 1 Pierre-Luc Beaudoin 2009-09-26 13:06:02 UTC
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.
Comment 2 Pierre-Luc Beaudoin 2009-10-26 23:26:28 UTC
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