Fixed (1.20.1.4) Text garbled issue

vamX

Well-known member
Featured Contributor
Messages
174
Reactions
634
Points
93
Website
www.patreon.com
Patreon
vamX
Sometimes text in VaM becomes garbled (nonsense characters from the full unicode set appear instead of the correct characters).

I had this problem in a Unity project years ago. I'm trying to remember how I resolved it. I think I may have switched to using TextMeshPro. This is basically a problem with Unity I had to work around once. Let me know if you haven't resolved it already and I'll research what we did.
 

Attachments

  • temp Capture.PNG
    temp Capture.PNG
    12.5 KB · Views: 0
I'm remembering that at least part of the solution was reducing the font size specified in a font. Don't use larger font sizes to render smaller text or something like that, perhaps create a second font asset with a smaller fixed resolution. I think Unity samples from the larger font and produces this garbage.
 
I believe this is being caused by an error that was happening during UI refresh that I hope is resolved in 1.20.0.9 (due out today). I do see this occasionally in Unity Editor while debugging. It usually happens when I have tabbed out of the editor and come back. Usually at alt-tab out and back in fixes it. Others have reported that fixes it in the built app as well.

I may not be able to fix if the other fix I put in does not catch it. It seems to be happening a lot since 1.20, and this is the only new UI error I have seen, so I believe it is fixed. If this doesn't fix it, I cannot afford to switch to TextMeshPro at this time. I do plan on using the improved text system in 2.X (Unity bought them out and is now a native option).
 
I've confirmed this is fixed in upcoming 1.20.0.9. The cause is trying to resize a Text element (or the element controlling its size) while the text is being actively modified.
 
I just saw this again in the .10 release... The text that was garbled was the bottom main VaM UI (with load scene, possess, etc.)
 
I fixed at least one cause of it because I had found a way to easily reproduce. If you can find a way to reliably produce, let me know. I'll keep trying to reproduce on my end.
 
One similar issue I had while developing Timeline was with too many vertices (specifically too much text in a text field), it broke the rest of vam's UI in a similar fashion. It might be related to the new limit in the messages/errors logs, if you hit that limit I _think_ it could cause this issue. Anyway it's just a theory.
 
I can confirm that the problem still exists in .10, all the text in the UI just got corrupted. No reliable way to reproduce it, it happened while spamming logs and opening the log window, which I do all the time.
 
That would reinforce the theory of the increased log window limit. I guess if you spam with a very high amount of high-vertice characters (not sure which is the worse, maybe a chinese character) you'll quickly be able to confirm it.
 
> high amount of high-vertice characters

I would _guess_ that glyphs are textures on quads, so it's basically a 16K character limit. My output_log.txt right now is at 100MB, so I've hit that more than enough. Seeing as it's hard to reproduce, it's probably some sort of timing issue.

In other news, we desperately need a better log window and better debugging tools. Line numbers, anyone?
 
I'll look at this for next release. I increased the total length of the error and message logs in last release while fixing the other cause of the garbled text. That increase appears to be pushing some text meshes over the 64K vertex limit.
 
Back
Top Bottom