objective c - obj_msgSend function pointer crash when build with 64bit arm64 -


Actually my basic code works well with Xcode 5.0.2 and is also great for sending app stores:

  objc_msgSend (self.target, self.successAction, category);  

This line crashes with Xcode5.1 Beta 5. I got the solution to fix the accident:

  // Solution ID (* response) (id, sel, id) = (id (*) (id, sel, id)) objc_msgSend; Feedback (self.target, self.successAction, category);  

And when using the recommended solution I would like to use Xcode 5 or Xcode5.1beta to test on the device (iPhone 5s) or simulator (32 bit or 64 bit) The problem is not found. Architectures set in Build Settings "Standard Architecture in XX5 (ARM 7, ARM 7)" and "Standard Architecture (ARM 7, ARM 7, AR64)".

However, my new version of the app is ready for sale on the App Store today and it crashes on every device (iPhone 5S, 5, 4S) (according to Crashcat report). Since I do not get an accident using Xcode (build on real device), I do not know whether I fix the problem or not before reviewing the apple.

Finally, I can reproduce the accident right now. Simply edit the scheme and replace "Run YOURAPPNAME.play" from "debug to release".

And immediately after reproducing this bug, I know how to fix it, since my selector works type is zero (does not return anything), only copy the question to me Should not (using "ID").

By changing:

  ID (* response) (id, sel, id) = (id (*) (id, sel, id)) objc_msgSend; Feedback (self.target, self.successAction, category); From  

:

  zero (* response) (id, sel, id) = (zero (*) (id, sel, id)) objc_msgSend ; Feedback (self.target, self.successAction, category);  

This fixes !! Or thanks to a one-line code:

  ((zero (*) (id, sel, id)) objc_msgSend (self.target, self.successAction, category);  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -