SFML community forums

Help => Audio => Topic started by: tinyBigGAMES LLC on October 13, 2021, 06:00:09 am

Title: Using sfMusic_createFromStream will cause sfMusic_destroy to crash
Post by: tinyBigGAMES LLC on October 13, 2021, 06:00:09 am
Hi,

I'm using CSFML audio and I got it working with Physfs. It loads and plays the music stream just from from within a zip archive. Everything seems to work fine, but when it will fault when I call sfMusic_destroy.

So I then tested with sfMusic_createFromFile, there is no crash. So what could be going on with sfMusic_createFromStream that would cause the crash?

Windows 11 Pro, 64 bit executable, Delphi 11
Title: Re: Using sfMusic_createFromStream will cause sfMusic_destroy to crash
Post by: eXpl0it3r on October 13, 2021, 08:25:22 am
What version of CSFML are you on?
There have been some fixes not too long ago around sfMusic and streams: https://github.com/SFML/CSFML/pull/163
Title: Re: Using sfMusic_createFromStream will cause sfMusic_destroy to crash
Post by: tinyBigGAMES LLC on October 13, 2021, 08:39:53 am
I'm using CSFML 2.5.1 binaries
Title: Re: Using sfMusic_createFromStream will cause sfMusic_destroy to crash
Post by: tinyBigGAMES LLC on October 13, 2021, 08:48:42 am
Yea, I think that fix is there. I don't even know how to build csfml
Title: Re: Using sfMusic_createFromStream will cause sfMusic_destroy to crash
Post by: tinyBigGAMES LLC on October 13, 2021, 10:33:32 am
I've been trying to build csfml for a few hours now. It's so complicated, sheez. I'm stuck on the SFMLConfig.cmake issue. The SFMLConfig.cmake.in file does not work, something about version unknown. How do I compile csfml for windows x64 bits?
Title: Re: Using sfMusic_createFromStream will cause sfMusic_destroy to crash
Post by: tinyBigGAMES LLC on October 13, 2021, 03:57:59 pm
Phew, after much pain and suffering, LOL, I finally managed to get build system setup to build sfml/csfml with visual studio 2019. Upgrading to the latests dev build does fix the crash issues.

Many thanks eXpl0it3r.