Skip to content

Integer overflow when using text() on non-Express boards #25

Closed
@mitsake

Description

@mitsake

I've been working with CircuitPython on a Trinket M0-based board, and I'm currently unable to use text() to write to the screen. I get the following error:

Traceback (most recent call last):
  File "code.py", line 34, in <module>
  File "adafruit_framebuf.py", line 344, in text
  File "adafruit_framebuf.py", line 404, in __init__
OverflowError: small int overflow

I think the culprit is the file size check added in commit b7c7937. os.stat() can return integers larger than non-Express boards support (particularly st_mtime, and friends), which then causes an error when attempting to load the font file.

I'm trying to work out an alternative way to determine file size, and if I come across one will try to submit a pull request.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions