pitivi crashed with TypeError in do_simple_paint()

Bug #537619 reported by Trojkolka on 2010-03-11
This bug affects 92 people
Affects Status Importance Assigned to Milestone
Fix Released
Won't Fix
pitivi (Ubuntu)

Bug Description

Binary package hint: pitivi

was dragging the end line of a video imported on the timeline (avi file) when this error occured.

ProblemType: Crash
Architecture: i386
Date: Thu Mar 11 22:19:17 2010
DistroRelease: Ubuntu 10.04
ExecutablePath: /usr/bin/pitivi
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha i386 (20100224.1)
InterpreterPath: /usr/bin/python2.6
Package: pitivi 0.13.4-0ubuntu1
PackageArchitecture: all
ProcCmdline: python /usr/bin/pitivi
ProcVersionSignature: Ubuntu 2.6.32-16.25-generic-pae
PythonArgs: ['/usr/bin/pitivi']
SourcePackage: pitivi
Title: pitivi crashed with TypeError in do_simple_paint()
 Traceback (most recent call last):
   File "/usr/lib/pitivi/python/pitivi/ui/curve.py", line 261, in do_simple_paint
 TypeError: Required argument 'cr' (pos 1) not found
Uname: Linux 2.6.32-16-generic-pae i686
UserGroups: adm admin audio cdrom dialout dip fax floppy fuse lpadmin netdev nopasswdlogin plugdev sambashare tape video

Related branches

Trojkolka (trojkolka) wrote :
tags: removed: need-duplicate-check
visibility: private → public
Jeff Fortin Tam (kiddo) wrote :

In my case, I can randomly reproduce it by making (or loading) a project with a bunch of clips on the timeline, hitting the spacebar to play/pause clips, and then sometimes pitivi doesn't react and apport pops up.

Changed in pitivi (Ubuntu):
status: New → Confirmed
tags: added: bugpattern-needed
Nicolas DERIVE (kalon33) wrote :

Got a traceback :
File "/usr/lib/pitivi/python/pitivi/ui/curve.py", line 261, in do_simple_paint
TypeError: Required argument 'cr' (pos 1) not found

Jeff Fortin Tam (kiddo) wrote :

After some investigation, this looks like a bug in pycairo.

I can reproduce this bug outside of Pitivi. This looks like a subtlety/bug in pygtk!

In pygtk02.17.0/gtk/gdkcairo.override, lines 128 to 144, the wrapper requests keyword arguments "cr" and "drawable". Most other wrappers seem not to use the "cr" arguments, but retrieve the cairo context by using PycairoContext_GET(self). Maybe we just want to push this upstream and ask the pygtk developers what was their idea... In any case, gtk.gdk.CairoContext.reset_clip is undocumented.

A solution (or workaround, depending on how we perceive this) would be to replace



    cr.reset_clip(cr=cr, drawable=self.get_canvas())

tags: added: patch
tags: added: bugpattern-written
removed: bugpattern-needed

Our #1 pitivi bug on ubuntu 10.04 seems to be due to something misbehaving in pycairo.

See https://bugs.launchpad.net/ubuntu/+source/pitivi/+bug/537619

This worked without any problems on Ubuntu 9.10 and some other distros, but it seems that distros with more recent versions of pycairo are affected. Any help in fixing this/figuring out what's going on would be much appreciated!

pycairo is not the upstream package for this bug, pygtk is (and pycairo is upstream for pygtk).

cr.reset_clip() is calling gtk.gdk.CairoContext.reset_clip.
This is a pygtk function not a pycairo function.

Philippe Gauthier has already successfully diagnosed the problem, on BOTH the bug reports you quote, as being pygtk and not pycairo. Why do you ignore his advice?.

I suggest you open a bug report for pygtk.

Sorry, his comments arrived at roughly the same time that I was filing this bug, so I hadn't seen them and I wasn't sure what was causing it, so I needed your input.

Changed in pitivi (Ubuntu):
status: Confirmed → Fix Committed

I reported the bug in upstream pycairo. Argh, I hadn't seen you patched
pitivi for this in ubuntu. But I guess having upstream's opinion on this
is better, so we know if the patch is legitimate or not and if it should
be applied to pitivi git.

Jeff Fortin Tam (kiddo) wrote :

Upstream has a different fix. I need some help testing this. Can someone who can easily reproduce this problem test with emdash's "simple_paint_bug_612501" branch? The specific commit is this one: http://github.com/emdash/pitivi/commit/6981c2f22cfc1ae4308804c08a116a4e22fed1fd

I tried testing, but even with vanilla pitivi git (which is supposed to trigger the bug), I'm not able to trigger the bug at all. I'd like someone to confirm beyond the placebo effect.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pitivi - 0.13.4-0ubuntu2

pitivi (0.13.4-0ubuntu2) lucid; urgency=low

  * debian/patches/lp537619_gdk_cairo_reset_clip.patch: Use correct
    parameters for gtk.gdk.CairoContext.reset_clip. (LP: #537619)
 -- Philippe Gauthier <email address hidden> Mon, 05 Apr 2010 17:10:22 -0400

Changed in pitivi (Ubuntu):
status: Fix Committed → Fix Released
Changed in pitivi:
status: Unknown → Confirmed
Yann SLADEK (yann-sladek) wrote :

Still got the error with package 0.13.4-0ubuntu3
See https://bugs.launchpad.net/pitivi/+bug/537619/comments/2 for how to reproduce it

Changed in pitivi (Ubuntu):
status: Fix Released → Confirmed
Jeff Fortin Tam (kiddo) wrote :

Yann: except that I (the one who wrote comment #2) am now unable to reproduce it. You have to provide better instructions than mine, also see comment #8.

Changed in pitivi (Ubuntu):
status: Confirmed → Incomplete
Changed in pitivi:
status: Confirmed → Fix Released

This bug report should be closed. PiTIVi has the fix and it's not pycairo's problem (see pycairo bug report)

Changed in pitivi (Ubuntu):
status: Incomplete → Fix Released
Jeff Fortin Tam (kiddo) wrote :

Philippe Gauthier, please revert the patch you applied to the ubuntu package and apply the official fix from upstream. Your patch is causing other issues and makes triaging harder because they are ubuntu-specific...

Jeff Fortin Tam (kiddo) wrote :

Oh and I meant the *pitivi* package in ubuntu. Thanks :)

Jeff Fortin Tam (kiddo) on 2010-05-25
Changed in pitivi (Ubuntu):
status: Fix Released → Triaged
sam tygier (samtygier) wrote :

still present in pitivi 0.13.4-2ubuntu1 in maverick

Jeff Fortin Tam (kiddo) wrote :

Please try with the pre-release available today in the GStreamer PPA. The Ubuntu package is still incorrectly patched. If this fixes your issues, Ubuntu needs to revert its patch/package the upcoming pitivi release.

Changed in pycairo:
importance: Unknown → Critical
status: Unknown → Won't Fix
Jeff Fortin Tam (kiddo) on 2010-09-14
Changed in pitivi (Ubuntu):
status: Triaged → Fix Released
Changed in pitivi:
importance: Unknown → Medium
Lödur (loedur) wrote :


the failure still presents with pitivi 0.13.5-1~lucid1 in lucid.
I used the "PPA for GStreamer developers"
deb http://ppa.launchpad.net/gstreamer-developers/ppa/ubuntu lucid main
deb-src http://ppa.launchpad.net/gstreamer-developers/ppa/ubuntu lucid main

I also updated the other depending packages.

Jeff Fortin Tam (kiddo) on 2010-10-13
Changed in pitivi (Ubuntu):
status: Fix Released → New
Jeff Fortin Tam (kiddo) wrote :

Can you try the package in maverick-proposed? I'm thinking this is a side-effect of bug #640630.

sebz (sebz71) wrote :

Ok I try

Thank you

Le dimanche 17 octobre 2010 à 16:18 +0000, Jean-François Fortin Tam a
écrit :
> Can you try the package in maverick-proposed? I'm thinking this is a
> side-effect of bug #640630.

sebz (sebz71) wrote :

Au fait je suis français.

Le dimanche 17 octobre 2010 à 16:18 +0000, Jean-François Fortin Tam a
écrit :
> Can you try the package in maverick-proposed? I'm thinking this is a
> side-effect of bug #640630.

Changed in pycairo:
importance: Critical → Unknown
Changed in pycairo:
importance: Unknown → Critical
Jeff Fortin Tam (kiddo) wrote :

0.93 is now available in Ubuntu 14.04's proposed updates, which makes the issue obsolete.

Changed in pitivi (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.