Skip to content

Crash using library : [__NSMallocBlock__ handleClientConnectionStateChange:]: unrecognized selector sent to instance 0x17044e460 #108

@fceldeiro

Description

@fceldeiro

PubNub version : PubNub (= 3.7.11)

In my app i do the following (viewDidLoad)

"PNConfiguration *configuration = [PNConfiguration configurationForOrigin:kPubNubURL
                                                                  publishKey:kPubNubPublishKey
                                                                subscribeKey:kPubNubSubscribeKey
                                                                   secretKey:kPubNubSecretKey
                                                                   cipherKey:kPubNubCipherKey];
    configuration.useSecureConnection = YES;

self.pubNub = [PubNub connectingClientWithConfiguration:configuration andSuccessBlock:^(NSString *origin) {
  [self.pubNub setDelegate:self];
  [self.pubNub setClientIdentifier:self.myselfChatMember.chatId];
  self.channel = [PNChannel channelWithName:[self channelKey] shouldObservePresence:NO];
  [self.pubNub subscribeOn:@[self.channel]]; 
  [self loadChatHistory];

    } errorBlock:^(PNError *error) {
        DLog("%@",error);
    }];"

Then in my dealloc

[self.pubNub setDelegate:nil];
[self.pubNub unsubscribeFrom:@[self.channel]];
[self.pubNub disconnect];
self.pubNub = nil;
}

If i pop that controller ocasionally i get a crash.
Seems like after the PubNub object is released is still trying to call a notification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions