You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS/device including version:
MacOS Catalina 10.15.3
Issue description:
When a label has a Dynamic Font and it is "local to scene" then each instance of the label with a unique font size will result in a new open file handle to the underlying font file. The file handle will remain open until the label is freed.
When dynamically resizing fonts to fit various scenarios you can exceed default OS file handle limits.
Especially if you are not careful in tests. Eventually your game will crash because you can't open up anymore files. Commonly this resulted in a Null instance coming back from a call to load which caused an error later when trying to use it. This took a while to track down.
ERROR: _load: Cannot open font file 'res://path_to_font.ttf'
Steps to reproduce:
The project below has the minimum steps. to reproduce, but. this is the gist of it:
On mac/linux run the following to count the open file handles to the .ttf file.
➜ ~ lsof | grep godot | grep .ttf | wc -l
49
In the above example there are 49. handles because the initial font size was 16. When it hits 16 in the loop it does not result in a new file handle. being opened.
Godot version:
3.2 stable
OS/device including version:
MacOS Catalina 10.15.3
Issue description:
When a label has a Dynamic Font and it is "local to scene" then each instance of the label with a unique font size will result in a new open file handle to the underlying font file. The file handle will remain open until the label is freed.
When dynamically resizing fonts to fit various scenarios you can exceed default OS file handle limits.
Especially if you are not careful in tests. Eventually your game will crash because you can't open up anymore files. Commonly this resulted in a Null instance coming back from a call to
load
which caused an error later when trying to use it. This took a while to track down.Steps to reproduce:
The project below has the minimum steps. to reproduce, but. this is the gist of it:
On mac/linux run the following to count the open file handles to the
.ttf
file.In the above example there are 49. handles because the initial font size was 16. When it hits 16 in the loop it does not result in a new file handle. being opened.
Minimal reproduction project:
https://github.com/bitwes/GodotIssueDynamicFontFileHandles
The text was updated successfully, but these errors were encountered: