Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Gosu Sample on Windows
- - By semaperepelitsa Date 2011-12-22 13:14
When I add sounds to a game on Windows Ruby crashes:

require 'gosu'

class MyWindow < Gosu::Window
  def initialize
    super 640, 480, false
    self.caption = 'Hello World!'
    @beep = Gosu::Sample.new(self, "media/test.wav") # this causes crash
  end
end

window = MyWindow.new
window.show


Here is an information about crash:

Problem signature:
  Problem Event Name:  APPCRASH
  Application Name:  ruby.exe
  Application Version:  1.9.3.0
  Application Timestamp:  4eade9b7
  Fault Module Name:  KERNELBASE.dll
  Fault Module Version:  6.1.7600.16850
  Fault Module Timestamp:  4e211485
  Exception Code:  c06d007e
  Exception Offset:  0000b9bc
  OS Version:  6.1.7600.2.0.0.272.7
  Locale ID:  1049
  Additional Information 1:  0a9e
  Additional Information 2:  0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:  0a9e
  Additional Information 4:  0a9e372d3b4ad19135b953a78882e789


Any suggestions? Thanks.
Parent - - By semaperepelitsa Date 2011-12-22 13:15
BTW, this works on OS X.
Parent - - By jlnr (dev) Date 2011-12-22 15:50
Does the program crash on exit or when you start it?
Parent - - By semaperepelitsa Date 2011-12-22 17:15
Right after I start it, before the window appears.
Parent - - By jlnr (dev) Date 2011-12-22 17:18
The WAV file may have a weird encoding internally, can you try the Beep file that comes with the Gosu Tutorial or re-export your file from Audacity (or sndrec32)?

Of course, an invalid file format shouldn't cause such a weird error message.

Oh, another possibility. Can it maybe not find libsndfile.dll?
Parent - - By semaperepelitsa Date 2011-12-22 18:24
Tried with Beep from examples, no luck. Actually, if I enter any filename that don't exist I get the same crash. There is a libsndfile.dll at C:\Ruby193\lib\ruby\gems\1.9.1\gems\gosu-0.7.41-x86-mingw32\lib
Parent - - By jlnr (dev) Date 2011-12-22 23:49
Hmm, I have not tried Gosu with 1.9.3 on Windows. Maybe I should do that first...
Parent - - By lol_o2 Date 2011-12-23 08:04
I've tried. Works, but lags more than 1.9.2
Parent - By jlnr (dev) Date 2011-12-23 23:28
Oh, that is interesting :O Do you know if the lag comes from GC changes? I've heard you can tune it now, maybe the default settings are just very weird? :)
Parent - - By semaperepelitsa Date 2011-12-23 09:47
I've replaced it with 1.9.2 and got the same crash.
Parent - - By jlnr (dev) Date 2011-12-23 23:31
Can you please uninstall Gosu 0.7.41 and retry with 0.7.33? It was the last version before I started using OpenAL. That way I can confirm it's an OpenAL/libsndfile error.
Parent - By semaperepelitsa Date 2011-12-24 12:15
Yes, 0.7.33 works well.
Parent - By semaperepelitsa Date 2011-12-22 17:18
The OS is Windows Server 2008 R2, maybe that's the problem.
Parent - By jlnr (dev) Date 2012-01-09 06:25
This is a bit late, but can you attach the sound file you used for completeness' sake? I am just catching up with all the bug reports now.
Up Topic Gosu / Gosu Exchange / Gosu Sample on Windows

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill