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

malloc.c failure when calling SDL.pollEvents #193

Open
mpahrens opened this issue Jan 24, 2019 · 0 comments
Open

malloc.c failure when calling SDL.pollEvents #193

mpahrens opened this issue Jan 24, 2019 · 0 comments

Comments

@mpahrens
Copy link

mpahrens commented Jan 24, 2019

using libsdl2-dev (from apt on ubuntu) version 2.0.8+dfsg1-4ubuntu1
and the latest of this haskell sdl2 wrapper available through using haskell stack

I am trying to run a local copy of this bgfx example project:
https://github.com/haskell-game/bgfx

and semi-consistently, on the SDL.pollevents Call, I get the following c exception:
bgfx-exe: malloc.c:4009: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)' failed.

You can see the call here in the cubes example:
https://github.com/haskell-game/bgfx/blob/master/Cubes.hs#L65

I get this error about 9 / 12 times. Otherwise it works as intended or I get another error at the same spot:
1 / 12 times I get just "Segmentation fault (core dumped)"
1 / 12 times I get "free(): invalid pointer" or something similar
1 / 12 times it works as expected.

Any advice on what I might be doing wrong or maybe wrong settings is appreciated.
Once I get stack to give me a stack trace, I'll add it to this ticket.

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

No branches or pull requests

2 participants