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 104829 - [0.6.3] crash when removing plugin without rerunning gst-register
[0.6.3] crash when removing plugin without rerunning gst-register
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.6.0
Other All
: Normal normal
: 0.6.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-01-30 17:19 UTC by Ronald Bultje
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (633 bytes, patch)
2003-07-29 06:59 UTC, David Schleef
none Details | Review

Description Ronald Bultje 2003-01-30 17:19:51 UTC
Any pipeline that uses a dynamic element (such as spider) which searches
the registry for elements to use will crash (segfault) if that element does
no longer exist (e.g. because it was removed).

Example:
gst-register
rm $(libdir)/gstreamer-0.x/libgstwincodec.so
gst-launch filesrc location=bla ! spider ! xvideosink

will segfault. Shouldn't this display a nice error message telling the user
he's a moron for removing elements and maybe even tell the user how he can
fix it (re-run gst-register)?
Comment 1 David Schleef 2003-05-13 04:37:34 UTC
Is this still a problem now that the registry is rebuilt?
Comment 2 Ronald Bultje 2003-05-15 19:26:55 UTC
Afaik, 0.6.1 had that patch included, and 0.6.1 still has the problem.

[rbultje@shrek rbultje]$ gst-launch filesrc location=file.mp3 ! spider
! osssink
INFO ( 6726: 0) Initializing GStreamer Core Library version 0.6.1
INFO ( 6726: 0) CPU features: (00000000) MMX SSE
 
GStreamer-ERROR **: No default scheduler name - do you have a registry ?
aborting...
Aborted
[rbultje@shrek rbultje]$

I'll try 0.6.x CVS next.
Comment 3 David Schleef 2003-07-29 06:43:19 UTC
This happens if

 - you have no user registry
 - the system registry is non-writable (duh!)
 - /usr/lib/gstreamer-0.6/ is modified

basically, the code realizes it is supposed to update the registry,
but doesn't, since it can't write the system registry.
Comment 4 David Schleef 2003-07-29 06:58:49 UTC
The following patch may fix it (untested)
Comment 5 David Schleef 2003-07-29 06:59:20 UTC
Created attachment 18709 [details] [review]
patch
Comment 6 Ronald Bultje 2003-07-29 09:01:44 UTC
But why doesn't it create a user registry instead of crashing? Or is
that too obvious?
Comment 7 David Schleef 2003-07-29 18:26:44 UTC
Because of the line removed in the patch, it never even gets to the
point where it attempts to rebuild the registry. If the file doesn't
exist, it is not readable, so it fails that test.  It seems ok to
remove the line, since gst_registry_load() checks for readability (and
existence, etc.) as well.
Comment 8 David Schleef 2003-08-06 01:20:40 UTC
I applied the patch to HEAD, and I think it works.
Comment 9 Thomas Vander Stichele 2003-08-26 15:24:52 UTC
applied to 0.6.2.1, closed.