You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have seen a case where code in SdlSession checks for a null SdlConnection object and if not null then sends a message but still results in NullPointerException. This seems like a race condition between the session sending a packet and the session being closed because the line right before the exception is a null check on the variable being used.
In my case, video was streaming when the session was being closed.
04-13 16:05:46.490 32228 716 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.smartdevicelink.SdlConnection.SdlConnection.sendMessage(com.smartdevicelink.protocol.ProtocolMessage)' on a null object reference
04-13 16:05:46.490 32228 716 E AndroidRuntime: at com.smartdevicelink.SdlConnection.SdlSession.sendMessage(SdlSession.java:496)
04-13 16:05:46.490 32228 716 E AndroidRuntime: at com.smartdevicelink.SdlConnection.SdlSession.sendStreamPacket(SdlSession.java:388)
04-13 16:05:46.490 32228 716 E AndroidRuntime: at com.smartdevicelink.streaming.video.RTPH264Packetizer.run(RTPH264Packetizer.java:244)
04-13 16:05:46.490 32228 716 E AndroidRuntime: at java.lang.Thread.run(Thread.java:818)
Reproduction Steps
Random
Cause SdlSession to close while it is on the verge of sending and RPC message
Timing is important
Terminate SDLCore/HMI at the correct time or block the BT (or other) connections between HU and HS
Expected Behavior
SdlProxyService should not crash
Observed Behavior
SdlProxyService crashes with NPE
OS & Version Information
Android Version: 5.0.1
SDL Android Version: 4.5 (develop branch)
Testing Against: in-house HU emulator with internal SDLCore build based on develop branch
Test Case, Sample Code, and / or Example App
The text was updated successfully, but these errors were encountered:
Bug Report
I have seen a case where code in SdlSession checks for a null SdlConnection object and if not null then sends a message but still results in NullPointerException. This seems like a race condition between the session sending a packet and the session being closed because the line right before the exception is a null check on the variable being used.
In my case, video was streaming when the session was being closed.
NPE location
Reproduction Steps
Random
Expected Behavior
SdlProxyService should not crash
Observed Behavior
SdlProxyService crashes with NPE
OS & Version Information
Test Case, Sample Code, and / or Example App
The text was updated successfully, but these errors were encountered: