Thanks for your help on this!
In regards to the same problem, how do I access code in another segment
when globals are not enabled?
Also, the code that I am trying to run has no globals or statics in it
either. And finally, I am using the "smart" memory model and I have
multiple segments in my project.
Thanks,
Chris
-----Original Message-----
From: [EMAIL PROTECTED]@RIAG
Sent: Saturday, January 29, 2000 4:16 AM
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Subject: RE: POSE and find crash
Thanks, that helps a little more.
Disassembling the opcode you provided, it turns out to be "JSR xxx(A5)",
where
JSR means "jump to subroutine" and "xxx" is an offset that appears in
memory
after the opcode. It actually doesn't matter what the offset is. The
relevent
information is that you're accessing A5, apparently in an attempt to
jump to
code in a different segment.
Using Poser 3.0a3 would help in detecting this problem. It does a quick
check of
the program counter on JSR (and other) opcodes. With that check,
instead of
crashing, you would have received an error message from Poser along the
lines of
"%Application %version is attempting to change the emulated program
counter to
%address. This address is invalid because %reason". At that point you
could
have dropped into a debugger, gotten a stack trace, and found the
inter-segment
call.
-- Keith Rollin
-- Palm OS Emulator engineer
"Chris Yourch" <[EMAIL PROTECTED]> on 01/28/2000 06:31:03 PM
Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent by: "Chris Yourch" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
cc: (Keith Rollin/HQ/3Com)
Subject: RE: POSE and find crash
Hi,
I am running version 2.1d29 of the emulator under Windows NT workstation
4.0 SP6. I am using codewarrior 4.0.1 build 0436.
To cause the crash I run the global Find when my application is not
active.
When my PilotMain gets called with the find request I call "new" to
allocate an instance of a database table. Before the new returns I get a
Windows application error msgbox which says "The instruction at
"0x0044c21c" referenced memory at "0x8001adda". The memory could not be
read.".
Here is the call stack, starting at the top with the values of the
variables:
do_get_mem_word(void* a) a == 0x8001adda
(machdep_memory.h,
line 75)
get_iword (uae_s32 o) o == 0 (newcpu.h, line
142)
Emulator::Execute() opcode == 20141 (CPU_REG.cpp, line
801)
CPU::run_undetached() breakReason == 128 (CPU_MT.cpp,
line
537)
omni_thread_wrapper(void* ptr) return_value == 0xc0502938
(nt.cpp, line 491)
I hope this is enough information.
Thanks,
Chris
-----Original Message-----
From: [EMAIL PROTECTED]@RIAG
Sent: Friday, January 28, 2000 4:12 PM
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Subject: Re: POSE and find crash
Chris,
Can you clue us in on what version of Poser you're using? What
platform
you're
running it on? What the value of "a" ? What you're doing to cause the
problem/crash? I greatly laud and appreciate your efforts to track
down
the
problem to the particular line that's crashing, but without a bigger
context,
there's not much anyone can do about it. All you're telling us is
that
something
is passing do_get_mem_word an invalid pointer.
-- Keith Rollin
-- Palm OS Emulator engineer
"Chris Yourch" <[EMAIL PROTECTED]> on 01/28/2000 07:17:53 AM
Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent by: "Chris Yourch" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
cc: (Keith Rollin/HQ/3Com)
Subject: POSE and find crash
Hi,
I crash the emulator (access violation) when my app is not the one
running. I have checked the usual culprits, i.e. no globals or
statics
are being used and I am not overwriting any memory. Also, no
virtual
functions are being called and finally, I have plenty of stack
space.
What I am doing is making a call to new and then it crashes the
emulator.
I compiled a debug version of the emulator, ran a find again and
it
crashed in the following location:
module: machdep_memory.h
function: do_get_mem_word()
line: 75
Does this mean anything to anyone familiar with the emulator?
Thanks,
Chris
P.S. Here is the code for the function:
static __inline__ uae_u16 do_get_mem_word(void* a)
{
return *(uae_u16*) a;
}
--
For information on using the Palm Developer Forums, or to
unsubscribe,
please
see http://www.palm.com/devzone/mailinglists.html
--
For information on using the Palm Developer Forums, or to
unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html
--
For information on using the Palm Developer Forums, or to unsubscribe,
please
see http://www.palm.com/devzone/mailinglists.html
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html