Re: Determining how the app is run (intel/ppc/rosetta/os version)?
Re: Determining how the app is run (intel/ppc/rosetta/os version)?
- Subject: Re: Determining how the app is run (intel/ppc/rosetta/os version)?
- From: Gerben Wierda <email@hidden>
- Date: Sun, 21 May 2006 15:25:19 +0200
On May 21, 2006, at 14:43 , Jim Correia wrote:
On May 21, 2006, at 5:51 AM, Gerben Wierda wrote:
Because my app ran fine as UB in 10.4.3 on a DTK even though there
was an unexplained problem. This problem I could not solve (deep
inside Apple's Frameworks somehow an NSData object was produced with
a negative length, to put it shortly) but luckily it only gave a
warning in console.app
What was what warning?
Since NSData's length is unsigned, how did you determine that an
NSData with a negative length was produced?
My guess is that it was negative because I got an NSData whith a length
which was several millions or billions which if I remember correctly in
2 bits complement is equivalent to a small (now that I think of it, is
this correct? I shoul ddouble check the value before drawing such
tentative conclusions/guessing my way around) negative value. So,
'putting it shortly' I am getting an NSData object that should contain
a small chunk of stderr output from my subprocess (received via a named
pipe by a separate thread to get around
AutorizationExecuteWithPrivileges limitations) with a length of 20 or
so. Instead, I get an object which says it has length of several
million/billion bytes or so (plain silly), but not really random
lengths, they all are 'huge' and they felt like unsigned
interpretations of signed negative values to me. This object also
produces a nil NSString when used to convert it to a string. In other
words, the NSData object is corrupted.
The original warning/exception was:
2006-02-27 22:17:52.037 i-Installer[10507] -[NSBigMutableString
replaceCharactersInRange:withString:] called with nil argument. For
apps linked on Tiger this will raise an exception. For earlier apps
it will produce this one-time warning and continue with existing
behavior (which is undefined).
When adding the resulting nil string to the text view.
G
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden