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 571503 - hamster hangs whilst trying to load evolution calendar
hamster hangs whilst trying to load evolution calendar
Status: RESOLVED OBSOLETE
Product: hamster-applet
Classification: Deprecated
Component: general
2.25.x
Other Linux
: Normal normal
: ---
Assigned To: Patryk Zawadzki
hamster-applet-maint
Depends on:
Blocks:
 
 
Reported: 2009-02-12 16:39 UTC by Pedro Fragoso
Modified: 2009-05-12 19:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Pedro Fragoso 2009-02-12 16:39:55 UTC
This bug was reported on https://bugs.edge.launchpad.net/ubuntu/+source/hamster-applet/+bug/328619


# Description

hamster-applet hangs both when added to the panel or run as a standalone window app. Looking at the output from an attempted standalone run shows that it hangs whilst trying to load the evolution calendar information. I do not use evolution and ~/.evolution is empty before running hamster.

# Version Information

Running a relatively fresh install of Jaunty with all updates applied.

$ lsb_release -rd
Description: Ubuntu jaunty (development branch)
Release: 9.04

$ for app in `apt-cache depends hamster-applet | sed -e 's/\s*Depends: //'` ; do apt-cache policy $app | grep -B 1 Installed;done
hamster-applet:
  Installed: 2.25.3-0ubuntu1
libatk1.0-0:
  Installed: 1.25.2-0ubuntu1
libc6:
  Installed: 2.9-0ubuntu9
libcairo2:
  Installed: 1.8.6-1ubuntu1
libfontconfig1:
  Installed: 2.6.0-1ubuntu4
libfreetype6:
  Installed: 2.3.7-2ubuntu1
libglib2.0-0:
  Installed: 2.19.6-0ubuntu3
libgtk2.0-0:
  Installed: 2.15.3-0ubuntu2
libpango1.0-0:
  Installed: 1.22.4-1
zlib1g:
  Installed: 1:1.2.3.3.dfsg-12ubuntu1
gconf2:
  Installed: 2.25.0-0ubuntu1
python:
  Installed: 2.5.2-3ubuntu1
python:
  Installed: 2.5.2-3ubuntu1
python-central:
  Installed: 0.6.7ubuntu1
python-gtk2:
  Installed: 2.13.0-2ubuntu4
python-glade2:
  Installed: 2.13.0-2ubuntu4
python-gnome2-desktop:
  Installed: 2.25.90-0ubuntu1
python-gobject:
  Installed: 2.15.4-1

# Output

$ python /usr/lib/hamster-applet/hamster-applet -t -w
Running installed hamster, using [/usr/lib/python2.5/site-packages:$PYTHONPATH]
Data Dir: /usr/share/hamster-applet
SELECT version FROM version None
select count(*) from categories None
Binding shortcut <Super>H to popup hamster
Running with options: {'do_trace': True, 'standalone': True}

                   SELECT a.id AS id,
                          a.start_time AS start_time,
                          a.end_time AS end_time,
                          a.description as description,
                          b.name AS name, b.id as activity_id,
                          coalesce(c.name, ?) as category, c.id as category_id
                     FROM facts a
                LEFT JOIN activities b ON a.activity_id = b.id
                LEFT JOIN categories c on b.category_id = c.id
                    WHERE date(a.start_time) >= ? and date(a.start_time) <= ?
                 ORDER BY a.start_time
         ('Unsorted', datetime.date(2009, 2, 12), datetime.date(2009, 2, 12))

                   SELECT lower(a.name) as name, b.name as category
                     FROM activities a
                LEFT JOIN categories b on coalesce(b.id, -1) = a.category_id
                    WHERE deleted is null
                 ORDER BY lower(a.name)
         None

                   SELECT a.*, b.name as category, b.category_order
                     FROM activities a
                LEFT JOIN categories b on coalesce(b.id, -1) = a.category_id
                    WHERE a.category_id > -1
                      AND a.deleted is null
                 ORDER BY category_order, activity_order
         None
** (hamster-applet:5826): DEBUG: Opening calendar source uri: file:///home/dnwe/.evolution/tasks/local/system

