[Gambas-user] Program runs wild
Eilert
eilert-sprachen at ...221...
Tue Dec 21 11:25:07 CET 2004
Maybe there is something the two have in common: a Timer event. I don't
know which example you mean, but I bet there is a Timer event in it :-)
And as I'll answer to Benoit, the change in code didn't help.
Rolf
Primorec schrieb:
> hmmm.... I have to add a similar experience .... it could be that it
> is NOT related...
> but....hey... maybe it is..
>
> So, I've observed the following phenomena:
> - I was running cygwin/x on WINDOWS XP Professional
> - from that XP box I've telnet-ed to RH8.0 box and started digital
> clock through gambas IDE
> (digital clock is one of the gambas examples - part of the distribution)
> - This application was running over the weekend (3 days in a row). On
> monday morning (when I've returned to work) I've noticed that cygwin/x
> consumed a whooping 300MB of RAM and the RH8.0 box was slow as
> molasses. Gambas clock was still running and consuming 100MB of RAM
> and 200+MB of swap .
>
> After that I've killed cygwin/x and remote gambas clock . Than I've
> resarted cygwin/x and gambas clock on RH8 box and everything was back
> to normal.
>
> Right now I am not at work. I'll will be back in office on Jan 3rd 05.
> In other words, I can not reproduce the event right now
>
> just my 0.02 euro
>
> Igor
>
>
>
>
> On Tue, 21 Dec 2004 00:29:44 +0100, Charlie <karl.reinl at ...9...> wrote:
>
>>Eilert schrieb:
>>
>>
>>>
>>>Benoit Minisini schrieb:
>>>
>>>
>>>>On Monday 20 December 2004 12:28, Eilert wrote:
>>>>
>>>>
>>>>>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
>>>>>
>>>>
>>>>
>>>>What happens if you read data from 'who' process this way:
>>>>
>>>>' Gambas class file
>>>>
>>>>PRIVATE $sBuffer AS String
>>>>
>>>>...
>>>>
>>>>PUBLIC SUB Process_Read()
>>>>
>>>> DIM sData AS String
>>>> DIM iPos AS Integer
>>>>
>>>> READ #LAST, sData, -255
>>>>
>>>> $sBuffer = $sBuffer & sData
>>>> DO
>>>> iPos = Instr($sBuffer, "\n")
>>>> IF iPos = 0 then BREAK
>>>>
>>>> ListBox1.Add(Left$($sBuffer, iPos - 1))
>>>> $sBuffer = Mid$($sBuffer, iPos + 1)
>>>> LOOP
>>>>
>>>> LCDNumber1.Value = ListBox1.Count
>>>>
>>>>END
>>>>
>>>>...
>>>>
>>>>
>>>>Tell me the result!
>>>>
>>>>Regards,
>>>>
>>>
>>>Thank you for the tip, I'll try to run the changed code tomorrow.
>>>
>>>By the way, when typing it in, I found that
>>>
>>>ListBox1.Add(Left$($sBuffer, iPos -1))
>>>
>>>resulted in an error "Comma missing". After thinking it over I tried
>>>
>>>ListBox1.Add(Left$($sBuffer, iPos - 1))
>>>
>>>and it was accepted. Isn't that kinda bug? Or do you intend something
>>>special with a difference between "-1" and "- 1" ? I think, within
>>>this context, - 1 can't mean something different than -1.
>>>
>>>Rolf
>>
>>Salut,
>>
>>no thats the message for that.
>>Sorry, i know that I think since 0.97 i'v never reported it.
>>
>>Amicalment
>>Charlie
>>
>>
>>-------------------------------------------------------
>>SF email is sponsored by - The IT Product Guide
>>Read honest & candid reviews on hundreds of IT Products from real users.
>>Discover which products truly live up to the hype. Start reading now.
>>http://productguide.itmanagersjournal.com/
>>_______________________________________________
>>Gambas-user mailing list
>>Gambas-user at lists.sourceforge.net
>>https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
More information about the User
mailing list