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

Drawing within the first 8 rows of an off-screen texture produces a full system hang #31

Open
randomouscrap98 opened this issue May 30, 2021 · 2 comments

Comments

@randomouscrap98
Copy link

I can provide a simpler code example if necessary. I created a 1024x1024 off-screen render target, and any drawing commands within the first 8 rows causes a full system hang, requiring a hard reboot. It's currently happening in https://github.com/randomouscrap98/3ds_basicdraw/, particularly the "draw_centeredrect" function in https://github.com/randomouscrap98/3ds_basicdraw/blob/master/source/main.c, however I can create a simpler example if necessary, as it has been happening since the app did nothing at all. If you comment out the y < PAGE_EDGEBUF section, then start the app and try drawing near the top, you can (perhaps) discover the full system hang.

I'm not sure if the 1024x1024 size matters. Again, I can provide a super minimal code example if required.

@WinterMute
Copy link
Member

A super minimal code example would be great.

@randomouscrap98
Copy link
Author

OK, been trying to make a really small example and this is what I came up with: https://gist.github.com/randomouscrap98/e6d34e9f14a29c43db038135cdfd9371

It draws a small rectangle wherever you're touching, so you can test it out a bit better. As the code is now, I believe it doesn't crash. If you change PADGE_EDGE to say, 7 or less, then try drawing near the top of the screen, the system hangs and doesn't accept input.

After testing, it seems to only happen on this larger texture size. I tried 512 and it didn't crash when drawing in the first 8 rows. Furthermore, it seems to be the position of the final fill and not the position you provide which causes it to crash. For instance, DrawLine is a rotated rectangle (from what I've heard) and that one WILL crash if you don't increase PAGE_EDGE past 8 to account for the rotation.

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