-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Green Shoes fails Mac #59
Comments
Hi facetoe, Thank you for trying Green Shoes. I looked at both http://pastie.org/3230151 and http://pastie.org/3234189 But sorry, I don't have a Mac, so I can't recreate your problem. :( The error occured in # test1 require 'green_shoes' Shoes.app{} # test2 require 'green_shoes' Shoes.app{oval 100, 100, 100} If the above two works well, it may be Pango's problem on Mac. ashbb |
Hey asshbb, thanks for the quick response. I tried both your tests and the first one works fine. It throws up an empty X11 window. When I tried the second test immediately after, it did nothing. I tried again and it opens a greyed out window that I can't close. When I quit X11 and tried it again, it throws this error "irb: Fatal IO error 0 (Undefined error: 0) on X server /tmp/launch-n7PKmh/org.x:0." and drops out of irb. I then started up irb again, required green_shoes and tried the second test. It threw up a X11 window with the oval as expected. I hope that helps! ----- Original Message ----- Hi facetoe, Thank you for trying Green Shoes. I looked at both http://pastie.org/3230151 and http://pastie.org/3234189 But sorry, I don't have a Mac, so I can't recreate your problem. :( The error occured in # test1 require 'green_shoes' Shoes.app{} # test2 require 'green_shoes' Shoes.app{oval 100, 100, 100} If the above two works well, it may be Pango's problem on Mac. ashbb Reply to this email directly or view it on GitHub: |
Umm,... maybe IRB could be the problem. Could you try to save a snippet to a local file (e.g. test.rb) and execute ( |
And, try to the following snippet. require 'cairo' require 'pango' require 'gtk2' win = Gtk::Window.new win.set_default_size 300, 300 canvas = Gtk::Layout.new surface = Cairo::ImageSurface.new Cairo::FORMAT_ARGB32, 300, 300 context = Cairo::Context.new surface layout = context.create_pango_layout layout.text = 'hello world' context.show_pango_layout layout context.show_page surface.write_to_png 'temp.png' img = Gtk::Image.new 'temp.png' canvas.put img, 50, 50 win.add canvas win.show_all Gtk.main If it doesn't work well (doesn't display |
Ok I executed the first two tests from a .rb file and they worked fine. The second test displayed the oval without having to restart X11. When I tried the big snippet from your last email, I got this error: Fragmachines-MacBook:bin fragmachine$ ruby test.rb -- Control frame information ----------------------------------------------- -- Ruby level backtrace information ---------------------------------------- -- C level backtrace information ------------------------------------------- See Crash Report log file under ~/Library/Logs/CrashReporter or -- Other runtime information -----------------------------------------------
[NOTE] Abort trap: 6 ----- Original Message ----- And, try to the following snippet. require 'cairo' require 'pango' require 'gtk2' win = Gtk::Window.new win.set_default_size 300, 300 canvas = Gtk::Layout.new surface = Cairo::ImageSurface.new Cairo::FORMAT_ARGB32, 300, 300 context = Cairo::Context.new surface layout = context.create_pango_layout layout.text = 'hello world' context.show_pango_layout layout context.show_page surface.write_to_png 'temp.png' img = Gtk::Image.new 'temp.png' canvas.put img, 50, 50 win.add canvas win.show_all Gtk.main If it doesn't work well (doesn't display Reply to this email directly or view it on GitHub: |
Oh, bingo! I'm going to post this issue to ruby-list ML (Japanese ML), so please wait for a few days. |
OH, wait! Before I post a mail to ruby-list ML, could you try to update some gems? The gtk2-0.90.5 and cairo-1.10.0 are old. The latest vesion is 1.1.2. |
Ok, I updated the gems, and ran the same tests as before, but I still ran into problems: Fragmachines-MacBook:bin fragmachine$ gem install cairo ***------ I tried the first snippet, no problem: Fragmachines-MacBook:bin fragmachine$ ruby test.rb ***------ I tried the second snippet, no problem: Fragmachines-MacBook:bin fragmachine$ ruby test.rb ***------ I tried the detailed snippet and problem: test.rb:12: [BUG] Segmentation fault -- Control frame information ----------------------------------------------- -- Ruby level backtrace information ---------------------------------------- -- C level backtrace information ------------------------------------------- See Crash Report log file under ~/Library/Logs/CrashReporter or -- Other runtime information -----------------------------------------------
[NOTE] Abort trap: 6 ----- Original Message ----- OH, wait! Before I post a mail to ruby-list ML, could you try to update some gems? The gtk2-0.90.5 and cairo-1.10.0 are old. The latest vesion is 1.1.2. Reply to this email directly or view it on GitHub: |
Oh, sorry. Thank you for taking the time... BTW, I posted about this issue to Shoes ML (librelist.com) and got an answer. But I'm not sure this will be for your solution... |
I reinstalled 1.9.2, with no success! I still get the same error. Hopefully someone can figure it out... ----- Original Message -----
Oh, sorry. Thank you for taking the time... BTW, I posted about this issue to Shoes ML (librelist.com) and got an answer. But I'm not sure this will be for your solution... Reply to this email directly or view it on GitHub: |
Hi facetoe, I posted a mail to ruby-list ML (Japanese ML) and got an advice.
So, I posted this: http://lists.freedesktop.org/archives/pixman/2012-January/001661.html Hope someone will answer, |
Thanks ashbb, hopefully someone can help! ----- Original Message ----- Hi facetoe, I posted a mail to ruby-list ML (Japanese ML) and got an advice.
So, I posted this: http://lists.freedesktop.org/archives/pixman/2012-January/001661.html Hope someone will answer, Reply to this email directly or view it on GitHub: |
I had exactly the same problem with an rvm installed Ruby 1.9.3 on my mac. It turns out that it was installed with clang rather than gcc 4.2.2. I switched to using the homebrew installation of gcc, reinstalled 1.9.3 and the segfault in show_pango_layout disappeared. Hope this helps. |
Hello, I just tried installing green_shoes using the instructions on the github site. I managed to install all the dependencies and everything with homebrew, then the green_shoes gem, but whenever I try and run something simple like:
Shoes.app do
para 'Hello World'
end
I get this massive error - http://pastie.org/3230151
Has anyone had this problem or have any ideas what I could do?
I'm using a Macbook with Lion, Xcode 4.1 and ruby 1.9.2 with rvm.
Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: