librelist archives

« back to archive

princ - audio version stopped working

princ - audio version stopped working

From:
Sebastjan Hribar
Date:
2013-09-11 @ 18:24
Hi guys,

I have a problem regarding one of my projects. It's the princ decision 
based story - the audio version.

It stopped working and I can't pinpoint the cause. The code is here: [1]

The error is this:

princ_audio.rb:34:in `block (2 levels) in index': undefined method 
`uri=' for nil:NilClass (NoMethodError)
     from 

/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/slot.rb:30:in

`initialize'
     from 

/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/app.rb:69:in

`new'
     from 

/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/app.rb:69:in

`flow'
     from 

/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/url.rb:8:in

`block (3 levels) in url'
     from princ_audio.rb:32:in `block in index'
     from 

/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/slot.rb:30:in

`initialize'
     from 

/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/app.rb:59:in

`new'
     from 

/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/app.rb:59:in

`stack'
     from 

/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/url.rb:8:in

`block (3 levels) in url'
     from princ_audio.rb:27:in `index'
     from 

/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/url.rb:11:in

`block in url'
     from 

/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/main.rb:94:in

`call'
     from 

/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/main.rb:94:in

`block in app'
     from 

/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/main.rb:94:in

`instance_eval'
     from 

/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/main.rb:94:in

`app'
     from princ_audio.rb:675:in `<main>'


I'm not back yet as my MBA just kicked me in the ... well, it'll take a 
couple of more months...

Anyway my kids wanted to play this yesterday and I noticed that it 
broke. I haven't changed the code in anyway. The absolute paths are also 
ok. And the undefined method uri for NilClass is puzzling. I've checked 
the Gst code [2] and I can't seem to find the error. However, I never 
really fully studied the GStreamer:(

[1] https://github.com/sebastjan-hribar/princ/blob/master/princ_audio.rb
[2] http://ruby-gnome2.sourceforge.jp/hiki.cgi?GLib#GLib.filename_to_uri

I'd really appreciate any help.

regards,
seba

Re: [shoes] princ - audio version stopped working

From:
Tobias Pfeiffer
Date:
2013-09-11 @ 18:46
This seems to be a problem with GStreamer ('gst') - I don't know is 
that included into green shoes?

Seems to be very weird without any changes. Maybe there was a gem 
update or something?

Maybe Ash can help with this, I've never used gstremer... or J. kaiden, 
he made gswax. Maybe you can also have a look at that code, it's an 
audio player with green shoes and last time I checked it worked: 
https://github.com/lljk/gsWax

Cheers,
Tobi

On Wed 11 Sep 2013 08:24:07 PM CEST, Sebastjan Hribar wrote:
> Hi guys,
>
> I have a problem regarding one of my projects. It's the princ decision
> based story - the audio version.
>
> It stopped working and I can't pinpoint the cause. The code is here: [1]
>
> The error is this:
>
> princ_audio.rb:34:in `block (2 levels) in index': undefined method
> `uri=' for nil:NilClass (NoMethodError)
>       from
> 
/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/slot.rb:30:in
> `initialize'
>       from
> 
/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/app.rb:69:in
> `new'
>       from
> 
/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/app.rb:69:in
> `flow'
>       from
> 
/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/url.rb:8:in
> `block (3 levels) in url'
>       from princ_audio.rb:32:in `block in index'
>       from
> 
/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/slot.rb:30:in
> `initialize'
>       from
> 
/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/app.rb:59:in
> `new'
>       from
> 
/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/app.rb:59:in
> `stack'
>       from
> 
/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/url.rb:8:in
> `block (3 levels) in url'
>       from princ_audio.rb:27:in `index'
>       from
> 
/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/url.rb:11:in
> `block in url'
>       from
> 
/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/main.rb:94:in
> `call'
>       from
> 
/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/main.rb:94:in
> `block in app'
>       from
> 
/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/main.rb:94:in
> `instance_eval'
>       from
> 
/home/sebah/.rvm/gems/ruby-1.9.3-p392/gems/green_shoes-1.1.367/lib/shoes/main.rb:94:in
> `app'
>       from princ_audio.rb:675:in `<main>'
>
>
> I'm not back yet as my MBA just kicked me in the ... well, it'll take a
> couple of more months...
>
> Anyway my kids wanted to play this yesterday and I noticed that it
> broke. I haven't changed the code in anyway. The absolute paths are also
> ok. And the undefined method uri for NilClass is puzzling. I've checked
> the Gst code [2] and I can't seem to find the error. However, I never
> really fully studied the GStreamer:(
>
> [1] https://github.com/sebastjan-hribar/princ/blob/master/princ_audio.rb
> [2] http://ruby-gnome2.sourceforge.jp/hiki.cgi?GLib#GLib.filename_to_uri
>
> I'd really appreciate any help.
>
> regards,
> seba

Re: [shoes] princ - audio version stopped working

From:
ashbb
Date:
2013-09-12 @ 13:48
Hi Seba,

Your error message says "undefined method 'uri=' for nil".
So, I tried the following on my Windows 7.

-----------------
C:\tmp>ruby -v
ruby 1.9.3p385 (2013-02-06) [i386-mingw32]

C:\tmp>gem list gstreamer

*** LOCAL GEMS ***

gstreamer (2.0.2 x86-mingw32)

C:\tmp>irb
irb(main):001:0> require 'gst'
=> true
irb(main):002:0> Gst::ElementFactory.make("playbin2")
=> nil
irb(main):003:0> Gst::ElementFactory.make("playbin")
=> #<#<Class:0x1a71c68>:01D5EC18 ptr=01FD29E8>
-----------------

Umm,... the latest GStreamer doesn't seem to support "playbin2".
I'm not sure that is a bug or spec change, though...

I have no solution for now, sorry. If you have a time, I recommend you to
post this problem into ruby-talk ML.

ashbb

Re: [shoes] princ - audio version stopped working

From:
Sebastjan Hribar
Date:
2013-09-13 @ 13:21
Here is the solution:

https://www.ruby-forum.com/topic/4417049#new

"playbin2" was changed to "playbin"


regards
seba