-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use uint16 for temporary variables in displayio.TileGrid #4287
Conversation
I tried this out on a magtag:
I'm still getting the hard crash and reset from this code: font = terminalio.FONT
glyph= font.get_glyph(ord('A'))
letter = displayio.TileGrid(glyph.bitmap, pixel_shader=displayio.Palette(1), default_tile=glyph.tile_index, tile_width=glyph.width, tile_height=glyph.height)
letter.transpose_xy = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a fine clean-up fix but I don't think it will solve #4284, because the width
and height
are pretty small integers, and they'll fit in either a signed or unsigned 16-bit int.
I tried too. Hard Crash and reboot.
with the following code
|
I suspect that in the case of a font bitmap, one of the dimensions is actually quite large, and that's causing problems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good correction, but we have two reports that it doesn't fix the original bug, #4284, so I'm not sure where to go from here. We could just accept this but leave the bug open, or someone can work on fixing the bug.
I confirmed that this fix does not fix the crashing. It's important, but there's some other bug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the cleanup!
Should fix #4284