-----Original Message-----
From: David Fedor <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, June 10, 1999 6:17 PM
Subject: Re: Fw: System 'Find' behavior change
>>Hi,
>>
>>I sent this message earlier with no reply. Anyone at Palm can answer
this?
>
>I saw your note, but know of no such change in the OS. You're sure that
>your app isn't accidentally returning too soon or something? There's
>nothing that stops your app from running, other than it returning on its
>own accord when it is done. It also should return when it has filled up a
>page of find results, of course. Set a breakpoint at your app's exit to
>find out why you're quitting.
Actually my application is not quitting but it is getting some event (not
generated by my app). Here is the classic code in all 'Search' rotines:
if ((recordNum & 0x000f) == 0 && // every 16th record
EvtSysEventAvail(true))
{
// Stop the search process.
params->more = true;
break;
}
After realizing that I might be stopping here based on your information, I
set a breakpoint and realized that the app is indeed stopping here on
getting an event. The events I get are of two kind (both spurious as I am
not even touching the screen while the search is running).
1) winExitEvent (bogus X and Y values, penDown=1)
2) keyDownEvent (this shows variable bogus x and y values, penDown=0 and
{chr=0x101, keyCode=0, mod=8}).
In Emulator (2.1d28) tried it with Pro (v2.0.2+ Pro), 3.0 and 3.2 (Palm VII
build 75).
What could be generating these events? How can I guard against spurious
events?
Note that this happens "in-between" my application search (which is long and
can take one to two minutes). I can't see any other application getting a
slice for find. Some times there will be a couple of search entries shown/
Due to the event my app will be breaking the find loop and return declaring
that there is more data (hence the "Find More" button).
I don't see wrong result ever - just that the entries found will be
presented in smaller than a screen-full chunks at a time.
The same code gets compiled in another application that has 'gentler' data
and this behavior is not seen there. So I am suspecting that there may be
some error being generated in the search code (or 'heap' being affected)
which could result in this spurious events?
Another curious observation is that when the search string is such that very
'rare' matches are found then this behavior is seen. What this means that
more records are read, uncompressed and released.
If the search string is frequently found, (that is it fills up the find
screen fast), then this event is rarely seen.
Does this mean that the System does not get a chance to gc (or whatever the
memory manager is doing to clean up the release unlocked memory handles) in
the first case (Find loop keeps cranking, stirring up more records)?
Does this look like a possible cause of this strange problem? Any other
ideas?
>
>There is a call to EvtSysEventAvail(true) in the find loop, between app
>launches, so theoretically something could be sending an event that is
>causing a pause. Are you, or any other app on the device, doing this? Or
>are you seeing the pause while your app is searching? (This would only
>stop things between apps, not during one's search.)
As I said, it happens during the search.
Thanks.
Sandeep Shah
K2 Consultants, Inc.
>
>-David Fedor
>Palm Developer Support
>
>
>
>