1. 12 Mar, 2012 1 commit
  2. 21 Feb, 2012 1 commit
  3. 07 Sep, 2011 1 commit
  4. 15 Aug, 2011 1 commit
  5. 14 Jul, 2011 1 commit
  6. 13 Jul, 2011 3 commits
  7. 08 Jul, 2011 2 commits
  8. 07 Jul, 2011 1 commit
    • Martin Pitt's avatar
      Fix crash in Gtk.TextIter overrides · e114c3de
      Martin Pitt authored
      With commit 17cd0fb3 Gtk.TextIter.{forward,backward}_search() returns undefined
      pointers when the search was unsuccessful. Actually check the "success" return
      value; if it is False return None, just like PyGTK used to.
      Thanks to Michael Vogt for discovering this and writing the test case!
      Test case:
      -------------- 8< -----------------
      from gi.repository import Gtk
      win = Gtk.Window.new(Gtk.WindowType.TOPLEVEL)
      textview = Gtk.TextView()
      buffer = textview.get_buffer()
      buffer.set_text("hello world")
      iter = buffer.get_start_iter()
      end = buffer.get_end_iter()
      ret = iter.forward_search("foo",
      print "this is my return value"
      print ret
      print "now I crash"
      print ret[0].get_offset()
      -------------- 8< -----------------
  9. 01 Jul, 2011 1 commit
  10. 28 Jun, 2011 1 commit
  11. 27 Jun, 2011 1 commit
  12. 13 Jun, 2011 1 commit
  13. 11 Jun, 2011 1 commit
  14. 10 Jun, 2011 2 commits
  15. 08 Jun, 2011 6 commits
  16. 06 Jun, 2011 1 commit
    • Daniel Drake's avatar
      Fix GC-related crash during PyGObject deallocation · eca590a3
      Daniel Drake authored
      Python-2.7.1's GC source has the following comment:
              /* Python's cyclic gc should never see an incoming refcount
               * of 0:  if something decref'ed to 0, it should have been
               * deallocated immediately at that time.
               * Possible cause (if the assert triggers):  a tp_dealloc
               * routine left a gc-aware object tracked during its teardown
               * phase, and did something-- or allowed something to happen --
               * that called back into Python.  gc can trigger then, and may
               * see the still-tracked dying object.  Before this assert
               * was added, such mistakes went on to allow gc to try to
               * delete the object again.  In a debug build, that caused
               * a mysterious segfault, when _Py_ForgetReference tried
               * to remove the object from the doubly-linked list of all
               * objects a second time.  In a release build, an actual
               * double deallocation occurred, which leads to corruption
               * of the allocator's internal bookkeeping pointers.  That's
               * so serious that maybe this should be a release-build
               * check instead of an assert?
      As shown in a backtrace at
      https://bugzilla.redhat.com/show_bug.cgi?id=640972 , pygobject is making
      this exact mistake. Before untracking its object, pygobject_dealloc
      calls PyObject_ClearWeakRefs() which can call back into python, create
      new allocations, and trigger the GC.
      This is causing Sugar (based on pygobject2 + pygtk2 static bindings) to
      crash on a regular basis while interacting with widgets or launching
      Fix this by untracking the object early. Also fix the same issue spotted
      in the GSource wrapper.
      Thanks to Bernie Innocenti for initial diagnosis.
  17. 05 May, 2011 1 commit
    • Martin Pitt's avatar
      Fix symbol names to be locale independent · ad96a3f1
      Martin Pitt authored
      We currently use upper() to present enum values, which are usually defined in
      lower case in the typelib, in upper cases. However, upper() is locale
      dependent, so that e. g. in tr_TR.UTF-8, "invalid" becomes "iNVALiD"
      because Turkish has some extra variants of "i".
      Use a local ASCII-only translate() call instead to avoid this. Thanks to Nils
      Philippsen for the idea!
      This also adds a test locale "te_ST@nouppera" which defines toupper('a') == 'a'.
      Run the Enum tests under this locale to reproduce the bug and verify the fix.
  18. 18 Apr, 2011 3 commits
  19. 16 Apr, 2011 1 commit
  20. 15 Apr, 2011 3 commits
  21. 11 Apr, 2011 1 commit
  22. 08 Apr, 2011 1 commit
    • Steve Fr茅cinaux's avatar
      Fix ABI break in old static bindings. · cc0e8423
      Steve Fr茅cinaux authored
      Commit 84d6142c (Always register a new
      GType when a GObject class is subclassed) breaks the more advanced usage
      of PyGObject with regards to "metaclass hackery" as used in for example
      the kiwi and sqlkit projects. But the users of the gi-based bindings
      now rely on the new behaviour.
      We fix this by restraining the systematical registering of new types to
      the new gi-based bindings, leaving the old pygtk ones untouched.
  23. 04 Apr, 2011 1 commit
  24. 24 Mar, 2011 4 commits