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
Make temporary changes to the Linux tv-app, so it does not advertise any device name in the DN TXT Record (can be done in Advertiser_ImplMinimalMdns.cpp)
Discover the tv-app using the Android tv-casting-app.
Observe NullPointerException in Stacktrace 1 below.
Also, stacktrace 2 and 3 have been observed in other testing.
Generally, the Android tv-casting-app needs some defensive checks to avoid these crashes.
Stacktrace 1 (NPE)
02-23 09:35:53.683 17414 17744 E AndroidRuntime: java.lang.NullPointerException: Attempt to get length of null array
02-23 09:35:53.683 17414 17744 E AndroidRuntime: at java.lang.StringFactory.newStringFromBytes(StringFactory.java:101)
02-23 09:35:53.683 17414 17744 E AndroidRuntime: at com.chip.casting.DiscoveredNodeData.<init>(DiscoveredNodeData.java:54)
02-23 09:35:53.683 17414 17744 E AndroidRuntime: at com.chip.casting.NsdResolveListener.onServiceResolved(NsdResolveListener.java:67)
02-23 09:35:53.683 17414 17744 E AndroidRuntime: at android.net.nsd.NsdManager$ServiceHandler.handleMessage(NsdManager.java:456)
02-23 09:35:53.683 17414 17744 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
02-23 09:35:53.683 17414 17744 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:226)
02-23 09:35:53.683 17414 17744 E AndroidRuntime: at android.os.Looper.loop(Looper.java:313)
02-23 09:35:53.683 17414 17744 E AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:67)
Stacktrace 2 (listener not registered)
ERROR: matter: Matter discovery failed. Error 3 (NsdDiscoveryListener Discovery failed to start: Nsd Error code:4).
--------- beginning of crash
02-24 14:42:30.189 4940 5330 E AndroidRuntime: FATAL EXCEPTION: NsdManager
02-24 14:42:30.189 4940 5330 E AndroidRuntime: PID: 4940
02-24 14:42:30.189 4940 5330 E AndroidRuntime: java.lang.IllegalArgumentException: listener not registered
02-24 14:42:30.189 4940 5330 E AndroidRuntime: at com.android.internal.util.Preconditions.checkArgument(Preconditions.java:59)
02-24 14:42:30.189 4940 5330 E AndroidRuntime: at android.net.nsd.NsdManager.getListenerKey(NsdManager.java:496)
02-24 14:42:30.189 4940 5330 E AndroidRuntime: at android.net.nsd.NsdManager.stopServiceDiscovery(NsdManager.java:636)
02-24 14:42:30.189 4940 5330 E AndroidRuntime: at com.chip.casting.NsdDiscoveryListener.onStartDiscoveryFailed(NsdDiscoveryListener.java:114)
02-24 14:42:30.189 4940 5330 E AndroidRuntime: at android.net.nsd.NsdManager$ServiceHandler.handleMessage(NsdManager.java:412)
02-24 14:42:30.189 4940 5330 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
02-24 14:42:30.189 4940 5330 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:201)
02-24 14:42:30.189 4940 5330 E AndroidRuntime: at android.os.Looper.loop(Looper.java:288)
02-24 14:42:30.189 4940 5330 E AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:67)
Stacktrace 3 (Multicast lock under-locked)
02-24 14:41:28.898 4940 5201 W System.err: java.lang.RuntimeException: MulticastLock under-locked chipMulticastLock
02-24 14:41:28.913 4940 5201 W System.err: at android.net.wifi.WifiManager$MulticastLock.release(WifiManager.java:6929)
02-24 14:41:28.913 4940 5201 W System.err: at chip.platform.NsdManagerServiceResolver.removeServices(NsdManagerServiceResolver.java:367)
02-24 14:41:28.913 4940 5201 W System.err: at com.chip.casting.TvCastingApp.openBasicCommissioningWindow(Native Method)
Reproduction steps
Also, stacktrace 2 and 3 have been observed in other testing.
Generally, the Android tv-casting-app needs some defensive checks to avoid these crashes.
Stacktrace 1 (NPE)
Stacktrace 2 (listener not registered)
Stacktrace 3 (Multicast lock under-locked)
Bug prevalence
Every time with the above steps to repro
GitHub hash of the SDK that was being used
eff5773
Platform
android
Platform Version(s)
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: