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

avs aborted exit issue. (Version 1.0.3 alexa-client-sdk) #183

Closed
xurenjun opened this issue Sep 22, 2017 · 4 comments
Closed

avs aborted exit issue. (Version 1.0.3 alexa-client-sdk) #183

xurenjun opened this issue Sep 22, 2017 · 4 comments

Comments

@xurenjun
Copy link

hi all:

Above the program during normal operation. (Version 1.0.3 alexa-client-sdk)

err log:
terminate called after throwing an instance of 'std::future_error'
what(): Promise already satisfied

What is the reason?

@mradulan
Copy link
Contributor

Hi @xurenjun , do you get this when you are running the Sample app? Can you tell the specific operation you are doing so that we can reproduce the issue?

@mradulan
Copy link
Contributor

Hi @xurenjun , this has been observed and it will be resolved in future release. Please refer to #153 and the solution there. Below is the snippet of the temporary solution from #153:

It looks like the crash is occurring because m_playlistParsedPromise in MediaPlayer/URLSource is being set twice. In MediaPlayer/include/UrlSource.h, could you add a boolean flag that indicates whether a callback has been received, as well as a mutex? For example, bool m_hasReceivedAPlaylistCallback and std::mutex m_mutex. Then in URLSource's constructor, initialize m_hasReceivedAPlaylistCallback to false. Finally, in UrlSource::onPlaylistParsed, you could add something like the following:

std::lock_guardstd::mutex lock{m_mutex};
if (!m_hasReceivedAPlaylistCallback) {
m_hasReceivedAPlaylistCallback = true;
m_playlistParsedPromise.set_value(urls);
}

@kclchan
Copy link
Contributor

kclchan commented Oct 3, 2017

This issue is fixed in v1.1.0. Thanks.

@kclchan kclchan closed this as completed Oct 3, 2017
@xurenjun
Copy link
Author

@mradulan Thanks.

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

3 participants