Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / [linux] passing window as an argument >> SEGMENTATION FAULT
- By bestguigui Date 2009-04-16 09:28
Hello !

I don't understand. Under Windows, I'm able to pass my Window (which is an object of a child class of Gosu::Window) as an argument, but under Linux it causes a SEGMENTATION BUG. It's very bad because I'm not able to make any kind of external Sprite class, or something like that, where I need a reference to my window in others classes.

It's strange, because when I only ask Ruby to put my window object (directly with self, or with the passed value on external objects), it returns the same value, like #<Window:0x276cb34>, as the reference was succefully passed as an argument. I insist in the fact that I have only this problem when I try to make this on Linux (Xubuntu), but it works perfectly under Windows xp... Do you have an idea ?

Thanks a lot
- By jlnr (dev) Date 2009-04-16 13:59
A similar error occurs when you build Gosu against Ruby 1.9 but try to 'require' it from Ruby 1.8 or vice versa. Are there multiple versions of Ruby installed on your Linux system? Does it work if you uninstall and reinstall the 'gosu' gem?
- By bestguigui Date 2009-04-17 09:11
root@bestguigui-desktop:/home/bestguigui# ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
=> ONLY ONE RUBY VERSION

root@bestguigui-desktop:/home/bestguigui# gem uninstall gosu
Successfully uninstalled gosu-0.7.12
root@bestguigui-desktop:/home/bestguigui# gem install gosu
Building native extensions.  This could take a while...
Successfully installed gosu-0.7.12
1 gem installed
=> GOSU GEM UNINSTALL AND REINSTALL

I copied/pasted this to show what I've done if that helps someone, because IT WORKS !!!!!
Thanks a lot Julian :)
- By bestguigui Date 2009-04-19 09:53
And the problem is back, now that I've installed Gosu 0-7-13 gem on my Linux Xubuntu, even if I uninstall/reinstall the gem :(
- By jlnr (dev) Date 2009-05-19 23:52
You can give this gem a try: http://www.raschke.de/julian/temp/gosu-0.7.13.4.gem

Seems I have finally fixed 1.9 support on Linux :)
Up Topic Gosu / Gosu Exchange / [linux] passing window as an argument >> SEGMENTATION FAULT

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill