-
Notifications
You must be signed in to change notification settings - Fork 196
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
Misaligned address SIGBUS in CGImageSourceCreateImageAtIndex #486
Comments
Working with the current head branch of SDL_image |
That's really interesting. The documentation for CGImageSourceCreateImageAtIndex() says:
It seems like -1 is an invalid index and the function would return NULL. Is that what happens? |
Nope. I get an id of the ref to first image (which in this case is the spiresheet) and the game runs fine. Apple bug?? 🤨 |
I'm not sure how that's possible... is there a bug in ImageIO where it's using -1 based indices? |
Just checked and it also works with |
The steps to reproduce for me are literally to follow the build instructions of this repo. |
Ok, i have some progress. I don't think it's SDL_image actually. So, this is very weird but, my default terminal is fish and there it does not work with |
Just tried writing an issue on fish-shell GitHub and they suggest running with Looks like something to do with my $HOME, but unsure what yet. |
Also managed to get a bit of crash report from Apple by launching through a different terminal. Here is the relevant bit:
|
See this issue. I believe this is potentially a SDL_image bug??
Briefly;
texture = IMG_LoadTexture(renderer, "spritesheet.png");
Job 1 terminated by signal SIGBUS (Misaligned address error)
SDL_image/src/IMG_ImageIO.m
toCreateCGImageFromCGImageSource
toimage_ref = CGImageSourceCreateImageAtIndex(image_source, 0, NULL);
(docs)0
to-1
makes it workprintf("image_count: %lu\n", CGImageSourceGetCount(image_source));
prints1
The text was updated successfully, but these errors were encountered: