Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[audio] Memory/state corruption in the audio_module_playing example (regression) #2714

Closed
3 tasks done
jasonswearingen opened this issue Sep 19, 2022 · 5 comments
Closed
3 tasks done

Comments

@jasonswearingen
Copy link
Contributor

jasonswearingen commented Sep 19, 2022

  • I tested it on latest raylib version from master branch
  • I checked there is no similar issue already reported
  • My code has no errors or misuse of raylib

Issue description

I updated the Raylib-CsLo (C# Wrapper) to Raylib 4.2. To verify, I run all the examples (all 100+). They all "work", however I run the examples is a little different: They are all run within a single program, with each example scene loaded, run, unloaded. One after eachother.

In doing so, I discovered a bug with the audio system that was not in the raylib 4.0 release. (A Regression). When playing the ModulePlaying Sound example https://github.com/raysan5/raylib/blob/0abba4dc1854e71f58b252e840058178ea845e25/examples/audio/audio_module_playing.c that scene works, being loaded, executed, and unloaded seemingly correctly. But the next audio scene played will always crash upon it's exit. This leads me to belive that something about the multichannel sound streaming example corrupts the internal raylib state, so that the next example fails.

The error is not a thrown exception. The application crashes in the native code somewhere without an exception thrown. (Not visible from my C# debugger)

Environment

Windows 10 x64, running Raylib-CsLo latest (4.2-update branch). Raylib used is master branch, commit 6e8f3b0 (Sept 19th)

Code Example

You can probably see same symptoms by running a single application and running all the audio examples in order, inside the same app. Run the ModulePlaying example first, followed by all the other audio examples.

@jasonswearingen
Copy link
Contributor Author

I had a typo in my initial report. The issue is in the ModulePlaying example. I have edited the original to correct.

@jasonswearingen
Copy link
Contributor Author

It seems the "MusicPlaying" Streaming example also has the same problem.

@raysan5 raysan5 changed the title [Audio] Bug, Regression: Memory/State Corruption in the ModulePlaying example [audio] Memory/state corruption in the audio_module_playing example (regression) Sep 29, 2022
veins1 added a commit to veins1/raylib that referenced this issue Oct 2, 2022
@raysan5
Copy link
Owner

raysan5 commented Oct 2, 2022

@jasonswearingen Please, could you test the provided fix?

@raysan5
Copy link
Owner

raysan5 commented Oct 27, 2022

The provided PR should fix the issue. Reopen if still present.

@raysan5 raysan5 closed this as completed Oct 27, 2022
@jasonswearingen
Copy link
Contributor Author

Thanks Ray, I haven't been able to rebuild my native wrapper but when I do I'll let you know if the issue persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants