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

rapidjson used in smart screen sdk old, and out of sync with avs-device-sdk, causes crashes #51

Closed
3 of 10 tasks
wjennings opened this issue Oct 1, 2020 · 1 comment
Closed
3 of 10 tasks

Comments

@wjennings
Copy link

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

Briefly summarize your issue:

While running on different platforms with avs-device-sdk (occurring in v1.12, v1.15, and v1.20.1) and avs-smart-screen (2.0.1 and 2.3.0), I have seen, while using the default rapidjson, there are random crashes happening in rapidjson. After syncing the rapidjson so the smart screen sdk is the same as the avs-device-sdk's rapidjson, rebuilding, everything seems to work fine.

Please update the rapidjson used in alexa-smart-screen-sdk to the same one that matches avs-device-sdk. The one in smart-screen SDK is many years old (the 1.1.0 tag is very old, and many fixes have been added since).

NOTE, I also changed the apl-core-lib1.4.1 rapidjson version to match avs-device-sdk!

What is the expected behavior?

Not crash

What behavior are you observing?

Crashing

Provide the steps to reproduce the issue, if applicable:

Run avs app with smart screen enabled. Sometimes it dies immediately, other times, it will die later.

Tell us about your environment:

Built on ubuntu 16.04, running on multiple environments, currently this bug happens on Android running an Arm processor, but also happens on other ARM processor running a Linux variant (not Android).

What version of the AVS Device SDK are you using?

  1.2.0

Tell us what hardware you're using:

  • Desktop / Laptop
  • Raspberry Pi
  • Other - tell us more:

Tell us about your OS (Type & version):

  • Linux
  • MacOS
  • Raspbian Stretch
  • Raspbian Jessy
  • Other - tell us more:

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

  • The issue is not applicable to the AVS Device SDK SampleApp.
  • The issue is not reproducible on the AVS Device SDK SampleApp.
    Runni avs-device-sdk without smart screen, there is no problem.

Below is the log when it crashes, followed by the log when it doesn't crash(after I change the rapidjson version to be the same as avs-device-sdk/0, when I ask for the weather.

DirectiveSequencer:onDirective:directive=namespace:Alexa.Presentation.APL,name:RenderDocument,messageId:5695ca0d-057c-4c68-92e8-01cf0f9d76d4,dialogRequestId:a05128f0-35dd-4a45-bb5a-d5d0a005928c,correlationToken:,eventCorrelationToken:,payloadVersion:,instance:
2020-10-01 14:07:37.391[ 25]I DirectiveRouter:preHandleDirective:messageId=5695ca0d-057c-4c68-92e8-01cf0f9d76d4,action=calling
2020-10-01 14:07:37.393[ 26]I DirectiveRouter:handleDirective:messageId=5695ca0d-057c-4c68-92e8-01cf0f9d76d4,action=calling
2020-10-01 14:07:37.425[ 9]I DirectiveSequencer:onDirective:directive=namespace:InteractionModel,name:RequestProcessingCompleted,messageId:e1c878e7-cfa9-40bd-837c-f616fa0fb41a,dialogRequestId:a05128f0-35dd-4a45-bb5a-d5d0a005928c,correlationToken:,eventCorrelationToken:,payloadVersion:,instance:
2020-10-01 14:07:37.426[ 25]I DirectiveRouter:preHandleDirective:messageId=e1c878e7-cfa9-40bd-837c-f616fa0fb41a,action=calling
2020-10-01 14:07:37.426[ 26]I DirectiveRouter:handleDirective:messageId=e1c878e7-cfa9-40bd-837c-f616fa0fb41a,action=calling
2020-10-01 14:07:37.476[ 2]W MetricEventBuilder:addDataPointFailed:reason=invalidDataPoint
../debug/android-26/armeabi-v7a/install/include/rapidjson/document.h:1836: bool rapidjson::GenericValue<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator >::Accept(Handler &) const [Encoding = rapidjson::UTF8, Allocator = rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator, Handler = rapidjson::Writer<rapidjson::GenericStringBuffer<rapidjson::UTF8, rapidjson::CrtAllocator>, rapidjson::UTF8, rapidjson::UTF8, rapidjson::CrtAllocator, 2>]: assertion "GetType() == kNumberType" failed

Doesn't crash log:
2020-10-01 15:41:55.104[ 19]I DirectiveSequencer:onDirective:directive=namespace:Alexa.Presentation.APL,name:RenderDocument,messageId:b21da409-96b4-4bd7-95e5-a3d98c1fa4c5,dialogRequestId:5459d9ef-a36c-493a-9adc-c1c22f6c0004,correlationToken:,eventCorrelationToken:,payloadVersion:,instance:
2020-10-01 15:41:55.105[ 23]I DirectiveRouter:preHandleDirective:messageId=b21da409-96b4-4bd7-95e5-a3d98c1fa4c5,action=calling
2020-10-01 15:41:55.105[ 24]I DirectiveRouter:handleDirective:messageId=b21da409-96b4-4bd7-95e5-a3d98c1fa4c5,action=calling
2020-10-01 15:41:55.112[ 25]W LibcurlUtils:verificationOfHostsAndPeersDisabled
2020-10-01 15:41:55.114[ 19]I DirectiveSequencer:onDirective:directive=namespace:SpeechSynthesizer,name:Speak,messageId:734819fd-b696-4f13-b63f-3cf985bf7bec,dialogRequestId:5459d9ef-a36c-493a-9adc-c1c22f6c0004,correlationToken:,eventCorrelationToken:,payloadVersion:,instance:
2020-10-01 15:41:55.114[ 23]I DirectiveRouter:preHandleDirective:messageId=734819fd-b696-4f13-b63f-3cf985bf7bec,action=calling
2020-10-01 15:41:55.115[ 26]W LibcurlUtils:verificationOfHostsAndPeersDisabled
2020-10-01 15:41:55.115[ 24]I DirectiveRouter:handleDirective:messageId=734819fd-b696-4f13-b63f-3cf985bf7bec,action=calling
2020-10-01 15:41:55.123[ 9]E AndroidSLESMediaPlayer:getOffsetLockedFailed:reason=nullMediaQueue
2020-10-01 15:41:55.123[ 9]E AndroidSLESMediaPlayer:getMediaPlayerStateFailed:reason=invalidOffset
(DEBUG)11:41:55:127 [src/THaloServices.cpp:onPlaybackStarted(),2123]: playback id 1
2020-10-01 15:41:55.129[ 27]W SpeechSynthesizer:onBufferUnderrun:callbackSourceId=1
2020-10-01 15:41:55.129[ 8]W UUIDGeneration:low entropy on call to generate UUID:current entropy=0
2020-10-01 15:41:55.130[ 18]W LibcurlUtils:verificationOfHostsAndPeersDisabled
[mp3 @ 0xebd08a00] Format mp3 detected only with low score of 25, misdetection possible!
(DEBUG)11:41:55:136 [src/TArrisControl.cpp:onDialogUXStateChanged(),385]: state 4
#####################################

ALEXA STATE: SPEAKING

#####################################

[mp3 @ 0xebd08a00] Skipping 18 bytes of junk at 0.
2020-10-01 15:41:55.211[ f]E FFmpegDecoder:decode::readFrameFailed:error=tryAgain
2020-10-01 15:41:55.222[ f]E FFmpegDecoder:readDecodedFrameFailed:error=tryAgain
2020-10-01 15:41:55.263[ 19]I DirectiveSequencer:onDirective:directive=namespace:InteractionModel,name:RequestProcessingCompleted,messageId:e6de00ae-2e97-4951-b4b4-6f7e6ff8e30f,dialogRequestId:5459d9ef-a36c-493a-9adc-c1c22f6c0004,correlationToken:,eventCorrelationToken:,payloadVersion:,instance:
2020-10-01 15:41:55.264[ 23]I DirectiveRouter:preHandleDirective:messageId=e6de00ae-2e97-4951-b4b4-6f7e6ff8e30f,action=calling
2020-10-01 15:41:55.265[ 24]I DirectiveRouter:handleDirective:messageId=e6de00ae-2e97-4951-b4b4-6f7e6ff8e30f,action=calling
2020-10-01 15:41:55.636[ 28]W LibcurlUtils:verificationOfHostsAndPeersDisabled
2020-10-01 15:41:56.181[ 29]W LibcurlUtils:verificationOfHostsAndPeersDisabled
2020-10-01 15:41:56.445[ 21]W MetricEventBuilder:addDataPointFailed:reason=invalidDataPoint
(DEBUG)11:41:56:776 [src/THaloServices.cpp:onPlaybackFinished(),2132]: playback id 1
2020-10-01 15:41:56.776[ 8]W UUIDGeneration:low entropy on call to generate UUID:current entropy=0
2020-10-01 15:41:56.778[ 18]W LibcurlUtils:verificationOfHostsAndPeersDisabled
2020-10-01 15:41:57.036[ 1d]W MetricEventBuilder:addDataPointFailed:reason=invalidDataPoint
2020-10-01 15:41:57.051[ 1d]W MetricEventBuilder:addDataPointFailed:reason=invalidDataPoint
2020-10-01 15:41:57.099[ 1c]W GUILogBridge:GUILog:component=Container:Component :1015 has bounds that is bigger than parent bounds.
Check your template correctness.
Adjusting :1015 to parent :1012
WIDTH: 200 => 200
HEIGHT: 190 => 182

@zsubas
Copy link
Contributor

zsubas commented Oct 8, 2020

Thank you for bringing this issue to our attention. We are addressing rapidjson dependency mismatch in following smart screen sdk release.

I'm closing this issue for now, please feel free to open it if you have any other question.

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

2 participants