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

emscripten: assertion about device->hidden on device opening #2906

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

emscripten: assertion about device->hidden on device opening #2906

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.8
Reported for operating system, platform: Other, Other

Comments on the original bug report:

On 2018-05-26 14:16:02 +0000, wrote:

Created attachment 3250
emscripten-audit-assert.patch

This assertion triggers on device opening:
/* if your target really doesn't need it, set it to 0x1 or something. /
/
otherwise, close_audio_device() won't call impl.CloseDevice(). */
SDL_assert(device->hidden != NULL);

This field was left at NULL following a clean-up:
/* Initialize all variables that we clean on shutdown /
#if 0 /
!!! FIXME: currently not used. Can we move some stuff off the SDL2 namespace? --ryan. */
this->hidden = (struct SDL_PrivateAudioData *)

The attached patch initializes the field to 0x1 as suggested.
No more assertion popup on startup :)

On 2018-06-29 10:15:44 +0000, wrote:

The patch also makes SDL2 properly unregister the Emscripten audio hooks when closing audio.

On 2018-11-18 14:36:21 +0000, wrote:

Merged at https://hg.libsdl.org/SDL/rev/9bae6554dd3e

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

1 participant