Excellent questions. I was about to write up a description of some of
these more common things that the 3.5 debug roms will catch, so this is a
great place to start.
... Well, given the length of time between when I now and when I wrote that
previous line, I won't be able to give a full answer by the end of the day.
So a quick synopsis is better than waiting for the full story, I think.
The debug rom helps you find when you're drawing at incorrect times, by
having the drawing window be invalid - thus causing an immediate error.
The two messages about creating offscreen windows without a valid draw
window aren't errors, but they are warnings about doing things which are
quite likely to be mistakes or error-prone.
Why are these error-prone? Well, without an active window, the system has
to guess what bit depth you wanted when you called
WinCreateOffscreenWindow. On the debug rom, therefore, it gives you a
warning. On a release rom it'll use the depth of the display window, which
hopefully is right, but isn't necessarily. You should update your code so
that you're guaranteed of getting what you want.
It is also the case that sometimes (defined later) calling FrmDrawForm will
erase the contents of the form before drawing it. This means that if you
draw on your form and then call FrmDrawForm, what you drew might well be
erased. This erasing will happen on release roms when bringing up a form
which has the 'save behind' bit set, and for custom alerts, and modal
forms. It'll always be cleared on debug roms, and you should update your
code to do the drawing after calling FrmDrawForm so that your app will work
right in the past as well as the future.
Furthermore, when there's no active window to draw on, the system sets the
drawing window to an invalid value so that you'll get an immediate stop on
the code which is drawing at the wrong time - which usually will indicate a
subtle bug that needs fixing. You'll find places where you need to move
your code so that it draws in the right context, and/or doesn't draw
because doing so would be a waste of cycles, or whatever.
The debug roms do a bunch of things like this to find many interesting and
subtle bugs that you might not notice in testing. Highly recommended to
run gremlins with a debug rom; you'll be amazed at what it finds...
(I guess that was a bit more than a quick synopsis. Good. Hope it helped.)
-David Fedor
Palm Developer Support