ashbb / green_shoes

Green Shoes is one of the colorful Shoes written in pure Ruby.
Other
204 stars 37 forks source link

Pango font_cache assert when doing parallel downloads #70

Open AllegroGavin opened 11 years ago

AllegroGavin commented 11 years ago

The following simple example works fine in original Shoes, but fails in green_shoes (Environment is Vista 64-bit, RailsInstaller, gem install green_shoes)

require 'green_shoes'

sites = %w(google amazon yahoo msn)

Shoes.app do
  stack do
    @status = {}
    sites.each do |site|
      @status[site] = para("Retrieving site #{site}...")
      download "http://www.#{site}.com" do |page|
        @status[site].text = "Ok, #{site} homepage is #{page.length} bytes long."
      end
    end
  end
end

Typically after displaying the result for the second site, it bombs with:

(eval): line 1 Pango-CRITICAL _:pango_win32_font_map_get_font_cache: assertion `font_map != NULL' failed _ Pango:ERROR:pangowin32.c:831:pango_win32_font_finalize: assertion failed: (win32font->fontmap != NULL)

This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

So something is not compatible/safe with whatever sort of threading download invokes I think.

G.

ashbb commented 11 years ago

@AllegroGavin Thanks for the post. But, umm... It works for me. I can't get the error on my Windows 7 32-bit. Sorry, I'm not sure this issue is dependent on Vista or 64-bit pc or other reason.