# \`main': can't modify frozen string / Gstreamer

**URL:** <https://www.ruby-forum.com/t/main-cant-modify-frozen-string-gstreamer/158168>\
**Category:** Ruby-Gnome 2\
**Created:** [January 20, 2009, 1:04am UTC](https://www.ruby-forum.com/t/main-cant-modify-frozen-string-gstreamer/158168 "2009-01-20T01:04:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pgoetzin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/edb3f5/32.png) [@pgoetzin](https://www.ruby-forum.com/u/pgoetzin)\
**Post date:** [January 20, 2009, 1:04am UTC](https://www.ruby-forum.com/t/main-cant-modify-frozen-string-gstreamer/158168/1 "2009-01-20T01:04:00Z")

</div>

Hello Everyone,  
last year i did a small video player with gst and ruby. its was pretty  
unstable but it was working.  
now i got a new/faster pc and reinstalled all the stuff and my player  
was not working anymore if i start it 10 times its working once.

here the errors  
sometimes =\>  
##############################################  
video-player.rb:220:in `main’: can’t modify frozen string  
from video-player.rb:220

sometimes =\>  
##############################################  
pgoetzin@localhost:~/Desktop$ ruby video-player.rb file:///sample.avi  
Streaming file:///sample.avi…  
video-player.rb:72:in `window': stack level too deep from video-player.rb:72:in `video\_element\_added\_cb’  
from video-player.rb:28:in `initialize' from video-player.rb:220:in `call’  
from video-player.rb:220:in `main’  
from video-player.rb:220  
############################################

i debugged my code and couldn’t get it fixed.  
then i tried the old sample, because i was sure that this was working on  
the old pc.( i also attached it to this posting) i comment out 2 or 3  
lines because of the new api.

[https://trac.luon.net/ruby-gstreamer0.10/browser/trunk/ruby-gstreamer0.10/sample/video-player.rb?rev=67](https://trac.luon.net/ruby-gstreamer0.10/browser/trunk/ruby-gstreamer0.10/sample/video-player.rb?rev=67)

but even with the sample i get the same error …

i tried various ruby versions  
ruby-1.8.6-p287-src ruby-1.8.7-p72-src with no success.

does anyone have any hints for me ?  
i already tried [http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips\_threads](http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips_threads)  
but with no success

is maybe ruby 1.9 better because of the differnt threading types ?  
does someone have a working sample with a window class that includes a  
gstwidget and connects to the right signals ?

thanks ahead

Philipp

---

<div class="post-metadata">

**Author:** ![pgoetzin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/edb3f5/32.png) [@pgoetzin](https://www.ruby-forum.com/u/pgoetzin)\
**Post date:** [January 23, 2009, 7:56am UTC](https://www.ruby-forum.com/t/main-cant-modify-frozen-string-gstreamer/158168/2 "2009-01-23T07:56:48Z")

</div>

Hello.  
I try the code with two different files. I got an error:  
\*\* ERROR \*\*: Please call rbgutil\_start\_callback\_dispatch\_thread() to  
dispatch a callback from non-ruby thread before callbacks are requested  
from non-ruby thread.

I also tried the ‘gst0.10’ binding for an audio application. I haved  
errors so I try the ‘gst’ binding (from ruby-gnome2 project) and  
everythings seems to work fine.  
[http://ruby-gnome2.sourceforge.jp/hiki.cgi](http://ruby-gnome2.sourceforge.jp/hiki.cgi)  
The documentation on the hiki seems old but there is a video player  
sample with the sources.

---

<div class="post-metadata">

**Author:** ![pgoetzin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/edb3f5/32.png) [@pgoetzin](https://www.ruby-forum.com/u/pgoetzin)\
**Post date:** [January 25, 2009, 10:25am UTC](https://www.ruby-forum.com/t/main-cant-modify-frozen-string-gstreamer/158168/3 "2009-01-25T10:25:59Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“[ruby-gnome2-devel-en] `main’: can’t modify frozen string /  
Gstreamer” on Tue, 20 Jan 2009 01:04:00 +0100,  
Philipp G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> is maybe ruby 1.9 better because of the differnt threading types ?  
> does someone have a working sample with a window class that includes a  
> gstwidget and connects to the right signals ?

Are you using ruby 1.9? Your sample works with ruby 1.8.7 on  
my environment. Ruby-GNOME2 doesn’t support ruby 1.9 yet. We  
need help to support ruby 1.9.

## Thanks,

kou
