Re: Unrecognized selector in release build, not in debug build

2013-07-23 Thread Maxthon Chan
NSArrayI is one of the private subclasses of NSArray (not NSMutableArray) so 
there is no - (void)removeObject method. Consider check if your array is really 
mutable and - (instancetype)mutableCopy if needed.

Sent from my iPhone

 On 2013年7月10日, at 9:39, Rick Mann rm...@latencyzero.com wrote:
 
 I'm having a hard time tracking this down:
 
 Jul  9 18:33:10 iPad-4G-64GB MatterScan[189] Error: -[__NSArrayI 
 removeObject:]: unrecognized selector sent to instance 0x1f097040
 
 It only happens in release builds, and the call stack shown in Xcode while 
 debugging shows no source. I can't figure out where the call is:
 
 #00x39f9f960 in objc_exception_throw ()
 #10x320fee06 in -[NSObject(NSObject) doesNotRecognizeSelector:] ()
 
 libobjc.A.dylib`objc_exception_throw:
 0x39f9f960:  push   {r4, r5, r6, r7, lr}
 0x39f9f962:  addr7, sp, #12
 0x39f9f964:  movr4, r0
 0x39f9f966:  movs   r0, #16
 0x39f9f968:  blx0x39fab854; symbol stub for: -[NSObject 
 isEqual:]
 0x39f9f96c:  movr5, r0
 0x39f9f96e:  movw   r0, #29278
 0x39f9f972:  movt   r0, #507
 0x39f9f976:  addr0, pc
 0x39f9f978:  ldrr1, [r0]
 0x39f9f97a:  movr0, r4
 0x39f9f97c:  blxr1
 0x39f9f97e:  movw   r1, #29226
 0x39f9f982:  movr6, r5
 0x39f9f984:  movt   r1, #507
 0x39f9f988:  strr0, [r5]
 0x39f9f98a:  addr1, pc
 0x39f9f98c:  add.w  r0, r1, #8
 0x39f9f990:  strr0, [r6, #4]!
 0x39f9f994:  movr0, r4
 0x39f9f996:  bl 0x39f9b8d8; object_getClassName
 0x39f9f99a:  strr0, [r5, #8]
 0x39f9f99c:  movs   r0, #0
 0x39f9f99e:  cmpr4, #0
 0x39f9f9a0:  it ne
 0x39f9f9a2:  ldrne  r0, [r4]
 0x39f9f9a4:  strr0, [r5, #12]
 0x39f9f9a6:  movr0, r4
 0x39f9f9a8:  nop
 0x39f9f9aa:  nop
 0x39f9f9ac:  movw   r2, #5
 0x39f9f9b0:  movr0, r5
 0x39f9f9b2:  movt   r2, #0
 0x39f9f9b6:  movr1, r6
 0x39f9f9b8:  addr2, pc
 0x39f9f9ba:  blx0x39fab8a4; symbol stub for: +[NSObject 
 instanceMethodForSelector:]
 0x39f9f9be:  nop
 
 
 I tried putting a symbolic breakpoint on -[__NSArrayI removeObject:], but it 
 doesn't stop any earlier. I don't actually call remove-anything in my code 
 anywhere.
 
 Any suggestions? Thanks!
 
 
 -- 
 Rick
 
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/xcvista%40me.com
 
 This email sent to xcvi...@me.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-10 Thread Uli Kusterer
On Jul 10, 2013, at 4:01 AM, Rick Mann rm...@latencyzero.com wrote:
 Yes, I'm aware. That's everything Xcode shows; that's the full stack. I had 
 hoped breaking on that message would break at the point of the send, not at 
 the point of handling the unrecognized selector. 

Is this backtrace in Xcode's debugger, or in a log file? If the former, have 
you tried moving the slider at the bottom of the window? It sometimes gets 
changed accidentally and then tries to be smart and remove irrelevant symbols 
(which might just be relevant in your case).

Cheers,
-- Uli Kusterer
The Witnesses of TeachText are everywhere...
http://www.zathras.de


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-10 Thread Uli Kusterer
On Jul 10, 2013, at 6:04 AM, Rick Mann rm...@latencyzero.com wrote:
 First, Xcode's project-wide search is returning only one instance of remove 
 for a Textual-contain-search-term-case-insensitive search. Grep returns 
 hundreds.

 You've probably set the search options wrong. There's textual, regex, symbol 
definitions and symbol references that you can search for (you see the options 
in the little magnifying glass menu under Show Find Options). If you pick 
e.g. Symbol Definitions and type in remove, you probably get one function 
somewhere instead of removeObject: call sites.

Cheers,
-- Uli Kusterer
The Witnesses of TeachText are everywhere...
http://www.zathras.de


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-10 Thread Rick Mann

On Jul 10, 2013, at 09:58 , Uli Kusterer witness.of.teacht...@gmx.net wrote:

 Is this backtrace in Xcode's debugger, or in a log file? If the former, have 
 you tried moving the slider at the bottom of the window? It sometimes gets 
 changed accidentally and then tries to be smart and remove irrelevant symbols 
 (which might just be relevant in your case).

Yup, I've finally learned to check this first. It was all the way to the right, 
so nothing was being hidden. (I really hate that slider.)

-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-10 Thread Gary L. Wade
Is it possible you've got an array controller (or other related object)
that got over-released and a pointer for it is now pointing at something
else? Or maybe you were converting from a pre-NSObjectController code base
(using a subclass of NSObject like in the old days) to
NSObjectController or its related subclasses and something didn't get
converted over or compiled right for your release build?
--
Gary L. Wade
http://www.garywade.com/



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-10 Thread Rick Mann

On Jul 10, 2013, at 12:53 , Gary L. Wade garyw...@desisoftsystems.com wrote:

 Is it possible you've got an array controller (or other related object)
 that got over-released and a pointer for it is now pointing at something
 else? Or maybe you were converting from a pre-NSObjectController code base
 (using a subclass of NSObject like in the old days) to
 NSObjectController or its related subclasses and something didn't get
 converted over or compiled right for your release build?

Thanks, Gary. I did eventually find it. It was one of those a-ha! moments. I 
remembered I had some release-only code that did, in fact, try to remove an 
object from an immutable array. Kicking myself because I distinctly remember 
thinking as I wrote it to get a mutable copy first, which I failed to do.

A combination of bad debugging info and broken search made it very hard to find.

-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-09 Thread Jens Alfke

On Jul 9, 2013, at 6:39 PM, Rick Mann rm...@latencyzero.com wrote:

 It only happens in release builds, and the call stack shown in Xcode while 
 debugging shows no source. I can't figure out where the call is:
 
 #00x39f9f960 in objc_exception_throw ()
 #10x320fee06 in -[NSObject(NSObject) doesNotRecognizeSelector:] ()

What’s frame #2? That’s the code that’s sending -removeObject:. The frames you 
listed are just the ones raising the exception.

 I tried putting a symbolic breakpoint on -[__NSArrayI removeObject:], but it 
 doesn't stop any earlier. I don't actually call remove-anything in my code 
 anywhere.

Well, there’s no such method — that’s exactly what that exception means — so 
it’s not surprising that you can’t set a breakpoint on it :)

—Jens
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-09 Thread Rick Mann
Yes, I'm aware of this fact. The problem is, I can't tell where the call is 
happening. 

Sent from my iPhone

On Jul 9, 2013, at 18:44, Maxthon Chan xcvi...@me.com wrote:

 NSArrayI is one of the private subclasses of NSArray (not NSMutableArray) so 
 there is no - (void)removeObject method. Consider check if your array is 
 really mutable and - (instancetype)mutableCopy if needed.
 
 Sent from my iPhone
 
 On 2013年7月10日, at 9:39, Rick Mann rm...@latencyzero.com wrote:
 
 I'm having a hard time tracking this down:
 
 Jul  9 18:33:10 iPad-4G-64GB MatterScan[189] Error: -[__NSArrayI 
 removeObject:]: unrecognized selector sent to instance 0x1f097040
 
 It only happens in release builds, and the call stack shown in Xcode while 
 debugging shows no source. I can't figure out where the call is:
 
 #00x39f9f960 in objc_exception_throw ()
 #10x320fee06 in -[NSObject(NSObject) doesNotRecognizeSelector:] ()
 
 libobjc.A.dylib`objc_exception_throw:
 0x39f9f960:  push   {r4, r5, r6, r7, lr}
 0x39f9f962:  addr7, sp, #12
 0x39f9f964:  movr4, r0
 0x39f9f966:  movs   r0, #16
 0x39f9f968:  blx0x39fab854; symbol stub for: -[NSObject 
 isEqual:]
 0x39f9f96c:  movr5, r0
 0x39f9f96e:  movw   r0, #29278
 0x39f9f972:  movt   r0, #507
 0x39f9f976:  addr0, pc
 0x39f9f978:  ldrr1, [r0]
 0x39f9f97a:  movr0, r4
 0x39f9f97c:  blxr1
 0x39f9f97e:  movw   r1, #29226
 0x39f9f982:  movr6, r5
 0x39f9f984:  movt   r1, #507
 0x39f9f988:  strr0, [r5]
 0x39f9f98a:  addr1, pc
 0x39f9f98c:  add.w  r0, r1, #8
 0x39f9f990:  strr0, [r6, #4]!
 0x39f9f994:  movr0, r4
 0x39f9f996:  bl 0x39f9b8d8; object_getClassName
 0x39f9f99a:  strr0, [r5, #8]
 0x39f9f99c:  movs   r0, #0
 0x39f9f99e:  cmpr4, #0
 0x39f9f9a0:  it ne
 0x39f9f9a2:  ldrne  r0, [r4]
 0x39f9f9a4:  strr0, [r5, #12]
 0x39f9f9a6:  movr0, r4
 0x39f9f9a8:  nop
 0x39f9f9aa:  nop
 0x39f9f9ac:  movw   r2, #5
 0x39f9f9b0:  movr0, r5
 0x39f9f9b2:  movt   r2, #0
 0x39f9f9b6:  movr1, r6
 0x39f9f9b8:  addr2, pc
 0x39f9f9ba:  blx0x39fab8a4; symbol stub for: +[NSObject 
 instanceMethodForSelector:]
 0x39f9f9be:  nop
 
 
 I tried putting a symbolic breakpoint on -[__NSArrayI removeObject:], but it 
 doesn't stop any earlier. I don't actually call remove-anything in my code 
 anywhere.
 
 Any suggestions? Thanks!
 
 
 -- 
 Rick
 
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/xcvista%40me.com
 
 This email sent to xcvi...@me.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-09 Thread Rick Mann
Yes, I'm aware. That's everything Xcode shows; that's the full stack. I had 
hoped breaking on that message would break at the point of the send, not at the 
point of handling the unrecognized selector. 

Sent from my iPhone

On Jul 9, 2013, at 18:46, Jens Alfke j...@mooseyard.com wrote:

 
 On Jul 9, 2013, at 6:39 PM, Rick Mann rm...@latencyzero.com wrote:
 
 It only happens in release builds, and the call stack shown in Xcode while 
 debugging shows no source. I can't figure out where the call is:
 
 #0   0x39f9f960 in objc_exception_throw ()
 #1   0x320fee06 in -[NSObject(NSObject) doesNotRecognizeSelector:] ()
 
 What’s frame #2? That’s the code that’s sending -removeObject:. The frames 
 you listed are just the ones raising the exception.
 
 I tried putting a symbolic breakpoint on -[__NSArrayI removeObject:], but it 
 doesn't stop any earlier. I don't actually call remove-anything in my code 
 anywhere.
 
 Well, there’s no such method — that’s exactly what that exception means — so 
 it’s not surprising that you can’t set a breakpoint on it :)
 
 —Jens
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-09 Thread Charles Srstka
On Jul 9, 2013, at 9:00 PM, Rick Mann rm...@latencyzero.com wrote:

 Yes, I'm aware of this fact. The problem is, I can't tell where the call is 
 happening. 
 
 Sent from my iPhone

Have you tried putting a breakpoint on objc_exception_throw or -[NSObject 
doesNotRecognizeSelector:] ?

Charles

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-09 Thread Scott Ribe
On Jul 9, 2013, at 7:39 PM, Rick Mann wrote:

 It only happens in release builds, and the call stack shown in Xcode while 
 debugging shows no source. I can't figure out where the call is:

Sometimes when the displayed call stack seems to make no sense, it's because 
you corrupted the stack. Do you have any stack-allocated arrays?

-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-09 Thread Jens Alfke

On Jul 9, 2013, at 7:08 PM, Charles Srstka cocoa...@charlessoft.com wrote:

 Have you tried putting a breakpoint on objc_exception_throw

+1. That’s vital in any project. In Xcode 4 you can easily do this by just 
going into the breakpoints tab and pressing the little “+” button at the bottom.

  or -[NSObject doesNotRecognizeSelector:] ?

That probably wouldn’t give any different results in this case; it would just 
get it an instant earlier. But it’s worth a try.

—Jens
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-09 Thread Rick Mann

On Jul 9, 2013, at 19:14 , Scott Ribe scott_r...@elevated-dev.com wrote:

 Sometimes when the displayed call stack seems to make no sense, it's because 
 you corrupted the stack. Do you have any stack-allocated arrays?

I have a number of @[ ] constructs in my code…

-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-09 Thread Rick Mann
Light-bulb.

First, Xcode's project-wide search is returning only one instance of remove 
for a Textual-contain-search-term-case-insensitive search. Grep returns 
hundreds.

Second, I just remembered some release-only code I wrote that does, in fact, 
try to remove from an array, and I forgot to add the -mutableCopy to the array 
I was starting with.

I'm so dumb. But Xcode didn't help with its broken search.

Thanks for the suggestions! Really appreciate it.

On Jul 9, 2013, at 19:50 , Jens Alfke j...@mooseyard.com wrote:

 
 On Jul 9, 2013, at 7:08 PM, Charles Srstka cocoa...@charlessoft.com wrote:
 
 Have you tried putting a breakpoint on objc_exception_throw
 
 +1. That’s vital in any project. In Xcode 4 you can easily do this by just 
 going into the breakpoints tab and pressing the little “+” button at the 
 bottom.
 
 or -[NSObject doesNotRecognizeSelector:] ?
 
 That probably wouldn’t give any different results in this case; it would just 
 get it an instant earlier. But it’s worth a try.
 
 —Jens
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/rmann%40latencyzero.com
 
 This email sent to rm...@latencyzero.com


-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com