[Gambas-user] Program runs wild

Mike Keehan mike_keehan at ...679...
Wed Dec 22 11:51:22 CET 2004


Eilert wrote:
> 
> 
> Charlie schrieb:
> 
>> Eilert schrieb:
>>
>>>
>>>
>>> Benoit Minisini schrieb:
>>>
>>>> On Tuesday 21 December 2004 11:45, Eilert wrote:
>>>>
>>>>> Hi Benoit,
>>>>>
>>>>> malheureusement pas
>>>>>
>>>>> It still shows the same behaviour, especially when I've switched to
>>>>> another screen and come back after some time. But even when I stay on
>>>>> the same screen and wait for half an hour or more, suddenly it 
>>>>> begins to
>>>>> accumulate processing power. First on one processor, then it 
>>>>> spreads on
>>>>> all four (it's a Xeon).
>>>>>
>>>>> So, it can't have to do with the string processing, maybe it's the 
>>>>> timer?
>>>>>
>>>>> Rolf
>>>>>
>>>>>
>>>>
>>>>
>>>> Can you send me your complete project ?
>>>>
>>>
>>> Sure, here it is - have fun with it :-)
>>>
>>> et bonne chance
>>>
>>> Rolf
>>
>>
>>
>> Salut,
>>
>> I think you cumulate processes ,
>> try that,
>> you have one process and you kill that process after work is done.
>>
>> (I haven't had a long time test with that)
> 
> 
> Well, I typed it in, it works, now we'll see if it runs nuts again :-)
> 
> Thank you for that idea, looks great:
> 
>>  IF ListBox1.ForeColor = &H000000& THEN
>>    ListBox1.ForeColor = &H005500&
>>  ELSE
>>    ListBox1.ForeColor = &H000000&
>>  ENDIF
>>  WAIT
> 
> 
> Now, when I typed that
> 
>>  EXEC [ "who" ] FOR READ AS myWho
> 
> 
> the list refused to give me "myWho", instead it inserted "Menu". So I 
> had to erase it and type myWho by hand. But it runs anyway.
> 
> Rolf
> 
> 
> 
Hi,

I've run your code on two machines - one works OK, the other has problems.

The OK system is a laptop, a Pentium III running Gentoo and kernel 
2.6.10-rc3.

The problem system is a dual Pentium III running SUSE 9.0 with kernel 
2.4.21.  If I run Kwholist and then goto another workspace/desktop and 
then switch back, the  Kwholist window stays blank.  Running 'strace 
-p PID' (the pid of the /usr/bin/gbx process) shows many sched_yield() 
calls with the occasional nano_sleep().

A Google search for these two calls shows that this sort of problem 
has been seen in the past, but I couldn't find a final solution.  It 
may be a problem with glibc or possibly with the kernel.

A workaround in Gambas (that I am using in a project) is to run one 
shell continuously in the background and send it commands as required. 
  See the Console example for how to do this.  This seems to fix my 
similar problem.

Mike




More information about the User mailing list