pitivi crashed with TypeError in do_simple_paint()

Bug #537619 reported by Trojkolka
490
This bug affects 92 people
Affects Status Importance Assigned to Milestone
PiTiVi
Fix Released
Medium
Pycairo
Won't Fix
Critical
pitivi (Ubuntu)
Fix Released
Undecided
Unassigned

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
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
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:
 Traceback (most recent call last):
   File "/usr/lib/pitivi/python/pitivi/ui/curve.py", line 261, in do_simple_paint
     cr.reset_clip()
 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

Revision history for this message
Trojkolka (trojkolka) wrote :
tags: removed: need-duplicate-check
visibility: private → public
Revision history for this message
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
Revision history for this message
Nicolas DERIVE (kalon33) wrote :

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

Revision history for this message
Jeff Fortin Tam (kiddo) wrote :

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

Revision history for this message
ooze (zoe-gauthier) wrote :

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()

with

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

ooze (zoe-gauthier)
tags: added: patch
tags: added: bugpattern-written
removed: bugpattern-needed
Revision history for this message
In , Jeff Fortin Tam (kiddo) wrote :

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
https://bugzilla.gnome.org/show_bug.cgi?id=612501

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!

Revision history for this message
In , Stevech1097 (stevech1097) wrote :

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.

Revision history for this message
In , Jeff Fortin Tam (kiddo) wrote :

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.

ooze (zoe-gauthier)
Changed in pitivi (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Jeff Fortin Tam (kiddo) wrote : Re: [Bug 537619] Re: pitivi crashed with TypeError in do_simple_paint()

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.

Revision history for this message
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.

Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
Edward Hervey (bilboed) (bilboed-deactivatedaccount) wrote :

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
Revision history for this message
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...

Revision history for this message
Jeff Fortin Tam (kiddo) wrote :

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

Jeff Fortin Tam (kiddo)
Changed in pitivi (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
sam tygier (samtygier) wrote :

still present in pitivi 0.13.4-2ubuntu1 in maverick

Revision history for this message
Jeff Fortin Tam (kiddo) wrote :

Please try with the 0.13.4.2 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)
Changed in pitivi (Ubuntu):
status: Triaged → Fix Released
Changed in pitivi:
importance: Unknown → Medium
Revision history for this message
Lödur (loedur) wrote :

Hello,

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)
Changed in pitivi (Ubuntu):
status: Fix Released → New
Revision history for this message
Jeff Fortin Tam (kiddo) wrote :

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

Revision history for this message
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.
>

Revision history for this message
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
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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