[Gambas-devel] Gambas module for QT embedded and stack overflow error deleting objects

Silvan Calarco silvan.calarco at ...531...
Tue Nov 7 18:32:43 CET 2006


Hi,
I've made a patch to the gambas Qt module to make it build against 
Qt/Embedded. Most of the work consisted in adapting the build scripts and 
commenting out any calls to X specific functions (I suppose most don't need 
any replacement because relate on X functionalities not available/needed with 
the framebuffer). The current (early stage) patch is attached and I've tested 
it with gambas 1.9.44. The Qt/embedded module support could be added to 
mainstream Gambas but the scripts should be modified to make both Qt and Qte 
modules from the same sources, that's a thing I haven't done.
The test results in framebuffer environment are conforting but I'm currently 
having a stack overflow issue when Deleting graphical objects. The following 
code associated to a button:

PUBLIC SUB TestButton_Click()
  DIM a AS label
  DIM i AS Integer
  FOR i = 0 TO 20000
     a = NEW label(ME)
     label1.text = Str(i)
     a.Delete
     WAIT
  NEXT 

Stops after 502 cycles with a stack overflow error. I thought it was related 
to the Qt/embedded module but when I ran it against X it stopped with the 
error too after 985 cycles. The tests have been done with the stack size set 
as 'default'. With different stack size values the resulting cycles before 
the error are proportional.
Is the code wrong or its behaviour ?

Cheers,
Silvan

-- 
mambaSoft di Silvan Calarco - http://www.mambasoft.it
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gambas2-1.9.44-qte.patch
Type: text/x-diff
Size: 23854 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20061107/92a3e4a8/attachment.patch>


More information about the Devel mailing list