[comp.sys.mac.programmer] Odd Address error with C

jkeegan@hawk.ulowell.edu (Jeff Keegan) (05/15/89)

I've been working on a project for one of my classes on the Mac and I am in
a major rush to complete it. This is the first project that I have had to do
in C on the Mac (I'm used to Lightspeed Pascal), and because of this I'm
having alot of stupid little problems (forgetting an & here and there, etc).
I know this is just some small bug but it has been bugging me for about 2
days now and I feel like I'm running into a brick wall.

I have a routine called UpdateFilm that basically calls up a dialog box,
handles all the modaldialog calls, and then at the end optionally saves the
changes to a file. I'm randomly getting the error

  Odd Address

every once in a while. I'm aware what this means on the assembly level but
it doesn't help me much now (I'm not doing anything that I can see that
would cause it.. I'm not passing pointers to executable code or anything)..

I'm sure there are many reasons why I could be getting the error, but the
part that bugs me is this: I've stepped through with the debugger and the
error doesn't usually come until the very end of the procedure I'm in.
Right on the last } it bombs. I'm not sure how C passes it's arguments to
procedures so for all I know it could be a problem with the data I passed,
but I doubt it. I've encountered Odd Address hundreds of times in the past
but I'm blanking out trying to remember what type of error this usually
indicates.. Does anyone have any idea what it might be? I know this is a
hyper-general question but I'm facing a deadline here and can't think of any
other reasons for the crash..

Thanks..

p.s. replies to jkeegan@hawk.ulowell.edu would be appreciated.

-------------------------------------------------------------------------------
| Jeff Keegan                | I clutch the wire fence until my fingers bleed |
| jkeegan@hawk.ulowell.edu   | A wound that will not heal                     |
|----------------------------| A heart that cannot feel                       |
| This space intentionally   | Hoping that the horror will receed             |
| left blank                 | Hoping that tomorrow we'll all be freed  -RUSH |
-------------------------------------------------------------------------------