[Gambas-user] Program runs wild

Eilert eilert-sprachen at ...221...
Mon Dec 20 12:28:53 CET 2004


Hi,

this is a small Gambas app I made for monitoring who is online in the 
system. The program calls "who" and displays the output in a list. There 
is an LCD number showing the number of people logged in. That's all.

There is no regular base on which the program starts going nuts. All I 
can say is "sometimes" it starts consuming more and more processing 
power while still keeping to run. If I stop it and restart it, 
everything is fine again, until next time... :-)

Here is the code:

' Gambas class file

PUBLIC SUB Form_Open()

   Form1.Title = "KwhoList 1.0"
   Form1.X = 713
   Form1.Y = 510
   Form1.Width = 270
   Form1.Height = 280

   whoListeLesen

END

PUBLIC SUB Timer1_Timer()

   whoListeLesen

END

PUBLIC SUB Process_Read()
DIM t$ AS String

   LINE INPUT #LAST, t$

   ListBox1.Add(t$)
   LCDNumber1.Value = ListBox1.Count

END


SUB whoListeLesen()

   ListBox1.Clear

   EXEC [ "who" ] FOR READ



END

PUBLIC SUB Form_Resize()

   ListBox1.Width = Form1.Width
   ListBox1.Height = Form1.Height - 50
END

---
When initiated, the program reads the list once to have a display. The 
timer is on 10 seconds. So every 10 seconds I can see a new list.

Any ideas where there is a reason for Gambas to start consuming 88 % 
processing power?

Rolf





More information about the User mailing list