richkilmer / hotcocoa

MacRuby HotCocoa UI library
166 stars 16 forks source link

RuntimeError using hotcoca 0.5.1 and MacRuby 0.6 #9

Open fasta opened 14 years ago

fasta commented 14 years ago

When following the 'Getting Started' Tutorial the auto-generated application fails to start, whereby displaying the following message:

2010-06-20 15:13:27.246 Postie[1668:607] +[NSATSGlyphGenerator initialize] invocation.  The class is deprecated.
2010-06-20 15:13:29.396 Postie[1668:607] *** Assertion failure in -[LayoutView initWithFrame:], /SourceCache/AppKit/AppKit-1038.32/AppKit.subproj/NSView.m:1289

Unfortunately I did not find a solution, only a Gist with the same problem (http://gist.github.com/292411). I tried running the application.rb via macruby and so received a bit more information:

2010-06-20 15:25:55.958 macruby[1777:903] +[NSATSGlyphGenerator initialize] invocation.  The class is deprecated.
2010-06-20 15:25:58.040 macruby[1777:903] *** Assertion failure in -[LayoutView initWithFrame:], /SourceCache/AppKit/AppKit-1038.32/AppKit.subproj/NSView.m:1289
/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/hotcocoa-0.5.1/lib/hotcocoa/layout_view.rb:227:in `initWithFrame:': NSInternalInconsistencyException: Frame containing non-finite values {{0, 0}, {nan, nan}} passed to [LayoutView initWithFrame:] (RuntimeError)
from /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/hotcocoa-0.5.1/lib/hotcocoa/mappings/window.rb:37:in `init_with_options:'
from /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/hotcocoa-0.5.1/lib/hotcocoa/mapper.rb:43:in `block'
from /private/tmp/Postie/lib/application.rb:12:in `block'
from /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/hotcocoa-0.5.1/lib/hotcocoa/mappings/application.rb:8:in `handle_block:'
from /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/hotcocoa-0.5.1/lib/hotcocoa/mapper.rb:43:in `block'
from /private/tmp/Postie/lib/application.rb:11:in `start'
from /private/tmp/Postie/lib/application.rb:1:in `<main>'

Has somebody else seen this problem already and knows a solution? Or is it a bad combination of MacRuby 0.6 and hotcocoa 0.5.1 that's causing this?

Thanks for your help

ghost commented 14 years ago

I get exactly the same problem, does anyone know of a solution/workaround ?

ghost commented 14 years ago

I suspect its a '32-bit' problem. All is fine on a recent iMac but gives the above on an early Macbook Pro.