clariusdev / solum

APIs for OEMs to Create Standalone Applications
https://www.clarius.com
BSD 3-Clause "New" or "Revised" License
16 stars 10 forks source link

Error when reset solum workflow #35

Closed shawafoncoustics closed 1 year ago

shawafoncoustics commented 1 year ago

Describe the bug Solum v10.3, v10.4 beta throws an error and causes the app to crash when trying to load the workflow on Android version, the workflow works for the first time with no problem but when we do reset it like following

        solum?.run(false)
        solum?.disconnect()
        solum?.release()
        solum = null

and try to connect again we got this error and the app crash

Screenshot 2023-06-07 at 2 50 38 PM

To Reproduce Steps to reproduce the behavior:

  1. Start workflow ( scan > select device > get wifi creds > auto join > load application > toggle run )
  2. Scanning and getting raw data
  3. Back to the other screen in the app with reset solum with the above steps in the description
  4. Take another scan and start workflow again and at the step of getting wifi creds we get this error and the app crashes.

Environment:

Note: By using exact same setup and workflow, this issue wasn't happening with the previous version 10.2.

julien-l commented 1 year ago

Thanks for reporting I will investigate.

julien-l commented 1 year ago

Hi @shawafoncoustics no news for now. I was not able to exactly replicate your crash--I was able to cause a crash each time following your workflow (start app > ble screen > select ble info > auto-join > connect > load probe/application > disconnect > ble screen, which causes solum resources deletion > select ble info, which causes solum resources creation > auto-join > connect > load probe/application, which causes the crash). However my error is slightly different:

signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x00000072ab987ca4

Notice the SEGV_ACCERR while yours is SEGV_MAPERR. I will continue investigating.

julien-l commented 1 year ago

Workaround: avoid destroying/recreating the solum object repeatedly, for example by placing it in a service (outside the fragment which gets created/deleted when changing view). Production code should probably avoid tying the lifetime of the solum object with that of a view (the example app does it to help detect bugs, like the one you found, thanks again for reporting).

julien-l commented 1 year ago

@shawafoncoustics would you be able to send the logcat output to me? Be sure to remove any patient health information. You can attach it to this ticket or send it to me via email. Thanks!

shawafoncoustics commented 1 year ago

Hi @julien-l i sent u the full locat output on mail, thanks.