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

There's something about loading larger images from disk... #1

Closed
Kawa-oneechan opened this issue Oct 2, 2019 · 3 comments
Closed
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Kawa-oneechan
Copy link
Owner

You link a 640×480 256-color image into a program directly and pass it to DRAW->DisplayPicture, you're fine.

DRAW->DisplayPicture((TImageFile*)&pic);

I temporarily changed the image in twohundred from 200-16.api to 480-256.api for testing and it consistently appeared perfectly well.

However, slideshow and disktest load their images from disk. I have not the capacity nor the crayons to properly figure this out but it seems like overly-large files might not load right. In the latter's case even the low-resolution 256-color image is consistently broken.

borken

@Kawa-oneechan Kawa-oneechan added bug Something isn't working help wanted Extra attention is needed labels Oct 2, 2019
@Kawa-oneechan
Copy link
Owner Author

So from the Infinite Snake bug I've learned that there is something about malloc, possibly free, that messes things up at some point. Since loading images from disk involves a fair amount of data even with RLE, this might be related.

This calls for more research.

@Kawa-oneechan
Copy link
Owner Author

Well, I looked into it, and I'm stumped. Rarely this would break in the second part with the consecutive large allocations but the numbers add up.
1570539295
Not shown: the linked list originally used in the snake game seeming perfectly okay.

@Kawa-oneechan
Copy link
Owner Author

It was interrupts.

They, well, interrupted the file loader and broke it. The rest was just timing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant