Forums Archived

The forums are being archived. See this topic for more information.

Problems with gem install on MacOSX

Get help and support with Rubygame

Problems with gem install on MacOSX

Postby hyperlogic » Thu May 21, 2009 5:58 pm

Hey, I'm not having any luck getting rubygame-2.5.2 working on MacOSX (10.5.6). After using macports to install all the SDL components and doing a gem install, "gem install rubygame", I'm unable to run any of the included samples.

For example running "ruby -rubygems demo_draw.rb" results in a crash (console output below)
Oddly, however, the demo_music.rb file actually plays audio when run, but no window appears.


Code: Select all
2009-05-21 10:46:33.088 ruby[20987:10b] *** _NSAutoreleaseNoPool(): Object 0x4ebb60 of class NSCFNumber autoreleased with no pool in place - just leaking
Stack: (0x96bdf73f 0x96aebe32 0x95334379 0x960558b8 0x96054239 0x960646d6 0x953907c3 0x9538e9c9 0x9538e70e 0x9538e0bd 0x9538dbfc 0x9538bbf8 0x654676 0x64b30b 0x61e870 0x61e8a7 0x1ece89 0x10d7ff 0x10e44c 0x10bf4e 0x1186f9 0x11a9ca)
2009-05-21 10:46:33.089 ruby[20987:10b] *** _NSAutoreleaseNoPool(): Object 0x4ebfe0 of class NSCFNumber autoreleased with no pool in place - just leaking
Stack: (0x96bdf73f 0x96aebe32 0x953343b1 0x960558b8 0x96054239 0x960646d6 0x953907c3 0x9538e9c9 0x9538e70e 0x9538e0bd 0x9538dbfc 0x9538bbf8 0x654676 0x64b30b 0x61e870 0x61e8a7 0x1ece89 0x10d7ff 0x10e44c 0x10bf4e 0x1186f9 0x11a9ca)
2009-05-21 10:46:33.090 ruby[20987:10b] *** _NSAutoreleaseNoPool(): Object 0x4ec6c0 of class NSCFNumber autoreleased with no pool in place - just leaking
Stack: (0x96bdf73f 0x96aebe32 0x953343eb 0x960558b8 0x96054239 0x960646d6 0x953907c3 0x9538e9c9 0x9538e70e 0x9538e0bd 0x9538dbfc 0x9538bbf8 0x654676 0x64b30b 0x61e870 0x61e8a7 0x1ece89 0x10d7ff 0x10e44c 0x10bf4e 0x1186f9 0x11a9ca)
2009-05-21 10:46:33.091 ruby[20987:10b] *** _NSAutoreleaseNoPool(): Object 0x4ec2f0 of class NSCFDictionary autoreleased with no pool in place - just leaking
Stack: (0x96bdf73f 0x96aebe32 0x9533444e 0x960558b8 0x96054239 0x960646d6 0x953907c3 0x9538e9c9 0x9538e70e 0x9538e0bd 0x9538dbfc 0x9538bbf8 0x654676 0x64b30b 0x61e870 0x61e8a7 0x1ece89 0x10d7ff 0x10e44c 0x10bf4e 0x1186f9 0x11a9ca)
2009-05-21 10:46:33.116 ruby[20987:10b] *** _NSAutoreleaseNoPool(): Object 0xa01eefb0 of class NSCFString autoreleased with no pool in place - just leaking

.. cut .. There are tons of these "just leaking" messages, then finally:

Code: Select all
2009-05-21 10:46:34.310 ruby[20987:10b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1002) creating CGSWindow'
2009-05-21 10:46:34.311 ruby[20987:10b] Stack: (
    2438934795,
    2516946491,
    2438934251,
    2438934314,
    2504177040,
    2504171891,
    2503236641,
    2503233755,
    2503232150,
    6649119,
    6638732,
    6600270,
    2043466,
    1053941,
    1103871,
    1107020,
    1097550,
    1097786,
    1148665,
    1157578
)
Trace/BPT trap


Here's a gdb stack trace:

Code: Select all
Program received signal SIGTRAP, Trace/breakpoint trap.
0x915f2fb4 in ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ ()
(gdb) bt
#0  0x915f2fb4 in ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ ()
#1  0x96058e3b in objc_exception_throw ()
#2  0x9542a1ad in -[NSWindow _commonAwake] ()
#3  0x95345c21 in -[NSWindow _commonInitFrame:styleMask:backing:defer:] ()
#4  0x953450db in -[NSWindow _initContent:styleMask:backing:defer:contentView:] ()
#5  0x95344a96 in -[NSWindow initWithContentRect:styleMask:backing:defer:] ()
#6  0x0065751f in -[SDL_QuartzWindow initWithContentRect:styleMask:backing:defer:] ()
#7  0x00654c8c in QZ_SetVideoMode ()
#8  0x0064b64e in SDL_SetVideoMode ()
#9  0x001f2e4a in rbgm_screen_new ()
#10 0x001014f5 in call_cfunc ()
#11 0x0010d7ff in rb_call0 ()
#12 0x0010e44c in rb_call ()
#13 0x0010bf4e in rb_eval ()
#14 0x0010c03a in rb_eval ()
#15 0x001186f9 in ruby_exec ()
#16 0x0011a9ca in ruby_run ()
#17 0x00001ffd in main ()
(gdb)
hyperlogic
 
Posts: 2
Joined: Thu May 21, 2009 5:37 pm

Re: Problems with gem install on MacOSX

Postby shawn42 » Thu May 21, 2009 11:17 pm

Ruby and SDL do not play nicely on OS X by default. You want to install rsdl:

http://www.kumaryu.net/?c=plugin;plugin=attach_download;p=%28Ruby%29+Ruby%2FSDL%CD%D1ruby;file_name=rsdl.tar.gz

Code: Select all
tar xzf rsdl.tar.gz
cd rsdl
make
sudo cp rsdl /usr/local/bin/


now you should run your app using rsdl my_app.rb instead of ruby my_app.rb

Hope this helps.
User avatar
shawn42
 
Posts: 109
Joined: Tue Feb 10, 2009 8:22 pm

Re: Problems with gem install on MacOSX

Postby hyperlogic » Fri May 22, 2009 12:14 am

Ahh, yes that works. I did have to additionally install the ruby-opengl gem as well. All seems good now.

Thanks for the quick update,
Cheers,
hyperlogic
 
Posts: 2
Joined: Thu May 21, 2009 5:37 pm


Return to Help & Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron