AccessViolationException when loading multiple font sizes from memory #8433
ConradoDev
started this conversation in
Build/Link/Run/Fonts issues ONLY!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm experiencing a System.AccessViolationException when loading fonts into ImGui.NET from memory. I load multiple font sizes of the same font (e.g., Bahnschrift size 16, 20, 24, etc.) without storing any font files on disk.
The error happens sporadically when calling ImFontAtlas_GetTexDataAsRGBA32, suggesting a possible memory corruption issue. It does not always occur but happens often enough to be a major problem.
Example code of LoadFonts() method
ResetStream() simply sets stream.Position = 0; to allow reusing the same stream for different font sizes.
I have been struggling with this issue for a long time and haven't found a solution.
Beta Was this translation helpful? Give feedback.
All reactions