[Pidgin] #2716: Permacrash on Away->Return Status coredumps on infinite loop

Pidgin trac at pidgin.im
Wed Aug 22 16:47:35 EDT 2007


#2716: Permacrash on Away->Return Status coredumps on infinite loop
-----------------------------+----------------------------------------------
 Reporter:  Gambit-          |       Type:  patch
   Status:  new              |   Priority:  minor
Component:  pidgin (gtk)     |    Version:  2.1.1
 Keywords:  idle crash loop  |    Pending:  0    
-----------------------------+----------------------------------------------
 SUMMARY:

 Full application crash and core dump when changing state from AWAY to
 ONLINE.  On restart, application immediately crashes again.

 SYSTEM:

 Ubuntu Feisty, largely unmodified vanilla installation. Two accounts, one
 MSN and one AIM.   Autoaway was left at the default of 5 minutes, sounds
 were disabled, some other minor preferences changes were made.

 Pidgin-2.1.1 from the main website.  No additional plugins or other
 modules.

 REPRO:

 On returning to the desk, user right-clicked on Pidgin icon on the panel.
 Selected to change the state to ONLINE from AWAY.  Pidgin immediately
 crashed.

 NOTES:

 Further executions from the command line result in a core dump.  Running
 the application under GDB results in the following backtrace:
 {{{
 #0  0xb777d79a in g_str_equal () from /usr/lib/libglib-2.0.so.0
 #1  0xb7754556 in g_hash_table_lookup () from /usr/lib/libglib-2.0.so.0
 #2  0xb76f3ed2 in find_pref (name=0xb772903c
 "/purple/savedstatus/isidleaway")
     at prefs.c:101
 #3  0xb76f4101 in purple_prefs_get_bool (
     name=0xb772903c "/purple/savedstatus/isidleaway") at prefs.c:987
 #4  0xb7700380 in purple_savedstatus_is_idleaway () at savedstatuses.c:854
 #5  0xb7700449 in purple_savedstatus_set_idleaway (idleaway=0)
     at savedstatuses.c:863
 #6  0xb76e5b8a in check_idleness () at idle.c:166
 #7  0xb76e5bf7 in check_idleness_timer () at idle.c:221
 #8  0xb7700465 in purple_savedstatus_set_idleaway (idleaway=0)
     at savedstatuses.c:869
 #9  0xb76e5b8a in check_idleness () at idle.c:166
 #10 0xb76e5bf7 in check_idleness_timer () at idle.c:221
 #11 0xb7700465 in purple_savedstatus_set_idleaway (idleaway=0)
     at savedstatuses.c:869
 #12 0xb76e5b8a in check_idleness () at idle.c:166
 #13 0xb76e5bf7 in check_idleness_timer () at idle.c:221
 #14 0xb7700465 in purple_savedstatus_set_idleaway (idleaway=0)
     at savedstatuses.c:869
 ...
 }}}

 This repeats indefinitely.

 FIX:

 By placing the 'no_away' boolean to TRUE prior to calling
 purple_savedstatus_set_idleaway(FALSE), this appears to prevent the
 infinite loop.  Empirical testing bears this out.
 {{{
 --- libpurple/idle.c    2007-08-20 11:12:48.000000000 -0700
 +++ libpurple/idle.c    2007-08-22 13:38:03.000000000 -0700
 @@ -163,8 +163,8 @@ check_idleness(void)
                 {
                         if (!no_away)
                         {
 -                               purple_savedstatus_set_idleaway(FALSE);
                                 no_away = TRUE;
 +                               purple_savedstatus_set_idleaway(FALSE);
                         }
                         time_until_next_idle_event = 0;
                         return;

 }}}

-- 
Ticket URL: <http://developer.pidgin.im/ticket/2716>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list