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 576234 - [basetransform] Suggesting non-fixed caps or no size doesn't work for upstream negotiation
[basetransform] Suggesting non-fixed caps or no size doesn't work for upstrea...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.25
Other All
: High critical
: 0.10.29
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-21 20:40 UTC by Priit Laes (IRC: plaes)
Modified: 2010-03-16 23:43 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
basetransform: Only use suggested caps in buffer allocation if a size was suggested too (1.13 KB, patch)
2010-01-16 20:53 UTC, Sebastian Dröge (slomo)
committed Details | Review
basetransform: Accept non-fixed caps suggestions (3.16 KB, patch)
2010-03-16 18:56 UTC, Thiago Sousa Santos
needs-work Details | Review
basetransform: Accept non-fixed caps suggestions (3.09 KB, patch)
2010-03-16 20:14 UTC, Thiago Sousa Santos
committed Details | Review

Description Priit Laes (IRC: plaes) 2009-03-21 20:40:13 UTC
Version: 2.26.0

What were you doing when the application crashed?
Just a crash while watching move


Distribution: Gentoo Base System release 2.0.0
Gnome Release: 2.26.0 2009-03-20 (Gentoo)
BugBuddy Version: 2.26.0

System: Linux 2.6.28 #134 SMP PREEMPT Sat Dec 27 13:16:10 EET 2008 x86_64
X Vendor: The X.Org Foundation
X Vendor Release: 10503000
Selinux: No
Accessibility: Disabled
GTK+ Theme: Clearlooks Compact
Icon Theme: gnome
GTK+ Modules: canberra-gtk-module, gnomebreakpad

Memory status: size: 729612288 vsize: 729612288 resident: 122068992 share: 20512768 rss: 122068992 rss_rlim: 18446744073709551615
CPU usage: start_time: 1237667802 rtime: 1266 utime: 1186 stime: 80 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 100

Backtrace was generated from '/usr/bin/totem'

[Thread debugging using libthread_db enabled]
[New Thread 0x7f9897f6a750 (LWP 17769)]
[New Thread 0x7f986ffff950 (LWP 17781)]
[New Thread 0x7f9874b51950 (LWP 17780)]
[New Thread 0x7f9875352950 (LWP 17779)]
[New Thread 0x7f98761a0950 (LWP 17778)]
[New Thread 0x7f9876ffd950 (LWP 17777)]
[New Thread 0x7f98777fe950 (LWP 17776)]
[New Thread 0x7f9877fff950 (LWP 17775)]
[New Thread 0x7f987ffee950 (LWP 17774)]
[New Thread 0x7f9882cf3950 (LWP 17771)]
0x00007f9894a9d5e6 in __poll (fds=0x1870190, nfds=11, timeout=199)
    at ../sysdeps/unix/sysv/linux/poll.c:87
	in ../sysdeps/unix/sysv/linux/poll.c

Thread 5 (Thread 0x7f98761a0950 (LWP 17778))

  • #0 __libc_waitpid
    at ../sysdeps/unix/sysv/linux/waitpid.c line 41
  • #1 IA__g_spawn_sync
    at gspawn.c line 382
  • #2 IA__g_spawn_command_line_sync
    at gspawn.c line 694
  • #3 bugbuddy_segv_handle
    at gnome-breakpad.cc line 369
  • #4 <signal handler called>
  • #5 audioresample_transform_size
    at gstaudioresample.c line 411
  • #6 gst_base_transform_transform_size
    at gstbasetransform.c line 529
  • #7 gst_base_transform_handle_buffer
    at gstbasetransform.c line 1167
  • #8 gst_base_transform_chain
    at gstbasetransform.c line 1896
  • #9 gst_pad_chain_unchecked
    at gstpad.c line 3877
  • #10 gst_pad_push
    at gstpad.c line 4045
  • #11 gst_base_transform_chain
    at gstbasetransform.c line 1916
  • #12 gst_pad_chain_unchecked
    at gstpad.c line 3877
  • #13 gst_pad_push
    at gstpad.c line 4045
  • #14 gst_pad_chain_unchecked
    at gstpad.c line 3877
  • #15 gst_pad_push
    at gstpad.c line 4045
  • #16 gst_queue_loop
    at gstqueue.c line 1047
  • #17 gst_task_func
    at gsttask.c line 192
  • #18 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #19 g_thread_create_proxy
    at gthread.c line 635
  • #20 start_thread
    at pthread_create.c line 297
  • #21 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #22 ??


---- Critical and fatal warnings logged during execution ----

** totem **: gst_base_transform_find_transform: assertion `gst_caps_is_fixed (caps)' failed 
Output of custom script "/usr/libexec/totem/totem-bugreport.py":
gst-typefind-0.10 version 0.10.21
GStreamer 0.10.21
http://packages.gentoo.org/package/media-libs/gstreamer
Listened to a "" file on 2009-03-21T22:36:42




----------- .xsession-errors (104746 sec old) ---------------------
console message:  @1: Unsafe JavaScript attempt to access frame with URL http://www.gmodules.com/ig/ifr?url=http%3A%2F%2Fwww.google.com%2Fsupport%2Fforum%2Fstatic%2Fv1%2Ffeedreader.xml&up_feed_title=&
console message:  @1: Unsafe JavaScript attempt to access frame with URL http://www.gmodules.com/ig/ifr?url=http%3A%2F%2Fwww.google.com%2Fsupport%2Fforum%2Fstatic%2Fv1%2Ffeedreader.xml&up_feed_title=&
console message:  @1: Unsafe JavaScript attempt to access frame with URL http://www.gmodules.com/ig/ifr?url=http%3A%2F%2Fwww.google.com%2Fsupport%2Fforum%2Fstatic%2Fv1%2Ffeedreader.xml&up_feed_title=&
console message:  @1: Unsafe JavaScript attempt to access frame with URL http://www.gmodules.com/ig/ifr?url=http%3A%2F%2Fwww.google.com%2Fsupport%2Fforum%2Fstatic%2Fv1%2Ffeedreader.xml&up_feed_title=&
console message:  @1: Unsafe JavaScript attempt to access frame with URL http://www.gmodules.com/ig/ifr?url=http%3A%2F%2Fwww.google.com%2Fsupport%2Fforum%2Fstatic%2Fv1%2Ffeedreader.xml&up_feed_title=&
console message:  @1: Unsafe JavaScript attempt to access frame with URL http://www.gmodules.com/ig/ifr?url=http%3A%2F%2Fwww.google.com%2Fsupport%2Fforum%2Fstatic%2Fv1%2Ffeedreader.xml&up_feed_title=&
console message:  @1: Unsafe JavaScript attempt to access frame with URL http://www.gmodules.com/ig/ifr?url=http%3A%2F%2Fwww.google.com%2Fsupport%2Fforum%2Fstatic%2Fv1%2Ffeedreader.xml&up_feed_title=&
...Too much output, ignoring rest...
--------------------------------------------------
Comment 1 Priit Laes (IRC: plaes) 2009-03-22 06:39:18 UTC
How to reproduce:
1) Start movie with totem and set it playing
2) Edit -> Preferences
3) Choose audio tab
4) Change the "output" type ie. from Stereo to 5.1 channel audio

Crash :)
Comment 2 Sebastian Dröge (slomo) 2009-03-22 11:34:38 UTC
Which version of gstreamer and gst-plugins-base is used here?
Comment 3 Priit Laes (IRC: plaes) 2009-03-22 17:29:14 UTC
> Which version of gstreamer and gst-plugins-base is used here?

media-libs/gstreamer-0.10.21-r3
media-libs/gst-plugins-base-0.10.21
Comment 4 Tim-Philipp Müller 2009-05-31 17:06:38 UTC
Could you run totem in gdb with

 $ G_DEBUG=fatal_warnings gdb --args /usr/bin/totem file-or-uri

so we get a stack trace from the "** totem **: gst_base_transform_find_transform: assertion `gst_caps_is_fixed (caps)' failed" warning?

