Skip to content

Socket.removeFromSendBuffer --> NullPointerException #102

@stasoption

Description

@stasoption

Hello. I have faced with the crash after the device was sleeping for a while.

Steps to reproduce:
1 - Start socket session in an app
2 - Switch a device to the sleep mode
3 - Exit from sleep mode after a while

E AndroidRuntime:   at java.lang.Thread.run(Thread.java:764)
E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E AndroidRuntime:    at okhttp3.internal.connection.RealCall$AsyncCall.run(SourceFile:519)
E AndroidRuntime:    at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(SourceFile:197)
E AndroidRuntime:    at okhttp3.internal.ws.RealWebSocket.failWebSocket(SourceFile:592)
E AndroidRuntime:    at org.phoenixframework.WebSocketTransport.onFailure(SourceFile:136)
E AndroidRuntime:    at org.phoenixframework.Socket$connect$3.invoke(SourceFile:320)
E AndroidRuntime:    at org.phoenixframework.Socket$connect$3.invoke(SourceFile:320)
E AndroidRuntime:    at org.phoenixframework.Socket.onConnectionError$JavaPhoenixClient(SourceFile:603)
E AndroidRuntime:    at org.phoenixframework.Socket.triggerChannelError(SourceFile:455)
E AndroidRuntime:    at org.phoenixframework.Channel.trigger$JavaPhoenixClient$default(SourceFile:392)
E AndroidRuntime:    at org.phoenixframework.Channel.trigger$JavaPhoenixClient(SourceFile:399)
E AndroidRuntime:    at org.phoenixframework.Channel.trigger$JavaPhoenixClient(SourceFile:409)
E AndroidRuntime:    at org.phoenixframework.Channel$10.invoke(SourceFile:206)
E AndroidRuntime:    at org.phoenixframework.Channel$10.invoke(SourceFile:214)
E AndroidRuntime:    at org.phoenixframework.Socket.removeFromSendBuffer$JavaPhoenixClient(SourceFile:471)
E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object kotlin.Pair.getFirst()' on a null object reference

Device: Samsung S8+ (9.0)
Version: com.github.dsrees:JavaPhoenixClient: 1.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions