This exception is more common in very large programs and occurs when you have ran out of available memory at run-time. A variety of data is copied into the RAM at run-time including fonts, bitmaps, firmware, the application and draw cache. Usually the draw cache is the largest user of space. What draw cache does is take the last rendering of each object and save the pixels of that rendering into memory.
The default draw cache level is ALL. Under ALL, every single object will have a copy of its last rendering cached into memory. With many large objects in a workspace your going to use a lot of memory, and there may be no way you can cache it all. This is the best option for performance.
The next lower level is ENABLED. Under this, all objects who's enabled properties are set to true will be draw cached.
The next lower level is EFFECTIVE ENABLED. Under this, all objects who's enabled properties are set to true and their parent object is enabled will be cached. Lowering draw cache to these levels doesn't usually effect performance much if any.
The last level of draw cache is OFF where no objects are cached.
You can change the draw cache in Power On Setup (see Qlarity-Based Terminal Hardware Manual) under the DCACHE setting or using the function SetSystemSetting at run-time.
Code:
func Startup ()
handles MSG_INIT
SetSystemSetting(SYS_USEDRAWCACHE, CACHE_ENABLED, SYSACT_DONOW)
return
endfunc
Make sure you don't have extra BDF, TTF fonts, Bitmaps or other resources included in your workspace that are not being used because they also use extra memory.
Make sure you don't have an array growing forever in your workspace using up the available memory.
Once you've changed the draw cache to ENABLED or EFFECTIVE ENABLED, make sure you do no have screens enabled that are not being displayed.