Open mingwya opened 3 weeks ago
Did you use a specific soloud audio backend?
Wonder as I am using the same flags without issues here (albeit I wrapped everything in custom classes - code from a time before soloud landed in NG).
Can you check where it crashes exactly? (build with GDB information and run within "gdb -r yourapp")
im use -> Import Audio.AudioMiniAudio
Maybe it's because of the platform I'm using (win32)?
There are two files in the archive - ogg and code that reproduces the crash in debug mode (everything works in release mode). bug.zip
Ok. I haven't debugged like that for a long time... I'll try to remember...
0x0000000000802e3a in bbThreadGetData (index=2) at /home/ronny/Arbeit/Tools/BlitzMaxNG/mod/brl.mod/blitz.mod/blitz_thread.c:83
83 BBObject * data = bbThreadGetCurrent()->data[index]
There it fails for me.
Import Audio.AudioMiniAudio
Local sound:TSound=LoadSound( "ambient_0.ogg",SOUND_LOOP|SOUND_STREAM )
Print "sound loaded"
Local ch:TChannel=PlaySound( sound )
Print "play sound"
Local last:Int = MilliSecs()
Local s:Int = 0
Repeat
Print "loop"
If MilliSecs() > last + 1000
last = MilliSecs()
s :+ 1
Print 1
EndIf
Delay(10)
Until s > 100
Print "end"
I see 2 loops printed in the debug build until it segfaults. As the crashing behaviour already cries out: this is most probably an error happening in "C-Land" (so in the generated C code, in wrapped library C-Code, ...)
Might be something directly in "soloud.mod/soloud/src/backend/miniaudio".
I get a pop-up window "EXCEPTION_ACCESS_VIOLATION" but the program continues to run - "loop" is printed all the time without stopping, after pressing the ok button - the operating system offers to terminate the program abnormally.
You are on windows right? Maybe on your computer Os the main thread is not stopped in such a problematic situation.
If you enable gdb debug builds and recompile brl.mod and audio.mod (so it contains gdb information too) then execute gdb (it is in the mingw bin folder) and once you see the crash you might enter "bt" for a backtrace. Dunno if it halts at all ...if your main thread is still "looping".
Selecting the soloudaudio backend instead might solve your issues for now (while the miniaudio one is still..apparent).
Yes. 32 bit Windows 8.1.
As far as I remember... -> "bmk makemods -a -gdb brl" ?
I can't figure out how to rebuild modules in GDB mode...
if you enter "bt" after the crash <gdb> bt
then it will show you the backtrace "how it reached there".
I failed to compile BRL and Audio modules in GDB mode. But there is some information...
`If FileType( "stream/ambient_"+ambient+".ogg" )=FILETYPE_FILE
End If`
In release mode works fine.