Potential bug/leak in GuiMLTextCtrl in 1.5.2
by James Spellman · in Torque Game Engine · 02/20/2009 (9:08 am) · 0 replies
I've been working on a demo where we swap out a bunch of text with bitmaps in a GuiMLTextCtrl when I noticed that on two pages, the graphic never changed when it should show pics of two different people.
I eventually discovered that in the allocBitmap routine that it was walking a corrupted list of bitmaps after I had performed a setText to replace the string. It just happened that it found a match that was close enough (from the corrupted data) to continue with the wrong (previous) image.
I made a quick patch by adding freeResources(); to the front of the setText method.
I eventually discovered that in the allocBitmap routine that it was walking a corrupted list of bitmaps after I had performed a setText to replace the string. It just happened that it found a match that was close enough (from the corrupted data) to continue with the wrong (previous) image.
I made a quick patch by adding freeResources(); to the front of the setText method.