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 622134 - PiTiVi constantly crashes when zooming in the track
PiTiVi constantly crashes when zooming in the track
Status: RESOLVED FIXED
Product: pygoocanvas
Classification: Deprecated
Component: general
Git Master
Other Linux
: Normal blocker
: ---
Assigned To: Gian Mario Tagliaretti
Gian Mario Tagliaretti
Depends on:
Blocks:
 
 
Reported: 2010-06-19 22:02 UTC by antistress
Modified: 2011-07-29 00:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (897 bytes, patch)
2010-09-28 13:57 UTC, Alessandro Decina
none Details | Review

Description antistress 2010-06-19 22:02:38 UTC
Using PiTiVi 0.13.4 on Lucid and GStreamer from PPA for GStreamer developers, PiTiVi always crashes when sooming in the track

Step to reproduce
Add a video (for instance http://libre-ouvert.toile-libre.org/data/documents/stallman_free_software_song_320x240.ogv ) to the library and drag it at the beginning at the beginning of the track
Zoom in using the slider (or the ctrl+mouse wheel)
PiTiVi crashes (Terminal says : "segmentation fault")
Comment 1 Edward Hervey 2010-06-20 08:49:02 UTC
Could you attach the full terminal output ? And preferably also the backtrace.
Comment 2 Jean-François Fortin Tam 2010-06-20 13:36:27 UTC
FWIW, I can't reproduce the problem on either pitivi git or 0.13.4.

I have a feel that "segmentation fault" *is* the full terminal output :) 
To get a backtrace, make sure to install all the "-dbg" (debug) packages related to gstreamer, pygtk, etc. Then run "gdb bin/pitivi"; at the prompt run "run", make it crash, then do "bt full" (there may be multiple pages of output).
Comment 3 antistress 2010-06-21 13:43:03 UTC
Indeed "segmentation fault" was the full terminal output

How can i backtrace a python script ?
Comment 4 antistress 2010-09-10 20:34:05 UTC
I'm still experiencing this bug with PiTiVi 0.13.4.2 in Maverick beta up to date.
I've made an absolutely clean install on a new hard drive with new / and /home.
I didn't add any PPA.

This bug occurs even if i deactivate waves and thumbs in the time line

I still don't know how to trace the bug considering that PiTiVi is written in Python

Being crash-proof is the functionality n°1 i'm looking for in an application.
Having PiTiVi always crashing when i use the slider is not cool at all :-/
Comment 5 Jean-François Fortin Tam 2010-09-10 22:51:57 UTC
Ok, make sure you have 

python-dbg python-gtk2-dbg python-gst0.10-dbg gstreamer0.10-gnonlin-dbg *gstreamer0.10*-dbg

...installed, then run:

"gdb python"

...then, at the gdb prompt, type "run bin/pitivi" (or "run /usr/bin/pitivi" for the system-wide installed version)

Make it crash, then execute:

"bt full"

Scroll as much as needed and paste all the output here.
Info taken from http://wiki.python.org/moin/DebuggingWithGdb
Comment 6 antistress 2010-09-10 23:51:19 UTC


  • #0 PyEval_EvalCodeEx
  • #1 function_call
  • #2 PyObject_Call
  • #3 instancemethod_call
  • #4 PyObject_Call
  • #5 PyEval_CallObjectWithKeywords
  • #6 PyObject_CallObject
  • #7 ??
    from /usr/lib/pymodules/python2.6/goocanvasmodule.so
  • #8 ??
    from /usr/lib/libgoocanvas.so.3
  • #9 ??
    from /usr/lib/libgoocanvas.so.3
  • #10 goo_canvas_item_update
    from /usr/lib/libgoocanvas.so.3
  • #11 ??
    from /usr/lib/libgoocanvas.so.3
  • #12 goo_canvas_item_update
    from /usr/lib/libgoocanvas.so.3
  • #13 ??
    from /usr/lib/libgoocanvas.so.3
  • #14 goo_canvas_item_update
    from /usr/lib/libgoocanvas.so.3
  • #15 ??
    from /usr/lib/libgoocanvas.so.3
  • #16 goo_canvas_item_update
    from /usr/lib/libgoocanvas.so.3
  • #17 ??
    from /usr/lib/libgoocanvas.so.3
  • #18 goo_canvas_item_update
    from /usr/lib/libgoocanvas.so.3
  • #19 ??
    from /usr/lib/libgoocanvas.so.3
  • #20 goo_canvas_update
    from /usr/lib/libgoocanvas.so.3
  • #21 ??
    from /usr/lib/libgoocanvas.so.3
  • #22 g_idle_dispatch
    at /build/buildd/glib2.0-2.25.15/glib/gmain.c line 4224
  • #23 g_main_dispatch
    at /build/buildd/glib2.0-2.25.15/glib/gmain.c line 2119
  • #24 g_main_context_dispatch
    at /build/buildd/glib2.0-2.25.15/glib/gmain.c line 2672
  • #25 g_main_context_iterate
    at /build/buildd/glib2.0-2.25.15/glib/gmain.c line 2750

Comment 7 Jean-François Fortin Tam 2010-09-23 00:10:48 UTC
Hmmm, could this be similar (or the same) as https://bugs.launchpad.net/ubuntu/+source/pitivi/+bug/642426 ?
Comment 8 Jean-François Fortin Tam 2010-09-24 16:15:19 UTC
Confirming. 100% reproducible in ubuntu maverick. We'll probably need to backport a fix for this.
Comment 9 Edward Hervey 2010-09-25 11:20:24 UTC
This is just plain weird. I can reproduce it too here.

It crashes when attempting to call ... Preview.do_simple_update

This is the relevant code where it crashes in python (PyEval_EvalCodeEx)
======================================
        for (i = 0; i < n; i++) {
            x = args[i];
            Py_INCREF(x);  <== HERE
            SETLOCAL(i, x);
        }
=======================================

Where:
 i = 1
 n = 2
 x = 0x0 <== Incrementing a NULL pointer <<BOOM>>
Comment 10 Alessandro Decina 2010-09-25 14:10:26 UTC
Yeah I debugged this with jeff yesterday. The crash is a bug in pygoocanvas. I have a fix for it, I'll make a patch on monday.
Comment 11 Edward Hervey 2010-09-26 07:37:40 UTC
Would be nice to get that fix pushed in distros :)
Comment 12 Alessandro Decina 2010-09-28 13:57:34 UTC
Created attachment 171260 [details] [review]
fix

The bug is in _wrap_GooCanvasItemSimple__proxy_do_simple_update. 

The issue is here:

    py_cr = PycairoContext_FromContext(cairo_reference(cr), &PyGdkCairoContext_Type, NULL); 

    py_args = PyTuple_New(1);
    PyTuple_SET_ITEM(py_args, 0, py_cr);
If PycairoContext_FromContext fails it returns NULL. We add a NULL item to a tuple and it crashes unreffing NULL when the tuple is disposed.
Comment 13 antistress 2010-10-04 19:33:02 UTC
with today maverick updates (pygoocanvas & pitivi) everything works fine now, thank you
Comment 14 annelies.debucquoy 2010-11-12 21:01:41 UTC
Can I have a patch against pitivi 0.13.5? Does pygoocanvas need patching too?
Comment 15 Jean-François Fortin Tam 2011-07-29 00:08:53 UTC
This pygoocanvas bug has been fixed in recent versions.