I get the following error from the Emulator, right when my app starts, I
think when it tries to assign a value to the data field of a gadget:
"{programName} just read from memory location 0x01C70C68, causing a bus
error."
"A bus error means that the application accessed a memory location that is
not in RAM or ROM, nor corresponds to a memory-mapped hardware register."
I'm not having any luck finding what this error REALLY means - have I used
some memory pointer that I should not have used? Maybe something left over
from 3.1 of the SDK?
The debugger gets to the last line of the following code snippet before it
barfs, so I suspect a problem with the way I'm getting the pointer to
memory. In the debugger, the value of pItemNum is "\pC", only the "C" isn't
really a "C" - it's some symbol that just looks a lot like a C, so I suspect
garbage. Also, the value of pForm is 0x01C70C64, just 4 off the location of
the "bus error."
I definitely have a gadget in my resource with an ID of 1061.
Any help will be much appreciated!
void MainFormsDrawItems(FormPtr pForm) {
RectangleType rect;
UInt16 nGadgetID = 1061;
UInt16 nGadgetIndex;
UInt8 *pItemNum;
MemHandle hItemData;
nGadgetIndex = FrmGetObjectIndex(pForm, nGadgetID);
hItemData = FrmGetGadgetData(pForm, nGadgetIndex);
if (hItemData) {
pItemNum = MemHandleLock(hItemData);
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/