Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Segfault and Sample
- - By Rez Date 2011-07-03 16:35
I've been playing with gosu for a quite long time, but since changing audio library in gosu I've encountered problem with segfaults.
It seems that it occurs while three or more samples are being played at the same moment. The bug doesn't depend on sample file or command line, it's completely random (playing a lot of sounds in the same time increases chance to get the bug, but even with few it still happens).
Here's one of my logs:

>ruby TheThing.rb


Scripts/Player.rb:2097: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]
-- control frame ----------
c:0012 p:---- s:0091 b:0091 l:000090 d:000090 CFUNC  :play
c:0011 p:3712 s:0087 b:0087 l:000086 d:000086 METHOD Scripts/Player.rb:2097
c:0010 p:1983 s:0059 b:0059 l:000058 d:000058 METHOD Scripts/Items.rb:432
c:0009 p:0074 s:0041 b:0041 l:000040 d:000040 METHOD Scripts/Player.rb:928
c:0008 p:0560 s:0038 b:0038 l:000037 d:000037 METHOD Scripts/Scenes.rb:170
c:0007 p:0022 s:0032 b:0032 l:000031 d:000031 METHOD TheThing.rb:343
c:0006 p:0011 s:0029 b:0029 l:000028 d:000028 METHOD C:/Ruby192/lib/ruby/gems/1.9.1/gems/gosu-0.7.31-x86-mingw32/lib/gosu/swig_patches.rb:10
c:0005 p:---- s:0025 b:0025 l:000024 d:000024 FINISH
c:0004 p:---- s:0023 b:0023 l:000022 d:000022 CFUNC  :show
c:0003 p:1805 s:0020 b:0020 l:000984 d:00224c EVAL   TheThing.rb:411
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000984 d:000984 TOP  
---------------------------
-- Ruby level backtrace information ----------------------------------------
TheThing.rb:411:in <main>'
TheThing.rb:411:in
show'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/gosu-0.7.31-x86-mingw32/lib/gosu/swig_patches.rb:10:in update_'
TheThing.rb:343:in
update'
Scripts/Scenes.rb:170:in update'
Scripts/Player.rb:928:in
A_use'
Scripts/Items.rb:432:in use'
Scripts/Player.rb:2097:in
shot'
Scripts/Player.rb:2097:in `play'
[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.

>Exit code: 3


I'm using ruby 1.9.2 (I've also seen the bug on 1.9.1) with gosu 0.7.31 (and with the newest one the problem is still present) on Windows XP 32bit.
Am I really the only one with this problem?
Sorry for my English ;d
Parent - - By jlnr (dev) Date 2011-07-03 18:34
I have had spurious bug reports in IRC, but nobody was ever sure if it was really a bug in Gosu, Ruby or if it had to do with their own code. It seems it's true, which leaves me with the same old question, which audio library to use for Windows? I think I'll just go with SDL_mixer, even though it is missing features I like :(
Parent - - By RavensKrag Date 2011-07-07 00:09
Will that result in Gosu having fewer features in regards to sound? Or will there be "special" features which only work on non-Windows platforms?
Parent - By jlnr (dev) Date 2011-07-07 08:10
libsndfile was suggested on IRC in the meantime.

Windows and Linux are both likely to move to OpenAL (just like Mac and iOS) and then use libsndfile for sound loading. That would mean, all the features for Linux (finally) and Windows, no crashes on WIndows, and only one(!!) audio backend.
Up Topic Gosu / Gosu Exchange / Segfault and Sample

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill