*********************************************
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/

Reply via email to