Closed yliu342 closed 10 months ago
Hi @yliu342
ok I'll look into it. Do you have any code in your app that calls the close
capture instance?
We advise that developers shouldn't close the SDK. It handles by itself and responds to the lifecycle of the app.
No we don’t call close anywhere in our code.
This crash has been fixed in the last release 1.8.57
on our private repository.
Just saw you pushed a new version of the SDK which fixed this issue. But I just did another check of our code and noticed we do indeed make a call to close
. But definitely not at the time of this crash happened.
We have a toggle to control the use of physical scanner. If user toggle it on, we will start the Socket SDK. If the user toggle from on -> off we will call close. It is rare user turn on and off the toggle.
Yes the new version 1.8.57
has been released with the fix. Either the close
is triggered by your code or by the SDK it self, it's solved.
Hi @yliu342
ok I'll look into it. Do you have any code in your app that calls the
close
capture instance?We advise that developers shouldn't close the SDK. It handles by itself and responds to the lifecycle of the app.
Hi @cyrille-socket ,
Do you document how and when the SDK responds to lifecycle events? We have two apps that both use a scanner, and it is critical that the apps disconnect from the scanner upon backgrounding, so that the scanner is available for use in the app that is next foregrounded.
It would be great if the lifecycle management was documented thoroughly and the recommendation about not calling close
was followed up by a description of what happens if you do not follow the recommendation.
Hi @cyrille-socket Since upgrading to the 1.8.53 SDK we've seen some crash on SktCaptureProtocol::Deinitialize(). I can't reproduce locally but I do see crash reports coming from firebase. Here is the crash log. It seems some memory issue with that method.