memory leak? rtl problem?

Search this archive.

From: Steven Seeger (sseeger@stellartec.com)
Date: Fri 30 Mar 2001 - 18:54:32 IST


Hey all. I'm working with a set of C++ libraries I've created for use in an
embedded system with a touch panel, color LCD, and a GUI. The libraries
handle all the GUI elements such as buttons, images, text boxes, labels,
sliders, pulldown menus, and whatever else. The setup is multilayered
graphically and event-wise, where an object "above" another object will take
precedent if the user touches it.

Anyway, I have a background screen and some stuff drawn on top of it. For
testing purposes, I want to scroll a box over it. I create my Xbitmap (name
of the library) and specify no filename. So the library then takes a
snapshot of the screen inside the coordinates given for the object. Then, I
use gl_fillbox to fill a box over that object.

Every 40 ms, my real-time linux based touch panel task will send a "no
touch" message and so the list of  objects with null event handlers will be
called. When this Bitmap is called, the function I wrote draws over the
colored box with the original part of the screen, deletes the bitmap,
creates a new bitmap with updated coordinates, and draws another box.

When my Xbitmap objects are deleted I use the delete [] operator to delete
the space allocated to store the screen image in its destructor. The
gl_getbox function is used to get the screen data.

After a while of this running, the system will hang. It isn't a segfault,
but a total hang. We have had problems with older versions of SVGALib
wanting to call CLI and STI which will cause real time linux to crash, but I
didn't find any evidence of those calls in version 1.4.2.

Is there any reason my object wouldn't delete properly or the bitmap buffer
delete properly? Or is there some reason that calling gl_getbox and
gl_copyfromcontext 25 times a second would cause any problems? The processes
are working very fast, and there is plenty of time left in the system. On
the screen I'm testing this on, there is a touch keyboard and all the
buttons react just as fast as can be assuming you don't try and press one
under the rectangle as it flies by.

Thanks for any suggestions anyone might have.

Steve


------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST