Other little bugs for rbbr

G

gabriele renzi

Hi gurus and nubys,

I know I should post it to the sourceforge bug system, but I'm running
away ATM, so I send them here quickly.

BTW, I'd like to thank Masao Mutoh (and the whole ruby-gnome2) project
for the quick answer, fix and the great libraries :)

These are some possible problem found in rbbr 0.5:


problem 1:

If you load a file with "Load Script" and set $SAFE to 4 in it, you'll
get this error:

C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/metainfo.rb:243:in
`each_object': Insecure operation `each_object' at level 4
(SecurityError)
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/metainfo.rb:243:in
`full_module_dag'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/moduleindex.rb:80:in
`build_tree'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/moduleindex.rb:38:in
`update'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/browser.rb:40:in
`create_menubar'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/browser.rb:30:in
`call'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk.rb:54:in
`main'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk.rb:54:in
`main'
from c:/programmi/ruby-1.8/ruby/bin/rbbr.rb:22



somehow SecurityErrors should be locked. Everything works fine with
$SAFE=1,2,3 and if you use "require library" to load the file


problem 2:

You can crash rbbr if you cause a TypeError within a script and load
it via "load script"

E:\tmp.rb:2:in `sub!': can't modify frozen string (TypeError)
from E:\tmp.rb:2
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/browser.rb:39:in
`load'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/browser.rb:39:in
`create_menubar'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/browser.rb:30:in
`call'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk.rb:54:in
`main'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk.rb:54:in
`main'
from c:/programmi/ruby-1.8/ruby/bin/rbbr.rb:22


the input in this case was
'y'.freeze.sub!(/y/ ,'c')



problem 3:


"require library" goes boom with a NameError

C:/Programmi/ruby-1.8/ruby/lib/ruby/1.8/tmp.rb:1: undefined local
variable or method `crash' for #<Object:0x27892d0> (NameError)
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/confmanager.rb:119:in
`require'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/confmanager.rb:119:in
`require_libs'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/confmanager.rb:116:in
`each'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/confmanager.rb:116:in
`require_libs'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/confmanager.rb:97:in
`add_libs'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/confmanager.rb:94:in
`each'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/confmanager.rb:94:in
`add_libs'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/libselectiondialog.rb:83:in
`initialize'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/browser.rb:27:in
`new'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/browser.rb:27:in
`create_menubar'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk/browser.rb:26:in
`call'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk.rb:54:in
`main'
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/rbbr/ui/gtk.rb:54:in
`main'
from c:/programmi/ruby-1.8/ruby/bin/rbbr.rb:22

input:
crash


problem 4:
dunno how this could be fixed, but if you change the content of an
already required library, you'll fall in the ugly situation that you
can't load rbbr anymore, cause it crashes in the start up. And I don't
know if there could be a simple "Can't load #{lib}" dialog in this
case, cause I don't know if rbbr and Gtk are already uvailable in that
moment.



possible problem:

file selection dialog disappear silently on most (I suppose)erros, but
this seem like a Gtk specific annoyance.
For example if you pass names like "/" or "A:" or "^" or a non
existing directory, it just disappears, with no error message.

At least maybe we could have some dialog box for the "Loading Ok"
case? :)


btw, my confgiuartion:
WinXP pro
ruby 1.8.0 (2003-08-04) [i386-mswin32]
Gtk 2.2.4 from dropline
ruby-gtk2 0.8
rbbr 0.5


On a sidenote, what are the sugested packages for this? I'm helping
with the italian version of ruby-gnome2.sf.jp wiki, and I suppose we
should change a littl the installa guides, at least the one about
windows, to latest packages (it seem oudated even in the english and
japanese version of the wiki)

thanks in advance :)
 
M

Masao Mutoh

Hi,

Hi gurus and nubys,

I know I should post it to the sourceforge bug system, but I'm running
away ATM, so I send them here quickly.

Why don't you join Ruby-GNOME2 ML?
http://sourceforge.net/mail/?group_id=53614
BTW, I'd like to thank Masao Mutoh (and the whole ruby-gnome2) project
for the quick answer, fix and the great libraries :)

You're welcome ;).
These are some possible problem found in rbbr 0.5:


problem 1:

If you load a file with "Load Script" and set $SAFE to 4 in it, you'll
get this error:
somehow SecurityErrors should be locked. Everything works fine with
$SAFE=1,2,3 and if you use "require library" to load the file

This is one of the rbbr's restrictions.
Both of "Load Script" and "require library" have this kind of problems.
problem 2:

You can crash rbbr if you cause a TypeError within a script and load
it via "load script"
the input in this case was
'y'.freeze.sub!(/y/ ,'c')

This is also a restriction.
But in this case, it's a bug. isn't it?
problem 3:


"require library" goes boom with a NameError

C:/Programmi/ruby-1.8/ruby/lib/ruby/1.8/tmp.rb:1: undefined local
variable or method `crash' for #<Object:0x27892d0> (NameError)

Ditto.

problem 4:
dunno how this could be fixed, but if you change the content of an
already required library, you'll fall in the ugly situation that you
can't load rbbr anymore, cause it crashes in the start up. And I don't
know if there could be a simple "Can't load #{lib}" dialog in this
case, cause I don't know if rbbr and Gtk are already uvailable in that
moment.

If "reading libraries process" is separated from main rbbr process,
It may be solved. But I don't think to make rbbr complex.
Because rbbr is a sample application of Ruby/GTK2.
possible problem:

file selection dialog disappear silently on most (I suppose)erros, but
this seem like a Gtk specific annoyance.
For example if you pass names like "/" or "A:" or "^" or a non
existing directory, it just disappears, with no error message.

At least maybe we could have some dialog box for the "Loading Ok"
case? :)

OK. I'll apply it in the near future.
btw, my confgiuartion:
WinXP pro
ruby 1.8.0 (2003-08-04) [i386-mswin32]
Gtk 2.2.4 from dropline
ruby-gtk2 0.8
rbbr 0.5
On a sidenote, what are the sugested packages for this? I'm helping
with the italian version of ruby-gnome2.sf.jp wiki, and I suppose we
should change a littl the installa guides, at least the one about
windows, to latest packages (it seem oudated even in the english and
japanese version of the wiki)

Your configuration is now newest on MS Windows.
And I updated english/japanese installation guide.

If you help us, join our ML first, please.
You need to get an account for editting the site.
 
G

gabriele renzi

Hi,



Why don't you join Ruby-GNOME2 ML?
http://sourceforge.net/mail/?group_id=53614

cause I'm just a casual user :) btw, I'll join it when I found
something else to say, thanks for the suggestion



If "reading libraries process" is separated from main rbbr process,
It may be solved. But I don't think to make rbbr complex.
Because rbbr is a sample application of Ruby/GTK2.

I see, and I agree



If you help us, join our ML first, please.
You need to get an account for editting the site.

I've been helping a guy at our ruby user group that has access, till
now, but it's time to join the ML :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top