That line refers to an if statement that compares an UInt and Word.
So its crashing when comparing a UInt32 vs. UInt16. How does the compiler
promote/demote in this situation? if(UInt32 < UInt16) I would imagine it
should work up to 2^(16) or at least 2^(15) and not 2^(14)
I would be interested in the explanation also, I ran into something similar
about a year ago and had to rewrite the app to reduce the # of records
allowed.
-----Original Message-----
From: Steve <[EMAIL PROTECTED]>
To: Palm Developer Forum <[EMAIL PROTECTED]>
Date: Tuesday, April 04, 2000 9:18 AM
Subject: Database Sorting Problem
>I am encountering a problem while using a DmQuickSort, which produces a
>"DataMgr.c Line 6550 Index out of range" error. The sort is doing nothing
>more than a "StrCompare(&r1->fieldX,&r2->fieldX) where r1 and r2 are the
>two pointers passed in to the comparison routine. The observations are as
>follows:
>
>If I load 16368 records, and go to the application and perform a sort,
>everything is fine. If I now add 22 more records, so I'm up to 16390 (and
>past a magic? 16384 barrier), now when I try to sort I get the crash
>halfway through the sort (I know from the time elapsed that the crash is
>not occuring when the sort finishes and the program goes on to do
>something else). This can't be a memory problem because, on the system
>I'm trying this on, the database takes up 753K and there is only 505K
>free memory, but those numbers don't change significantly between the
>success at 16368 records and the failure at 16390. So I therefore
>conclude that there is something in DmQuickSort which can't handle a sort
>larger than 16384. Hopefully this isn't right, and there's a better
>explanation, but I don't have one.
>
>Steve Patt
>President, Stevens Creek Software
> http://www.stevenscreek.com/palm
> Best PQA ("ePQA"), PalmSource 99
> Best Application ("PizzaScan"), Palm Developer's Conference 1998
> First printing software for the Palm - September, 1997
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html