Skip to content

App often crashes at INVALID_STATE_ERR #9

Open
@angeloh

Description

1   CoreFoundation  __exceptionPreprocess + 126
2   libobjc.A.dylib objc_exception_throw + 34
3   PeerIM  -[ComGoodowRealtimeChannelImplWebSocketBus sendWithComGoodowRealtimeJsonJsonObject:] (WebSocketBus.m:130)
4   PeerIM  -[ComGoodowRealtimeChannelImplReconnectBus sendWithComGoodowRealtimeJsonJsonObject:] (ReconnectBus.m:65)
5   PeerIM  -[ComGoodowRealtimeChannelImplWebSocketBus sendPing] (WebSocketBus.m:147)

I notice it throws an exception here:

WebSocketBus.m:

- (void)sendWithComGoodowRealtimeJsonJsonObject:(id<ComGoodowRealtimeJsonJsonObject>)msg {
  if ([self getReadyState] != ComGoodowRealtimeChannelStateEnum_get_OPEN()) {
    @throw [[JavaLangIllegalStateException alloc] initWithNSString:@"INVALID_STATE_ERR"];
  }
  [((id<ComGoodowRealtimeCoreWebSocket>) nil_chk(webSocket_)) sendWithNSString:[((id<ComGoodowRealtimeJsonJsonObject>) nil_chk(msg)) toJsonString]];
}

Why? Also, this exception happens when the app goes to background for a while and comes back to foreground.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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