Well, what is "money"?  (And no, I don't mean that in a philosphical sense.)
You say it's "non NULL".  Does that mean it's a pointer?  If so, then why are
you printing it with %ld?  Is it really an integer?  If so, is it a plain old
"int"?  If so, then that's a two-byte value, and you're trying to print it as a

4-byte value, skewing up the varargs parsing.

Other than that, I'm out of guesses.

-- Keith Rollin
-- Palm OS Emulator engineer






Steve Orens <[EMAIL PROTECTED]> on 02/09/2001 12:48:01 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Steve Orens <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:    (Keith Rollin/US/PALM)
Subject:  ShlPrintf bus error



greetings,

I am getting a bus error when I execute the following line of code...

    ShlPrintf("money: $%ld, name: %s\n", money, object->GetName());

both money and object->GetName() are valid and non NULL. in fact, other
combinations of this command work just fine (just the %ld, several %ld, just
the %s).

Is there some problem with logging integers and strings to the console
window in the same function?

in general, is there more documentation on using the Console window for
printing out debug information programmatically? In ShellCmd.h there are
functions that would appear to help, but there are no comments and I can't
find any documentation on that part of the Console window. Just looking for
some additional info.

thanks,
steve





-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to