“unrecognized selector ” error sometimes when -[SystemController handleMessage:]

Post here your questions about the Objective-C API for SFS2X

Moderators: Lapo, Bax

WillyChunk
Posts: 10
Joined: 03 Aug 2017, 04:53

Re: “unrecognized selector ” error sometimes when -[SystemController handleMessage:]

Postby WillyChunk » 04 Aug 2017, 09:14

it is my fault to spell a wrong "handleResponse",just ignore it.
User avatar
Lapo
Site Admin
Posts: 19599
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: “unrecognized selector ” error sometimes when -[SystemController handleMessage:]

Postby Lapo » 04 Aug 2017, 09:16

Rob wrote:
Lapo wrote:I have no idea what that refers to... is it a method in your code?

I'm not OP. :D I was just pointing out a possible cause for the problem.

Yeah, sorry :mrgreen:
Lapo
--
gotoAndPlay()
...addicted to flash games
WillyChunk
Posts: 10
Joined: 03 Aug 2017, 04:53

Re: “unrecognized selector ” error sometimes when -[SystemController handleMessage:]

Postby WillyChunk » 07 Aug 2017, 02:45

Hi, lapo. i have found a easy to avoid this crash. By using the "Extension" feature of Objective-c language, i can add an function named “- (void)fnCallExtension:(id)sender” in a “SystemController+Extension.h” i create. i will seek more better way to solve this.but it will be ok ,i think.

Here the code i use:
================Header file :[SystemController+Extension.h]==============================

#import <Foundation/Foundation.h>
#include <SFS2XAPIIOS/SystemController.h>

@interface SystemController (Extension)

@end


==================implementation file : [SystemController+Extension.m]======================
#import "SystemController+Extension.h"

@implementation SystemController (Extension)
- (void)fnCallExtension:(id)sender {
//#ifdef DEBUG
// NSString *strError = [NSString stringWithFormat:@"Crash Log:%@", [NSThread callStackSymbols]];
// NSAssert(NO, strError);
//#endif
}

@end

-----------------------------------------
Thanks for your attention these days.
Best Regards.
User avatar
Lapo
Site Admin
Posts: 19599
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: “unrecognized selector ” error sometimes when -[SystemController handleMessage:]

Postby Lapo » 07 Aug 2017, 08:41

Thanks for the update.
Yes this should work as a workaround.

We should be able to improve the exception handling for this specific issue in the next release. It remains a mystery how it gets triggered, however. If you find a way to reproduce it let us know.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 4 guests