Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Gosu's Font error
- - By Andrek Date 2016-04-01 01:23
Hi! i can't draw fonts with Windows XP, but i can with Linux Mint 17.3.

Error:
Microsoft Windows XP [VersiĆ³n 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Ruby193>ruby test.rb
test.rb:9: [BUG] Segmentation fault
ruby 1.9.3p551 (2014-11-13) [i386-mingw32]

-- Control frame information -----------------------------------------------
c:0014 p:---- s:0041 b:0041 l:000040 d:000040 CFUNC  :draw
c:0013 p:0021 s:0034 b:0034 l:000033 d:000033 METHOD test.rb:9
c:0012 p:0031 s:0031 b:0031 l:000cbc d:000030 LAMBDA C:/Ruby193/lib/ruby/gems/1.
9.1/gems/gosu-0.10.6-x86-mingw32/lib/gosu/swig_patches.rb:28
c:0011 p:---- s:0027 b:0027 l:000026 d:000026 FINISH
c:0010 p:0011 s:0025 b:0025 l:000024 d:000024 METHOD C:/Ruby193/lib/ruby/gems/1.
9.1/gems/gosu-0.10.6-x86-mingw32/lib/gosu/swig_patches.rb:38
c:0009 p:---- s:0022 b:0022 l:000021 d:000021 FINISH
c:0008 p:---- s:0020 b:0020 l:000019 d:000019 CFUNC  :tick
c:0007 p:0027 s:0017 b:0017 l:000016 d:000016 METHOD C:/Ruby193/lib/ruby/gems/1.
9.1/gems/gosu-0.10.6-x86-mingw32/lib/gosu/patches.rb:135
c:0006 p:---- s:0014 b:0014 l:000013 d:000013 FINISH
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 CFUNC  :show
c:0004 p:0011 s:0009 b:0009 l:000008 d:000008 METHOD C:/Ruby193/lib/ruby/gems/1.
9.1/gems/gosu-0.10.6-x86-mingw32/lib/gosu/swig_patches.rb:45
c:0003 p:0051 s:0006 b:0006 l:00233c d:00107c EVAL   test.rb:12
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:00233c d:00233c TOP

-- Ruby level backtrace information ----------------------------------------
test.rb:12:in <main>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/gosu-0.10.6-x86-mingw32/lib/gosu/swig_patche
s.rb:45:in
show'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/gosu-0.10.6-x86-mingw32/lib/gosu/swig_patche
s.rb:45:in show'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/gosu-0.10.6-x86-mingw32/lib/gosu/patches.rb:
135:in
tick'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/gosu-0.10.6-x86-mingw32/lib/gosu/patches.rb:
135:in tick'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/gosu-0.10.6-x86-mingw32/lib/gosu/swig_patche
s.rb:38:in
protected_draw_2'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/gosu-0.10.6-x86-mingw32/lib/gosu/swig_patche
s.rb:28:in block (2 levels) in <class:Window>'
test.rb:9:in
draw'
test.rb:9:in `draw'

-- C level backtrace information -------------------------------------------
C:\WINDOWS\system32\ntdll.dll(KiFastSystemCallRet+0x0) [0x7c91e514]
C:\WINDOWS\system32\kernel32.dll(WaitForSingleObject+0x12) [0x7c802542]
C:\Ruby193\bin\msvcrt-ruby191.dll(rb_vm_bugreport+0xf9) [0x62e7c9d9]
C:\Ruby193\bin\msvcrt-ruby191.dll(rb_name_err_mesg_new+0x186) [0x62d41436]
C:\Ruby193\bin\msvcrt-ruby191.dll(rb_bug+0x2f) [0x62d4229f]
C:\Ruby193\bin\msvcrt-ruby191.dll(rb_check_safe_str+0x1f0) [0x62e04220]
[0x004011e6]
[0x09527d62]
C:\WINDOWS\system32\kernel32.dll(UnhandledExceptionFilter+0x1c7) [0x7c864771]

-- Other runtime information -----------------------------------------------

* Loaded script: test.rb

* Loaded features:

    0 enumerator.so
    1 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/encdb.so
    2 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/iso_8859_1.so
    3 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/trans/transdb.so
    4 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb
    5 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/rbconfig.rb
    6 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb
    7 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/exceptions.rb
    8 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/defaults/operating_system.rb
    9 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb
   10 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb
   11 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/version.rb
   12 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb
   13 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb
   14 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb
   15 C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/path_support.rb
   16 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/utf_16le.so
   17 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/trans/utf_16_32.so
   18 C:/Ruby193/lib/ruby/1.9.1/i386-mingw32/enc/trans/single_byte.so
   19 C:/Ruby193/lib/ruby/gems/1.9.1/gems/gosu-0.10.6-x86-mingw32/lib/1.9/gosu.s
o
   20 C:/Ruby193/lib/ruby/gems/1.9.1/gems/gosu-0.10.6-x86-mingw32/lib/gosu/swig_
patches.rb
   21 C:/Ruby193/lib/ruby/gems/1.9.1/gems/gosu-0.10.6-x86-mingw32/lib/gosu/patch
es.rb
   22 C:/Ruby193/lib/ruby/gems/1.9.1/gems/gosu-0.10.6-x86-mingw32/lib/gosu.rb

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

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

C:\Ruby193>


Code:
require "gosu"

class Game_Window < Gosu::Window
  def initialize
    super(640, 480)
    @font = Gosu::Font.new(self, "Arial", 18)
  end
  def draw
    @font.draw("Text", 0, 0, 0) # Error
  end
end
Game_Window.new.show


Please help me!
Parent - - By jlnr (dev) Date 2016-04-01 22:57
Can you please retry with Gosu 0.9.2 and see if it works? The only difference is that you'll have to explicitly call super(640, 480, false) in initialize. I wonder if it has to do with the new compiler I'm using for Gosu 0.10.x.

I have noticed that some builds of Ruby itself are not compatible with Windows XP anymore. I don't think Ruby 1.9.3 should be affected, though.
Parent - - By Andrek Date 2016-04-03 20:35
Ok! but how i can install gosu 0.9.2? thanks you for your reply!
Parent - - By jlnr (dev) Date 2016-04-04 08:55
The easiest way is to use "gem uninstall gosu" to uninstall your current version, then "gem install gosu -v 0.9.2" to install the old version instead. To reinstall the latest version, you can simply run "gem update gosu" later.
Parent - By Andrek Date 2016-04-04 10:25
Thanks you it's work!!!
Up Topic Gosu / Gosu Exchange / Gosu's Font error

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill