Too many open files error (fonts related).
Closed this issue · 2 comments
Deleted user commented
A lot of games written with pygame uses functions like this:
@staticmethod
def display_single_line(line, x, y, screen):
"""Displays a single line of text on Battle screen"""
txt = pygame.font.Font(None, 36)
render = txt.render(line[0:13], 0, (255, 255, 255))
screen.blit(render, (x, y))
So font file being opened every time when function is called. But this error doesn't happen in PyGame.
Maybe we should add caching or something like it?
Deleted user commented
Closed:
https://bitbucket.org/pypy/pypy/issues/2409/os-x-leaks-fds-while-failing-to-open-dirs
The issue was in PyPy
hodgestar commented
Tx.