Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Music playback - stop - crash observed with error! #65

Closed
2 tasks
sakthisg opened this issue Dec 10, 2020 · 8 comments
Closed
2 tasks

Music playback - stop - crash observed with error! #65

sakthisg opened this issue Dec 10, 2020 · 8 comments

Comments

@sakthisg
Copy link

IMPORTANT: Before you create an issue, please take a look at our Issue Reporting Guide.

Briefly summarize your issue:

Stop command - getting errors and SIGABORT

What is the expected behavior?

Should run normally.

What behavior are you observing?

Application crashes.
There are errors:

AlexaPresentation:processExecuteCommandsResultExecutorFailed:reason=asked to process missing directive,messageId=RenderPlayerInfo
[2020-12-10 19:14:39.261] 2020-12-10 13:44:38.454 [ 1b] E CapabilityAgent:sendExceptionEncounteredAndReportFailed:reason=infoNotFound
[2020-12-10 19:14:39.261] 2020-12-10 13:44:38.464 [ 1b] E AlexaPresentation:processExecuteCommandsResultExecutorFailed:reason=asked to process missing directive,messageId=RenderPlayerInfo

SIGABORT:
SIGABRT: software abort

Backtrace and logs:
PR_TO_SSSDK.txt
backtrace.txt

Provide the steps to reproduce the issue, if applicable:

Play Songs from Amazon Music . Pause it .

Tell us about your environment:

Modified the sampleApp...

What version of the AVS Device SDK are you using?

AVS SDK version 1.20.1, APL version 1.3.3 and SS SDK version 2.2.1

Tell us what hardware you're using:

Crosscompiled

Tell us about your OS (Type & version):

  • Linux

Have you tried the same use case with AVS Device SDK SampleApp?

  • The issue is not reproducible on the AVS Device SDK SampleApp.
@VaruPan
Copy link
Contributor

VaruPan commented Dec 10, 2020

Hi @sakthisg,

Thanks a lot for reaching out and providing the backtrace, it seems like GUI layer might be sending incorrect value with updateCursorPosition message. From the backtrace looking at frame 6 i.e. APLClient::AplCoreConnectionManager::handleUpdateCursorPosition, it is attempting to parse payload and rapidjson could be causing this error.

When you hit the crash, can you go to the frame and try to fetch the payload by printing them to logs (the symbols are missing currently), that will give more information. Just as a reference, rapidjson does not implicitly assumes integer value to be a subset of double causing some asserts.

@zsubas
Copy link
Contributor

zsubas commented Jan 5, 2021

Closing this issue due to inactivity. Feel free to reopen it if you're still experiencing the issue.

@zsubas zsubas closed this as completed Jan 5, 2021
@sakthisg
Copy link
Author

sakthisg commented Jan 6, 2021

@zsubas We are seeing random crashes in rapid json in many scenarios. which triggers the SIGABORT.

  1. What are all RAPID JSON related cf compiler flags to be used for SmartScreen SDK, AVS SDK and APL Core?
    => Using only -DRAPIDJSON_MEM_OPTIMIZATION=OFF only for AVS SDK..Do we need to pass for compiling the Smart Screen SDK and APL Core.
    => Ours cross compiled , Let me know if i have missed any RAPID JSON Related compilation flags.

  2. Why there is a difference in rapid json code in avsdevice sdk and smartscreen sdk?

  • avs-device-sdk\ThirdParty\rapidjson\rapidjson-1.1.0\include\rapidjson\
  • smartscreen-sdk\modules\Alexa\ThirdParty\rapidjson\rapidjson-1.1.0\include\rapidjson\
  • Please reopen this issue to discuss the same. Thanks for the support!

@zsubas zsubas reopened this Jan 6, 2021
@zsubas
Copy link
Contributor

zsubas commented Jan 6, 2021

-DRAPIDJSON_MEM_OPTIMIZATION=OFF is only used for AVS SDK build.

In latest version of smart screen sdk, we merged the rapidjson libraries. Right now we are referring avs sdk's rapidjson and apl-core's rapidjson: https://developer.amazon.com/en-US/docs/alexa/alexa-smart-screen-sdk/mac-os.html
We don't have a rapidjson library under smart-screen-sdk anymore.

I would suggest you to update the smart screen sdk to the latest version if possible. If not, please share the details of the crash (at which scenario it crashes, detailed logs) so we can investigate further.

@sakthisg
Copy link
Author

sakthisg commented Jan 7, 2021

Thanks for the inputs. Most of the times the core is not getting generated.
In our device we are using:
AVS SDK version 1.20.1, APL version 1.3.3 and SS SDK version 2.2.1

For the above version used can you please confirm the rapid json flags to be used?
Command Issued:
Ask Alexa for the Wikipedia entry on Grace Hopper.
After that if we press back key in our device.

/home/kumar.jagadish/commit_userid/alexa/prebuilts/mvoiceapp/avs/prebuilts/include/rapidjson/document.h:1692: double rapidjson::GenericValue<Encoding, Allocator>::GetDouble() const [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator]: Assertion `IsNumber()' failed.

@karpuv
Copy link

karpuv commented Jan 11, 2021

Hello @sakthisg,

The rapidjson flag to use on AVS is: -DRAPIDJSON_MEM_OPTIMIZATION and the flag to be used on Alexa smart screen sdk is: -DAPLCORE_RAPIDJSON_INCLUDE_DIR.

As for the crash, have you been able to fetch the payload through the backtrace as @VaruPan suggested? This will help us debug further

@Jagadish-Bommisetty
Copy link

Jagadish-Bommisetty commented Jan 12, 2021

Hi @VaruPan/@karpuv
We fetch the payload from APLClient::AplCoreConnectionManager::handleUpdateCursorPosition. The paylaod is as follows,

Payload and crash
[2021-01-11 22:50:42.007] [smartscreenSDK - AplCoreConnectionManager] handleUpdateCursorPosition payload {"x":null,"y":null}
[2021-01-11 22:50:42.007] TpvSmartScreenAlexaApp: /home/kumar.jagadish/add_prints_updateCursorPosition/alexa/prebuilts/mvoiceapp/avs/prebuilts/include/rapidjson/document.h:1692: double rapidjson::GenericValue<Encoding, Al
[2021-01-11 22:50:42.023] locator>::GetDouble() const [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator]: Assertion `IsNumber()' failed.

scenario:
while GUI page loaded, pressed the back key and home key on our device.

Observation:
seen that x and y co-ordinates in payload is null. since in the code, GetFloat() API used to read the co-ordinates from payload. it is eventually causing the crash.

can we block to send this payload(when x and y are null) to APL. if yes, is there any regression or side effect with that.
if not, can you give any suggestion to avoid this issue.

BTW, may i know how this cursorPosition payload is used in APL..?

@VaruPan
Copy link
Contributor

VaruPan commented Jan 13, 2021

Hi @Jagadish-Bommisetty,

The rendering engine needs to know the cursor position to respond correctly to clicks/hover/swiping events. I suspect blocking these messages may result in missed events. I encourage you to post this question on rendering engine project for further clarifications.

You can also investigate on - why the browser is sending null cursor positions? I can confirm that we do not see null values in payload on reference platforms.

Thank you for your contribution to Alexa Smart Screen SDK!

@VaruPan VaruPan closed this as completed Jan 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants