You are getting NULL handle errors because you are passing NULL handles to
functions that don't accept NULL handles. You should determine why you are
passing NULL handles to those functions. Don't *guess* that it's because of a
stack overflow problem (a condition easily and immediately detected when running
under the Palm OS Emulator). Use a debugger and determine exactly why you are
passing a NULL handle to the function. It could simply be that you tried
allocating too large a buffer with MemHandleNew and it failed.
-- Keith Rollin
-- Palm OS Emulator engineer
Herman Badenhorst <[EMAIL PROTECTED]> on 02/22/2001 08:44:14 PM
Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent by: Herman Badenhorst <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
cc: (Keith Rollin/US/PALM)
Subject: Stack
*********************************************
http://oasis.palm.com/dev/kb/papers/1134.cfm
Don't overfill the stack
Allocating large numbers of local variables (or extremely large ones) can
result in hard-to-debug heap corruption. The stack is only about 2k; be
stingy with stack-based variables!
*********************************************
I'm getting Null handle errors, can i maybe be because i'm overfilling the
stack with these local variables?
Boolean handled = false;
FormPtr frm;
FormPtr *frmNew;
ControlPtr ctl;
Boolean vFound = false;
Boolean blnPrevious = false;
Boolean blnNext = false;
_VoucherRecord vVoucherRecord;
_DynamicVouchers_Value vDynamicVoucherRecord;
_DynamicVouchers_Value_ID vRecordTypeID;
char vVoucher[80];
char vVoucherTypeQty[20];
char vNewRecord[20];
char vNewRecord1[20];
static char vVoucherTypeID[15];
char vNewRecordID[15];
static char TempQty[5];
static char vVoucherValue[10];
char vStrTotalSold[5];
int vTotal;
static int vButtonCount;
int VoucherQtyL = 0;
int vcount;
int i,x,y,k,l;
Regards,
--
Herman Badenhorst
"Life is God's gift to you.
The way you live your life is your gift to God.
Make it a fantastic one."
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/