> -----Original Message-----
> From: McMicken, Steven [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 09, 2000 8:47 AM
> To: Palm Developer Forum
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: help with MemHandleNew
> 
> 
> Have you allocated memory to charRatio?  If you don't assign 
> memory to it
> with MemPtrNew, the memory that it points to can change 
> without notice,
> since your program hasn't reserved it from the system.

Not to mention the debugger on Codewarrior 5 and 6 sometimes do funny things
to local variables if you're stepping through the code watching the string.
I have seen the damned strangest stuff happen to local variables while
debugging.  

Sometimes local variables will just all of a sudden change to a random
number, sometimes two charptrs point to the same string all of a sudden.
Sometimes floating the cursor over a variable in code will display its
value, sometimes it won't, and if you're really lucky, sometimes it will
display the value of a different variable altogether!  Oh, and 9 times out
of 10, expanding a static ("global") pointer, or stepping over code that
makes an assignment onto a static ("global") variable, totally brings down
the IDE and POSEr.  

Codewarrior 5 has really helped spice up my otherwise drab POSEr debugging
sessions with all of its clever quirks and instabilities.  And with CW6,
they're more clever than ever before.

To the original poster, if you are seeing strangeness in a debugging session
as you step through the code, take it with a grain of salt.  I typically
write off most of the oddness I see as part code optimization, part debugger
bugs.

-Jeff

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to