Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JAVA Speech SDK 1.16 crashes if there is no connection #997

Closed
matecode opened this issue Mar 17, 2021 · 9 comments
Closed

JAVA Speech SDK 1.16 crashes if there is no connection #997

matecode opened this issue Mar 17, 2021 · 9 comments
Assignees
Labels
in-review In review

Comments

@matecode
Copy link

matecode commented Mar 17, 2021

With version 1.16 the java library crashes if there is no network connection. i'm using it on an android device.

Reproduction:
Check out Sample Project and change directlinespeech modules build.gradle to
implementation 'com.microsoft.cognitiveservices.speech:client-sdk:1.16.0'

Run without any network connection on device

Logcat:
A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 24001 (Thread-4), pid 23963 (irtualassistant)

@dargilco dargilco self-assigned this Mar 17, 2021
@dargilco dargilco added the in-review In review label Mar 17, 2021
@dargilco
Copy link
Member

@matecode thanks for reporting this! Can you please check to see if this also happens with version 1.15 or earlier?
Darren

@matecode
Copy link
Author

matecode commented Mar 17, 2021

@dargilco Sorry, i forgot to mention: It does not happen in version 1.15

@dargilco
Copy link
Member

@matecode, thanks for confirming. Let me follow up on it and I’ll post an update here as soon as I have it.

@dargilco dargilco reopened this Mar 18, 2021
@dargilco
Copy link
Member

Okay did some more investigation and it is a bug in Speech SDK after all. This is a regression in Speech SDK version 1.12, as I can run the Android sample with version 1.11 and get the cancelation event as expected (when I use wrong Speech Key). When I do the same with version 1.12, there is a crash. I do not get a cancelation event.
@matecode I opened a high-priority bug in our internal system and we will be looking at it.
To keep the list of open issues here fresh, I am closing this issue, but will continue to update here with your findings.
Thanks,
Darren

@matecode
Copy link
Author

matecode commented Mar 18, 2021

I checked version 1.15 and 1.16, and in my own project which is different to the sample i have a crash with 1.16, but not with 1.15

@dargilco
Copy link
Member

@matecode what is the Android device you are using and what Android version does it run?

@matecode
Copy link
Author

@dargilco I tested with Android10 on a Nokia 7.2 and also with Android11 on a SamsungS20+

this is the logcat output from the VirtualAssistantClient Sample on the S20+:

2021-03-18 23:46:06.203 2066-3816/com.microsoft.bot.builder.solutions.virtualassistant A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 3816 (Thread-5), pid 2066 (irtualassistant)
2021-03-18 23:46:06.254 696-786/? E/Netd: getNetworkForDns: getNetId from enterpriseCtrl is netid 0
2021-03-18 23:46:06.258 1168-7539/? E/NetdEventListenerService: DNS failed (10517) : 7
2021-03-18 23:46:06.337 3867-3867/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-03-18 23:46:06.337 3867-3867/? A/DEBUG: Build fingerprint: 'samsung/y2sxeea/y2s:11/RP1A.200720.012/G986BXXU6DUB5:user/release-keys'
2021-03-18 23:46:06.337 3867-3867/? A/DEBUG: Revision: '22'
2021-03-18 23:46:06.337 3867-3867/? A/DEBUG: ABI: 'arm64'
2021-03-18 23:46:06.338 3867-3867/? A/DEBUG: Timestamp: 2021-03-18 23:46:06+0100
2021-03-18 23:46:06.338 3867-3867/? A/DEBUG: pid: 2066, tid: 3816, name: Thread-5  >>> com.microsoft.bot.builder.solutions.virtualassistant <<<
2021-03-18 23:46:06.338 3867-3867/? A/DEBUG: uid: 10517
2021-03-18 23:46:06.338 3867-3867/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
2021-03-18 23:46:06.338 3867-3867/? A/DEBUG: Cause: null pointer dereference
2021-03-18 23:46:06.338 7625-7625/? E/ExpandableNotifRow: onNotificationUpdated() NSSL is null..
2021-03-18 23:46:06.338 3867-3867/? A/DEBUG:     x0  0000000000000000  x1  0000007b4256c29c  x2  00000077c80fd718  x3  00000000000000e0
2021-03-18 23:46:06.338 3867-3867/? A/DEBUG:     x4  0000000000000010  x5  0000000000000000  x6  0000000000000000  x7  00000077c80fd750
2021-03-18 23:46:06.338 3867-3867/? A/DEBUG:     x8  0000000000000000  x9  0000000000000000  x10 0000000000000001  x11 0000000000000001
2021-03-18 23:46:06.338 3867-3867/? A/DEBUG:     x12 00000000000000aa  x13 00000000736c6961  x14 0000000000000000  x15 0000007b42422020
2021-03-18 23:46:06.338 3867-3867/? A/DEBUG:     x16 00000077c9bb2600  x17 0000007b424d0ad4  x18 0000000000000008  x19 0000007961547720
2021-03-18 23:46:06.338 3867-3867/? A/DEBUG:     x20 0000000000000001  x21 00000077c80fd990  x22 0000000000000005  x23 00000077c80ff000
2021-03-18 23:46:06.338 3867-3867/? A/DEBUG:     x24 0000000000000000  x25 0000000000000000  x26 0000000000000001  x27 00000077c80fde28
2021-03-18 23:46:06.338 3867-3867/? A/DEBUG:     x28 000000000000027e  x29 00000077c80fd950
2021-03-18 23:46:06.338 3867-3867/? A/DEBUG:     lr  00000077c96f4208  sp  00000077c80fd8d0  pc  00000077c96f4234  pst 00000000a0000000
2021-03-18 23:46:06.340 3867-3867/? A/DEBUG: backtrace:
2021-03-18 23:46:06.340 3867-3867/? A/DEBUG:       #00 pc 0000000000326234  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.340 3867-3867/? A/DEBUG:       #01 pc 00000000002f6f74  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.340 3867-3867/? A/DEBUG:       #02 pc 00000000002d55b0  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.340 3867-3867/? A/DEBUG:       #03 pc 000000000038d17c  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.340 3867-3867/? A/DEBUG:       #04 pc 0000000000384604  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.340 3867-3867/? A/DEBUG:       #05 pc 00000000003866d4  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.340 3867-3867/? A/DEBUG:       #06 pc 0000000000392140  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.340 3867-3867/? A/DEBUG:       #07 pc 00000000003c82d8  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #08 pc 00000000003c46d4  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #09 pc 00000000003c4e48  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #10 pc 00000000003c5690  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #11 pc 00000000003d99b0  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #12 pc 00000000003d0dc0  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000) (socketio_open+164)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #13 pc 00000000003cc998  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000) (xio_open+20)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #14 pc 00000000003d55f0  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000) (tlsio_openssl_open+1840)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #15 pc 00000000003cc998  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000) (xio_open+20)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #16 pc 00000000003d96bc  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000) (uws_client_open_async+296)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #17 pc 00000000003c436c  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #18 pc 00000000003c4918  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #19 pc 00000000003c587c  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #20 pc 00000000003bda78  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #21 pc 00000000003bd064  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #22 pc 00000000003be818  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #23 pc 00000000003bd114  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #24 pc 00000000003bfb84  /data/app/~~lSIiAdvVVIdo42gS9w1W7Q==/com.microsoft.bot.builder.solutions.virtualassistant-agi-qT8dcEAVI_fucM_NDA==/base.apk!libMicrosoft.CognitiveServices.Speech.core.so (offset 0x4d9000)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #25 pc 00000000000b0228  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 0537c1e6838792775ce275f0ee9e5270)
2021-03-18 23:46:06.341 3867-3867/? A/DEBUG:       #26 pc 000000000005070c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 0537c1e6838792775ce275f0ee9e5270)

@dargilco
Copy link
Member

Thanks!

@dargilco
Copy link
Member

dargilco commented Mar 23, 2021

@matecode The crash in Speech SDK was fixed and will be available in the next public release. Thank you again for reporting this! I also noticed that the Virtual Assistant sample code blindly tries to re-create the DialogServiceConnector session on every cancelation event, including no network connection or bad speech keys, which is probably not a good idea as this just results in an infinite loop of re-creating the session. It should simply display the error and stop. I'll file a bug on the Bot-Framework solution team to fix the sample code. I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-review In review
Projects
None yet
Development

No branches or pull requests

2 participants