Fixing Path of Exile's Mangled Text Bug

Am I the only one bothered by the idea that SCRIPT_CACHE* still isn't unloaded from the memory, even if you unloaded the font? :)
As a fellow coder, I salute you for tracking this one down. Coding is hard man.

I know the feeling of searching a bug in thousand files and milion of code lines. Some took me days just to fix the script by deleting 1 word LOL
24.1.2018 [quote="Dro28"]wheres my fragment tab?[/quote]

(I thought that was a joke)

25.1.2018: GGG- Introducing the Fragment Stash Tab!
True detective!

Wouldn't have the patience to do such things, so I am glad I am out of IT alltogether.
Heart of Purity

Awarded 'Silverblade' to Talent Competition Winner 2020.
https://www.youtube.com/watch?v=NDFO4E5OKSE
ign: Reinhart
Great to know, thanks ^_^
End of an era.
Nice, i final end (hopefully) to a bug i almost encounter in every play sessions (sometimes betrayal text, sometimes it was the div cards, sometimes something else ^^').
"
Googlenysh wrote:
Am I the only one bothered by the idea that SCRIPT_CACHE* still isn't unloaded from the memory, even if you unloaded the font? :)
Thinking of exactly the same thing. If the SCRIPT_CACHE is allocated here and never removed, doesn't this mean that unloading and reloading fonts would endlessly allocate new SCRIPT_CACHE objects that never experience cleanup.

From the bug we all encountered, we know that it did not crash PoE, the cache always still existed. From this perspective, the quote:
"
...there were a few ways to go about fixing this: You could move the SCRIPT_CACHE object to belong to the Resource::Font object, delete the old SCRIPT_CACHE whenever the font gets unloaded, or swap the lookup value from the memory address to be instead be based on the typeface, size and styling of the font, which is what actually makes a font unique. All these options work but each has its own pros and cons and should be weighed based on how it fits into the larger systems.
seems a bit dubious. I have no idea how large the caches are, but if we take the explanation at face value, all solutions that are not "delete the old SCRIPT_CACHE whenever the font gets unloaded" end up slowly leaking memory.

Of course, if the cache would be keyed on the font identity and settings, there would be some theoretical maximum amount of elements in the cache. But it still sounds kind of dubious.

Could I please get a clarification on this?
Last edited by Trilkk#7404 on Jun 2, 2022, 5:40:54 AM
Thanks for having the Determination to keep chasing this bug, and the Grace to post about it here!
"
I noticed we never got a report for this happening on Xbox, PlayStation


We definately get this on Playstation... Hope the fix comes over to us too!

Report Forum Post

Report Account:

Report Type

Additional Info