Re: App Caused Pocket PC to Soft Reset on its Own?

r_z_aret_at_pen_fact.com
Date: 03/23/04


Date: Tue, 23 Mar 2004 09:44:15 -0500

I don't know of any specific error that is likely to cause a reset.
But two very common errors lead to weird behavior:
a) abusing a pointer (using one that has not been initialized,
changing one that is being used elsewhere)
c) writing outside the bounds of an array (including string arrays)

Both errors are likely to cause symptoms far away from the code that
actually causes the problem, and thus can be _very_ painful to track
down. I can suggest some generic approaches.

If you have earlier versions of your source code and/or executables, I
suggest trying them until you find one that doesn't produce the
symptom, and then comparing source code. No guarantee, because the
problem code could have existed without showing this symptom.

Sprinkle ASSERT statements generously throughout your code. Check
pointers every time you set one. Check each pointer before you use it.
Check array bounds. This can be tiresome, and does take extra time
(programmer and execution). But it greatly reduces the chance of
undetected pointer and array problems. I am convinced they have saved
me far more time than they've taken. And ASSERTs are not included in
release builds, so you don't even need to edit code to keep them out
of release builds.

On 22 Mar 2004 19:17:55 -0800, tmgroup2002@yahoo.com (tm) wrote:

>I was running my app on my iPAQ Pocket PC (without the debugger), and
>suddenly my device performed a soft reset on its own. I assume that
>my app crashed? I was not able to reproduce this, and was wondering
>if anyone knew what sort of crash could cause the Pocket PC to soft
>reset on its own... typically I've seen the screen freeze and such,
>but this is the first time I have seen such behavior.
>
>Thanks,
>
>TM

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret, eMVP
PenFact, Inc.
500 Harrison Ave., Suite 3R
Boston, MA 02118
www.penfact.com



Relevant Pages

  • Re: array_walk?
    ... > foreach you would have to before using it to ensure the looping entails ... > the entire array; that's the only advantage I can think off offhand. ... When foreach first starts executing, the internal array pointer is ... automatically reset to the first element of the array. ...
    (alt.php)
  • Re: array_walk?
    ... > foreach you would have to before using it to ensure the looping entails ... > the entire array; that's the only advantage I can think off offhand. ... When foreach first starts executing, the internal array pointer is ... automatically reset to the first element of the array. ...
    (comp.lang.php)
  • Re: Arrays and Pointers
    ... > object in the next element array. ... > always be a pointer. ... If you reset $nr with new: ... Resetting $nr using "new" each time: ...
    (comp.lang.php)
  • Re: Looping Question
    ... >I don't think there is anything wrong with my loop, ... no binary file operation or any way to reset the pointer in the file. ... into a string, which you can then Split into an array of lines, and work ...
    (microsoft.public.scripting.vbscript)
  • Re: char **argv & char *argv[]
    ... "pointer to pointer to char". ... >> pointer)) pointing to the first element of an array. ... so we have to start adding more context. ... type "pointer to char", rather than "array MISSING_SIZE of char". ...
    (comp.lang.c)