GNOME Bugzilla – Bug 613960
Dragging an SVG to the timeline fails
Last modified: 2010-10-01 11:55:09 UTC
Hi, When I drag a movie from the clip library to the timeline, _padEventCb() fires and sets self.pending_newsegment to something useful. When I drag a static SVG file from the clip library to the timeline, _padEventCb() is not called for some reason, and so self.pending_newsegment is not set to anything other than the "False" value that it was initialized with. We then see various tracebacks including: Traceback (most recent call last):
+ Trace 221099
self._srcpad.push_event(self.pending_newsegment)
--- Traceback (most recent call last): File "pitivi/timeline/track.py", line 991, in _videoInputPriorityChangedCb mixer.update_priority(pad, priority) File "pitivi/elements/mixer.py", line 148, in update_priority a,b,c,sinkpad = self.inputs[pad.get_name()] AttributeError: 'NoneType' object has no attribute 'get_name' --- ERROR [25178] [0x7faad9055700] "<Pipeline at 0x2336450>" pipeline Mar 25 17:23:33 _errorObject: error from /GnlSource:gnlsource: VideoTestSourceFactory47/GstBin:bin49/GstVideoTestSrc:videotestsrc19 (__main__.GstVideoTestSrc): GStreamer encountered a general stream error. (gstbasesrc.c(2507): gst_base_src_loop (): /GstPipeline:pipeline0/GstBin:bin0/GnlComposition:gnlcomposition0/GnlSource:gnlsource: VideoTestSourceFactory47/GstBin:bin49/GstVideoTestSrc:videotestsrc19: streaming task paused, reason not-linked (-1)) (pitivi/log/loggable.py:30)
(Oh -- I'm running Git master as of today, which is fad58f95e..)
Well, this is weird. When I drag a non-SVG movie to the timeline, nothing happens until I release the drag. When I release the drag, we go to _blockPad(), register _padEventCb(), _padEventCb() fires, we store the pending_newsegment, we get to _padBlockedCb() with blocked == False, and we push the newsegment event to the pad. When I drag an SVG to the timeline, as soon as my drag hits the timeline, even though I haven't let go of the mouse button yet, _blockPad() fires. _padEventCb() doesn't get called, but _padBlockedCb() does, first with blocked == True and then with blocked == False, and at that point it attempts to push pending_newsegment, which hasn't been assigned yet and is still False because _padEventCb() (which would assign it) was never called. So, to try and be more precise: when you drag an SVG to the timeline, everything happens while you're still dragging rather than when you've stopped, _padEventCb() is not called for unknown reasons, and so self.pending_newsegment is never set and we crash.
Getting this now: Traceback (most recent call last):
+ Trace 223741
commit 239e2fde2ea77db2c5a56afdd80badae5147b88d Author: Alessandro Decina <alessandro.d@gmail.com> Date: Fri Oct 1 13:52:55 2010 +0200 singledecodebin: initialize pending_newsegment to None. Fixes #613960.