^ hangs at this point

# Workaround

If I comment out the 'import evolution' lines in /usr/lib/python2.5/site-packages/hamster/eds.py then hamster starts and operates as expected.

i.e.,

#try:
# import evolution
# from evolution import ecal
# EDS_AVAILABLE = True
#except:
# pass
Comment 1 Dominic Evans 2009-02-12 16:52:07 UTC
fyi, this was reported by me
Comment 2 Pedro Fragoso 2009-02-12 17:06:52 UTC
The line that's making the hang is 

data = ecal.open_calendar_source(source[1], ecal.CAL_SOURCE_TYPE_TODO)
Comment 3 Toms Bauģis 2009-02-14 00:36:18 UTC
Could not reproduce the hang on vanilla jaunty on virtual box.
Any ideas?
Comment 4 Pedro Fragoso 2009-02-14 00:40:44 UTC
I'm still getting this on a updated jaunty. Can you compare the versions of Dominic with yours?
Comment 5 Toms Bauģis 2009-02-14 01:03:11 UTC
ah, my bad, just updated all the packages and now my hamster also hung.
Will see what i can find!
Comment 6 Pedro Fragoso 2009-02-14 01:08:11 UTC
In [1]: import evolution

In [2]: from evolution import ecal

In [3]: sources = ecal.list_task_sources()

In [4]: sources
Out[4]: [('Personal', 'file:///home/pmf/.evolution/tasks/local/system')]

In [5]: for source in sources:
   ...:     category = source[0]
   ...:     data = ecal.open_calendar_source(source[1], ecal.CAL_SOURCE_TYPE_TODO)
   ...:     
   ...:     
** (process:1494): DEBUG: Opening calendar source uri: file:///home/pmf/.evolution/tasks/local/system

This is what i get.
Comment 7 Toms Bauģis 2009-02-14 11:43:20 UTC
Patryk, as the original author, could you please drop an eye on this - i disabled EDS import so at least hamster doesn't hang on all those boxes, but i really don't know where to start - which component the bug should be reported to or anything
Comment 8 Patryk Zawadzki 2009-02-14 13:19:48 UTC
Will look into it
Comment 9 Toms Bauģis 2009-02-15 13:38:39 UTC
filed a bug against g-p-d: bug 571829
Comment 10 Toms Bauģis 2009-02-23 15:22:22 UTC
Pedro - can you still reproduce the hang with the code from comment #6?
Comment 11 Pedro Fragoso 2009-02-23 15:26:43 UTC
No, it doesn't hang just outputs the error.
Comment 12 Toms Bauģis 2009-02-23 15:28:01 UTC
errrm, what error may i ask?
Comment 13 Pedro Fragoso 2009-02-23 15:31:16 UTC
Ah sorry, it's just DEBUG

** (process:24457): DEBUG: Opening calendar source uri: file:///home/pmf/.evolution/tasks/local/system
Comment 14 Dominic Evans 2009-02-23 15:32:27 UTC
can confirm the hang no longer occurs on latest Jaunty updates using the testcase in bug 571829

does gnome-python-desktop have a regression testsuite that this can be added to, in order to prevent the bug returning?
Comment 15 Toms Bauģis 2009-04-12 20:37:49 UTC
solved, methinks.
Comment 16 damir 2009-05-12 17:32:56 UTC
People!
Hamster applet works fine with EDS. Why do you return in function get_eds_tasks (in eds.py) ??
I can easily import tasks and track time..
Comment 17 damir 2009-05-12 17:35:01 UTC
I mean 35th line in eds.py:
def get_eds_tasks():
    # the development version of evolution API causes whole thing to hang
    # http://bugzilla.gnome.org/show_bug.cgi?id=571503
    # disabling until we get some solution.
    print "INFO: Not importing evolution tasks, see http://bugzilla.gnome.org/show_bug.cgi?id=571503"
    return []


I just commented it.
Comment 18 Toms Bauģis 2009-05-12 19:28:40 UTC
well, people, you should check code in version control to make sure if your statement is still true.