Re: Launching apps on 10.13.2

Graham Cox

Well, 10.13.2 is out, so I now have to solve this issue urgently.

Turns out it is in my code (no real surprise) and the issue seems to be with this:

[coder decodeArrayOfObjCType:@encode(float) count:m_count at:tempPattern];

Invoking this causes an internal exception : "*** -[_NSKeyedCoderOldStyleArray initWithCoder:]: unable to decode element in array of size (4) and count (2)”

This is very old code that has always worked up until now. I can certainly rewrite this code to use something more robust - but the problem is a lot of existing data that has written an archive this way can’t be read, and that is a problem. I need a way to read it, even if it’s only to convert it to another form.

The corresponding archiving step is:

float tempPattern[8];
[coder encodeArrayOfObjCType:@encode(float) count:[self count] at:tempPattern];

It makes me wonder if @encode(float) is actually legal, or perhaps I’ve just been getting away with it for years?

Anyway, if anyone can see a way I could read the contents of such an archive, I’d be very grateful.


Join to automatically receive all group messages.