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

Please update rapidjson! #5

Open
wjennings opened this issue Oct 1, 2020 · 2 comments
Open

Please update rapidjson! #5

wjennings opened this issue Oct 1, 2020 · 2 comments
Assignees

Comments

@wjennings
Copy link

See the issue I raised in smart screen sdk:
alexa/alexa-smart-screen-sdk#51

The same thing is true for the rapidjson included with apl-core. The rapidjson used in apl-core is the 1.1.0 tagged version from rapidjson's github, but that is many years old, and it causes my programs to crash in strange places while invoking rapidjson. There have been many fixes since then.

@bddufour
Copy link
Contributor

bddufour commented Oct 1, 2020

The version of rapidjson that is used by apl-core has been very stable for us. Can you give me more information about the crashes you experienced? Does your own code attempt to use the version of rapidjson bundled with apl-core-library?

@bddufour bddufour self-assigned this Oct 1, 2020
@wjennings
Copy link
Author

It's difficult to explain. I'm 99% positive it's the same issue myself and another experiences in this bug:
alexa/alexa-smart-screen-sdk#17

I will have random crashes while doing certain rapidjson commands, but only while running on certain platforms. I've never seen these issues while running smart screen on my Ubuntu Machine, but I will see it happens while running on other platforms (specifically, both other platforms are ARM based).

Once I see the crash, it repeats 100%.

In this latest instance, I was seeing the crash reported 100% of the time when I would ask for the weather (but it didn't happen when I asked the time):
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

Once I changed the rapidjson that both smart-screen used, and apl-core used to match the one avs-device-sdk used, the crashes went away.

Looking at the 2 versions, it looks to me smart-screen and apl-core used the tagged v1.1.0 version of rapidjson, while avs-device-sdk used a later version (possibly master at some time). The issue is the tagged 1.1.0 was 4 years ago, and there have been bug fixes since. So, I can only assume one of those bug fixes corrected it.

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

No branches or pull requests

2 participants