Assigned
Status Update
Comments
ay...@google.com <ay...@google.com>
zi...@google.com <zi...@google.com> #2
I am not sure I understand the use case. how can the benchmark be code to real world scenario when it's not possible to do right now ? which scenario is it ?
In any case, since this would be for benchmarking, this would clearly not be available through the public DSL. We should find a semi-private way of doing this (maybe the private variant API object could offer that functionality for instance or a property).
Description
We confirmed that Ranging works normally using Multi Session.
However, I have confirmed that an error occurs when closing a Session.
I'll show you the error I'm getting with an example below.
Example1
1. prepareSession().collect in job1, prepareSession().collect in job2, job2.cancel, job1.cancel
This is the case of prepareSession().collect in order and then closing them in reverse order.
Result: job2 is closed success normally. However, if job1 try to close after job2 is closed, an error occurs.
FATAL EXCEPTION: main
Process: kr.co.geoplan.mobile.uwbjetpack, PID: 19586
androidx.core.uwb.exceptions.UwbSystemCallbackException: UWB backend system resulted in an error.
at androidx.core.uwb.helper.UwbHelperKt.handleApiException(UwbHelper.kt:50)
at androidx.core.uwb.impl.UwbClientSessionScopeImpl$prepareSession$1$1$1.invokeSuspend(UwbClientSessionScopeImpl.kt:140)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8757)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@3434413, Dispatchers.Main.immediate]
Example2
2. prepareSession().collect to job1, prepareSession().collect to job2, job1.cancel, job2.cancel
Again, after ranging Jobs in order, close job1 first.
Result: job1 is closed, but job2 suddenly terminates due to PeerDisconnect. This causes job1 to work normally without being terminated.
java.lang.IllegalArgumentException: PeerDisconnect Disconnect 40DA
I am canceling the corresponding job when ranging and closing through different jobs.
I've been trying to find these solutions, but no one knows. So, I'm asking because I think it might be a library error.
Please give me a solution for this.