Sun 12 Sep 2004

NSInternalInconsistencyException

My Cocoa Distributed Objects code was getting some very odd crashes:

*** Uncaught exception: <NSInternalInconsistencyException> can't determine size of @:@

In an effort to improve efficiency, my server exposes methods that return pointers to the raw C structs it works with. The client collates some of these, then passes them back to the server to use them in a method call.

The safer way uses an NSObject wrapper around those pointers. This doesn't cause the crash.

It seems obvious now, but the problem was the Distributed Objects system. Returning a pointer causes it to either make a proxy or serialise the subject of the pointer, as the pointer isn't useful outside the server's address space. With the C object, it spazzed out.

In my case, where I'm not wanting to use the pointer in the client, this behaviour is very annoying! Casting to an int on both ends is fine, but non-portable. All I want is to pass a pointer by value!

So, my choices: find a way to pass pointers without Objective-C pissing about with them; use int; or stick to my inefficient object-passing approach.

*sigh*

Posted at 2004-09-12 12:10:43 by RichardLink to NSInternalInconsi…
Comments, trackbacks.

Couriers and my replacement P800

God bless TNT. When I say “6–10pm”, so I'm back from work and ready to do something about the delivery, I don't mean 9:30am (on a Sunday, no less!), just because you were “in the area”. Especially when it's a collection. I told him to wait while I blanked the phone.

I'm slightly disappointed in Orange Care, actually. They told me all sorts of things I had to give back, including the MS Duo, and then sent just a bare handset — not even with a lanyard! I'm keeping my damn memory card.

The camera button (the reason I got a replacement) works fine, but is smaller and more recessed, and not fitted straight in the hole. The “Internet” button is no longer blue, but silver and labelled, and is also small and wonky.

So now I have to restore my data, put a new screen protector in, and go to work. *sigh*

Posted at 2004-09-12 02:05:17 by RichardLink to Couriers and my re…
Comments, trackbacks.

Google
Web holygoat.co.uk
  • richard is: