[comp.sys.apollo] NCS/RPC Question

joshua@athertn.Atherton.COM (Flame Bait) (09/17/90)

I'm trying to get an NCS/RPC application written.  I've got a client
and server which are almost identical to the binoplu example.

Whenever I try to run the client I get this error:

*** Exiting: exception caught by PFM system cleanup handler
*** odd address error (OS/fault handler)

The binoplu example runs on my machine, so the location broker must be
working.  I copied most of my code from pages 34-36 of NETWORK 
COMPUTING SYSTEM REFERENCE MANUAL by Kong et al.

My specific questions are:
    Does this error mean something specific?  Or is it a SNAFU type message?
    Are there typos in the book which might be biting me?

A slightly more general question is this:
    How do I specify (in NIDL) a routine which will return a variable
    number of integers, when the exact number will only be known by
    the server routine at run time.  What I want is something like this:

    int cr$ints(
        handle_t [in] h ,
        int [out] *osize , 
        int [out,last_is(osize)] odata[]
    ) ;

    This doesn't work, since osize must be an [in,out] paramter or 
    nidl will not accept it.  Because of problem one, I do not know
    if this will work at run time at all.  (Is this causing problem
    one?)

This is all happening on a Sun 3/60 running SunOS 4.0.3 and NCK/NIDL 1.5.1.

Thanks for any help.  

Joshua Levy (joshua@atherton.com)

krowitz@RICHTER.MIT.EDU (David Krowitz) (09/18/90)

Odd address errors are hardware detected errors. Some, but not all, CPU's
require integer and floating point operands to be "naturally alligned", ie.
16-bit integers must start on even memory addresses, 32-bit integers must
start on a memory address which is evenly divisible by 4, etc. 

The error message you are getting indicates that the routine which trapped
the error tried to access an integer or floating point number that was not
properly aligned. 


 -- David Krowitz

krowitz@richter.mit.edu   (18.83.0.109)
krowitz%richter.mit.edu@eddie.mit.edu
krowitz%richter.mit.edu@mitvma.bitnet
(in order of decreasing preference)

derstad@CIM-VAX.HONEYWELL.COM ("DAVE ERSTAD") (09/22/90)

>  The error message you are getting indicates that the routine which trapped
>  the error tried to access an integer or floating point number that was not
>  properly aligned. 

Well, yes, that is technically what has happened.  From a practical
standpoint it most often means a pointer variable has trash (as opposed
to the actual object being misaligned).  

Dave Erstad
Honeywell SSEC
DERSTAD@cim-vax.honeywell.com