#5215 NORM Never A: Sound doesn't work in SimCity in Ship.2

Zarro Boogs per Child bugtracker at laptop.org
Fri Nov 30 13:55:21 EST 2007


#5215: Sound doesn't work in SimCity in Ship.2
---------------------+------------------------------------------------------
  Reporter:  gnu     |       Owner:  jg                               
      Type:  defect  |      Status:  new                              
  Priority:  normal  |   Milestone:  Never Assigned                   
 Component:  distro  |     Version:  Development build as of this date
Resolution:          |    Keywords:                                   
  Verified:  0       |  
---------------------+------------------------------------------------------

Comment(by gnu):

 gobject is very poorly documented; it doesn't say exactly when or whether
 one must call gobject.threads_init(), nor whether it's safe to do it twice
 (e.g. in sugar and then again in the application), nor (if it's unsafe to
 call it twice) how one can tell whether the program needs to call
 gobject.threads_init():

   http://library.gnome.org/devel/pygobject/stable/gobject-functions.html

 Bug reports in other projects indicate that there are problems around
 calling it wrongly; this one says that it must be called *before any other
 gobject function* if you're going to use threads!:

   http://osdir.com/ml/python.twisted.commits/2005-05/msg00002.html

 Of course, we don't know if that's actually true.

 This reports a problem that is circumvented in Python 2.3 if you call
 gobject.threads_init early.  But it's claimed to be fixed in Python-2.4:

   http://twistedmatrix.com/trac/ticket/1083

 What's clear from all this is that Python library threading is a snakepit.
 The library authors didn't just "make it work" whether you use threading
 or not; they require callers to do specific things, without documenting
 exactly when or why.  This snakepit interacts poorly with the "what
 environment Sugar passes to activities" snakepit.  Sugar's documentation
 will have to make it really clear to activity authors:

   *  What they have to do if they don't use threads.
   *  What they have to do if they do use threads.
   *  How they can tell which version of Sugar they're running, and adapt,
 if you change
      Sugar's threading model (e.g. between 623 and 646; or between 623 and
 Joyride; or after
      you fix the dbus bug and change it again).

 [I didn't even get into the related dbus.glib.threads_init() issue.]

 Specific advice on how to make a !SimCity that runs on both 623 and 646+
 would be useful.  I haven't attempted a fix yet, since the earlier
 comments don't make it clear what to do.

 See also #5208 to find the !SimCity sources (and a second new
 Sugar/Simcity interaction bug).

-- 
Ticket URL: <http://dev.laptop.org/ticket/5215#comment:5>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list