Also, the audioresample element has been replaced by a new element in the last release, so it would be great if you could retest with the latest core/base releases (0.10.23).
Comment 5 Priit Laes (IRC: plaes) 2009-05-31 20:33:37 UTC
** CRITICAL **: gst_base_transform_find_transform: assertion `gst_caps_is_fixed (caps)' failed
aborting...

Program received signal SIGABRT, Aborted.

Thread 140615810365712 (LWP 28721)

  • #0 raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 abort
    at abort.c line 88
  • #2 IA__g_logv
    at gmessages.c line 506
  • #3 IA__g_log
    at gmessages.c line 526
  • #4 gst_base_transform_find_transform
    at gstbasetransform.c line 776
  • #5 gst_base_transform_buffer_alloc
    at gstbasetransform.c line 1548
  • #6 gst_pad_alloc_buffer_full
    at gstpad.c line 2791
  • #7 gst_pad_alloc_buffer_full
    at gstpad.c line 2791
  • #8 gst_base_transform_buffer_alloc
    at gstbasetransform.c line 1586
  • #9 gst_pad_alloc_buffer_full
    at gstpad.c line 2791
  • #10 gst_base_transform_buffer_alloc
    at gstbasetransform.c line 1586
  • #11 gst_pad_alloc_buffer_full
    at gstpad.c line 2791
  • #12 gst_base_transform_handle_buffer
    at gstbasetransform.c line 1244
  • #13 gst_base_transform_chain
    at gstbasetransform.c line 2018
  • #14 gst_pad_chain_unchecked
    at gstpad.c line 3977
  • #15 gst_pad_push
    at gstpad.c line 4144
  • #16 gst_pad_chain_unchecked
    at gstpad.c line 3977
  • #17 gst_pad_push
    at gstpad.c line 4144
  • #18 gst_queue_loop
    at gstqueue.c line 1042
  • #19 gst_task_func
    at gsttask.c line 172
  • #20 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #21 g_thread_create_proxy
    at gthread.c line 635
  • #22 start_thread
    at pthread_create.c line 297
  • #23 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #24 ??
  • #0 raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 abort
    at abort.c line 88
  • #2 IA__g_logv
    at gmessages.c line 506
  • #3 IA__g_log
    at gmessages.c line 526
  • #4 gst_base_transform_find_transform
    at gstbasetransform.c line 776
  • #5 gst_base_transform_buffer_alloc
    at gstbasetransform.c line 1548
  • #6 gst_pad_alloc_buffer_full
    at gstpad.c line 2791
  • #7 gst_pad_alloc_buffer_full
    at gstpad.c line 2791
  • #8 gst_base_transform_buffer_alloc
    at gstbasetransform.c line 1586
  • #9 gst_pad_alloc_buffer_full
    at gstpad.c line 2791
  • #10 gst_base_transform_buffer_alloc
    at gstbasetransform.c line 1586
  • #11 gst_pad_alloc_buffer_full
    at gstpad.c line 2791
  • #12 gst_base_transform_handle_buffer
    at gstbasetransform.c line 1244
  • #13 gst_base_transform_chain
    at gstbasetransform.c line 2018
  • #14 gst_pad_chain_unchecked
    at gstpad.c line 3977
  • #15 gst_pad_push
    at gstpad.c line 4144
  • #16 gst_pad_chain_unchecked
    at gstpad.c line 3977
  • #17 gst_pad_push
    at gstpad.c line 4144
  • #18 gst_queue_loop
    at gstqueue.c line 1042
  • #19 gst_task_func
    at gsttask.c line 172
  • #20 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #21 g_thread_create_proxy
    at gthread.c line 635
  • #22 start_thread
    at pthread_create.c line 297
  • #23 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #24 ??

Comment 6 Wim Taymans 2009-08-24 15:34:18 UTC
a nasty refcounting problem has been fixed in git too, it should be in 0.10.25 when it's out.
Comment 7 Sebastian Dröge (slomo) 2009-09-10 08:52:03 UTC
Does this stilll happen with latest GIT? If it does GST_DEBUG=5 output would be nice to have (bzip2 compressed attached because it's probably too large).
Comment 8 Priit Laes (IRC: plaes) 2009-09-10 12:09:23 UTC
(In reply to comment #7)
> Does this stilll happen with latest GIT? If it does GST_DEBUG=5 output would be
> nice to have (bzip2 compressed attached because it's probably too large).

This is still happening with 0.10.24.

I feel a bit reluctant about trying git version, can't this wait until either 0.10.25 is out or I can just test specific patch?
Comment 9 Sebastian Dröge (slomo) 2009-09-11 05:23:36 UTC
0.10.24 is fine too. Could you provide a debug log with 0.10.24?
Comment 10 Priit Laes (IRC: plaes) 2009-09-11 17:52:00 UTC
Here we go: http://plaes.org/files/2009-Q3/totem.log.bz2
Comment 11 Tobias Mueller 2010-01-10 22:32:24 UTC
Priit, is this still an issue with gstreamer-0.10.25?
Comment 12 Priit Laes (IRC: plaes) 2010-01-11 19:27:22 UTC
(In reply to comment #11)
> Priit, is this still an issue with gstreamer-0.10.25?

Yes it is (updated version).

Uploaded a new log file: http://plaes.org/files/2010-Q1/totem.log.lzma
Comment 13 Sebastian Dröge (slomo) 2010-01-16 20:12:24 UTC
FWIW, I can reproduce it now :)
Comment 14 Sebastian Dröge (slomo) 2010-01-16 20:34:43 UTC
Problem is, that totem has a capsfilter which will get new caps whenever the audio settings are changed. Capsfilter will call gst_base_transform_suggest() with this, which will later in gst_base_transform_buffer_alloc() call gst_base_transform_find_transform(). Unfortunately this function requires fixed caps but totem sets unfixed caps :)

Not sure what should be done here, capsfilter should definitely accept unfixed caps.
Comment 15 Sebastian Dröge (slomo) 2010-01-16 20:53:00 UTC
Created attachment 151566 [details] [review]
basetransform: Only use suggested caps in buffer allocation if a size was suggested too
Comment 16 Sebastian Dröge (slomo) 2010-01-16 20:55:59 UTC
(In reply to comment #15)
> Created an attachment (id=151566) [details] [review]
> basetransform: Only use suggested caps in buffer allocation if a size was
> suggested too

This "fixes" the assertion but it's definitely not a complete and correct fix. Not sure how the new caps suggestion by capsfilter should be forwarded upstream without them being fixed and without having a size suggestion too.
Comment 17 Thiago Sousa Santos 2010-03-16 13:12:40 UTC
Comment on attachment 151566 [details] [review]
basetransform: Only use suggested caps in buffer allocation if a size was suggested too

From the code it seems this has been committed
Comment 18 Thiago Sousa Santos 2010-03-16 18:56:36 UTC
Created attachment 156297 [details] [review]
basetransform: Accept non-fixed caps suggestions

When doing pad_allocs, use non-fixed caps suggestions and
try to fixate them before using. This makes possible to
have suggested buffer size with 0 in basetransform just
to signal upstream a renegotiation is needed

Fixes #576234
Fixes #609046
Comment 19 Sebastian Dröge (slomo) 2010-03-16 19:50:48 UTC
Review of attachment 156297 [details] [review]:

Looks good except this:

::: libs/gst/base/gstbasetransform.c
@@ +1599,3 @@
+
+        if (!gst_caps_is_fixed (sink_suggest))
+          goto not_fixed;

If the caps are not fixed after intersecting and fixating you should not error out but instead do no upstream negotiation.

This case can happen if the upstream element is some converter for example. Take the totem case, the sample rate would still not be fixated if audioresample is before the capsfilter.
Comment 20 Thiago Sousa Santos 2010-03-16 20:14:16 UTC
Created attachment 156302 [details] [review]
basetransform: Accept non-fixed caps suggestions

Updated patch with suggestions.
Comment 21 Sebastian Dröge (slomo) 2010-03-16 20:27:04 UTC
(In reply to comment #20)
> Created an attachment (id=156302) [details] [review]
> basetransform: Accept non-fixed caps suggestions
> 
> Updated patch with suggestions.

Looks good :)
Comment 22 Thiago Sousa Santos 2010-03-16 23:41:16 UTC
Pushed

Module: gstreamer
Branch: master
Commit: a6a3c129d11e81e932b5e4ce2b42f1294d135e3c
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=a6a3c129d11e81e932b5e4ce2b42f1294d135e3c

Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Tue Mar 16 10:32:12 2010 -0300

basetransform: Accept non-fixed caps suggestions

When doing pad_allocs, use non-fixed caps suggestions and
try to fixate them before using. This makes possible to
have suggested buffer size with 0 in basetransform just
to signal upstream a renegotiation is needed

Fixes #576234
Fixes #609046