John Kubie wrote:
> I've been frustrated tracking a weird bug.
>
> Situation:
>
> I have a thread that operates a batch file processor.
>
> Typically, there are about 10 files to process. Processing one file  
> takes about 5 seconds, which involves loading a large (approx 17000  
> line) text file and looping through each line.
>
> The processing sometimes hangs (stalls) and sometimes doesn't.
>
> When it hangs it always does so on the first of the 10 files.
>
> The hang will be broken, and processing will continue, if I click on  
> a window of the program. The hang sometimes occurs 2 or 3 times when  
> processing the first file, but never when processing subsequent  
> files. File content is not important.
>
> Putting a halt function in the code shows where the hangup takes  
> place. Processing 17000 lines is done with a "for" loop. The hangup  
> occurs between the finish of one iteration thru the loop and the  
> beginning of the next. Replacing the "for" loop with a "while ...  
> wend" loop didn't fix it.
>
> Any thoughts or insights are appreciated.
>
> I'm using RB 2007v1 on an intel mac (powerbook pro). The compile is  
> to universal binary.
>
> John Kubie
>
> postscript. I just did a test that convinces me its a REALbasic bug.  
> When I compile for powetPC and run under rosetta, file processing is  
> somewhat slower, but the stall does not occur. I should submit a bug  
> report, but first I would like to duplicate the problem in a simpler  
> program. 
Just out of curiousity, is this a dual core Mac? I had a weird issue, on 
XP, where a simple 3d app I'd written did fine on my single core box, 
but on any multi-core machine it would perform loop based tasks very 
slowly. I switched to something of a state based design, where I did 
checks in a timer, modifiers based on those checks in a different timer, 
and actions performed in yet another timer. This worked flawlessly. So 
far. Anyway, thought I'd share and perhaps further develop my 
conclusions on it.

Thanks,
Fargo
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to