Questions tagged [objc-message-send]
11 questions
7
votes
3 answers
Why is objc_msgSend causing an EXC_BAD_ACCESS?
I'm making a class, that given an object target, a selector to watch for, and a displayTitle will output a string in this format: @"displayTitle: object.selector". It then registers itself through KVO so that anytime the value of object.selector…

Eliza Wilson
- 1,031
- 1
- 13
- 38
5
votes
2 answers
Interception messages in Squeak
I am trying to understand better reflection in Smalltalk. I am using the latest version of Squeak (v4.3). I want to intercept every message sent to instances of one of my classes. I assumed that I could override the method…

Yann-Gaël Guéhéneuc
- 913
- 1
- 7
- 17
3
votes
1 answer
iOS 8 crash - objc_msgSend() selector name: respondsToSelector:
I have the following crash report. It only happens on iOS 8. I know exactly how to reproduce it but cannot for the life of me figure out where the problem is in my code. When I use a breakpoint and try to step through the app, the crash doesn't…

Zia
- 14,622
- 7
- 40
- 59
3
votes
1 answer
How to pass an array to an objc method that expects var args (eg ...')
I have a method in a library that looks like so:
- (id)initWithSomeObjects:(NSString *)something, ... NS_REQUIRES_NIL_TERMINATION;
I'd really like to call it with an array instead of var args, because the number of objects i'd like to pass in is…

Chris
- 39,719
- 45
- 189
- 235
2
votes
2 answers
viewing assembly code for Objective-c
I'm reading over this awesome article on friday.com. bbum shows some objective-c code and the corresponding assembly. How can I view objective-c assembly code?
Assume I'm compiling from the OS X Terminal using gcc.

SundayMonday
- 19,147
- 29
- 100
- 154
2
votes
2 answers
Basic message counting in Objective-c
In the following example how many messages are sent to myObject?
- (void) myMethod:(id) myObject
NSLog(@"%@", myObject.myStringProperty);
NSLog(@"%@", myObject.myStringProperty);
NSLog(@"%@", myObject.myStringProperty);
}
I'm just…

SundayMonday
- 19,147
- 29
- 100
- 154
2
votes
1 answer
How does casting and calling obj_msgSend() not invoke undefined behavior?
I observed the usage of objc_msgSend to send messages to Objective-C IDs from pure C. The usage is not well documented but I found an example here.
What I am confused by is the function pointer is casted to a different type with different arguments…

user16217248
- 3,119
- 19
- 19
- 37
2
votes
1 answer
SIGSEGV 'SEGV_MAPERR' crash inside my app that is on apple store
My app is on app store and i have enabled critticism inside my app. Following crash reported:
Threads
_________________________________
Thread: Unknown Name (Crashed)
0 libobjc.A.dylib 0x00000001973f7bdc objc_msgSend + 28
1…

Umair Suraj
- 480
- 11
- 22
1
vote
1 answer
Objective C selector table functions
I am trying to figure out which method objc_msgSend() will call.
While looking at assembly of any function in Appkit or Cocoa or Any framework based on Objective-C framework, I always get stucked at objc_msgSend().
Does any one has any idea how to…

RLT
- 4,219
- 4
- 37
- 91
1
vote
0 answers
SDWebImage Throwing 'Too Many Arguments' Error
When I run the app on simulator, it runs perfect. When I try to Archive to upload to AppStore I get error messages on SDWebImageManager that says SDWebImageManager.m:244:22: Too many arguments to function call, expected 0, have 5
I have gone into…

user717452
- 33
- 14
- 73
- 149
0
votes
1 answer
Debug objc_msgSend crash I cant reproduce
I've had some crash reports from bugsense for my iOS app I'm not able to reproduce and so not to debug. It happens more than 200 times a day so I guess it's quite serious.
I've read something about NSZombie but I'm not able to reproduce the crash so…

lorenzop
- 580
- 1
- 6
- 24