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

TImers Alarms not sounding #1183

Closed
2 of 8 tasks
mw1fly opened this issue Jan 22, 2019 · 7 comments
Closed
2 of 8 tasks

TImers Alarms not sounding #1183

mw1fly opened this issue Jan 22, 2019 · 7 comments

Comments

@mw1fly
Copy link

mw1fly commented Jan 22, 2019

Briefly summarize your issue:

A timer or alarm does not sound when it should, sometimes it will sound half an hour or so later.

What is the expected behavior?

Timer or alarm should sound when ended.

What behavior are you observing?

The alarm or timer does not sound or sometimes sounds up to an hour later.

Provide the steps to reproduce the issue, if applicable:

Set a timer and wait.

Tell us about your environment:

What version of the AVS Device SDK are you using?

  v1.11.0 released 12/19/2018

I using a raspberry pi, I have installed AVS via the install scripts setup.sh, genConfig.sh and pi.sh as per the guide.

When running the test.sh script it fails on the following errors.
298:TimeTest.testStringConversion
301:TimeTest.testTimeConversion

298/1168 Test: TimeTest.testStringConversion
Command: "/home/rich/build/AVSCommon/Utils/test/TimeUtilsTest" "--gtest_filter=TimeTest.testStringConversion"
Directory: /home/rich/build/AVSCommon/Utils/test
"TimeTest.testStringConversion" start time: Jan 22 01:59 GMT
Output:

2019-01-22 01:59:09.313 [ 1] I sdkVersion: 1.11.0
Running main() from gmock_main.cc
Note: Google Test filter = TimeTest.testStringConversion
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from TimeTest
[ RUN ] TimeTest.testStringConversion
/home/rich/avs-device-sdk/AVSCommon/Utils/test/TimeUtilsTest.cpp:44: Failure
Expected: dateTm.tm_hour
Which is: 22
To be equal to: 21
[ FAILED ] TimeTest.testStringConversion (1 ms)
[----------] 1 test from TimeTest (1 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (1 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] TimeTest.testStringConversion

1 FAILED TEST

Test time = 0.12 sec ---------------------------------------------------------- Test Failed. "TimeTest.testStringConversion" end time: Jan 22 01:59 GMT "TimeTest.testStringConversion" time elapsed: 00:00:00 ---------------------------------------------------------- 301/1168 Test: TimeTest.testTimeConversion Command: "/home/rich/build/AVSCommon/Utils/test/TimeUtilsTest" "--gtest_filter=TimeTest.testTimeConversion" Directory: /home/rich/build/AVSCommon/Utils/test "TimeTest.testTimeConversion" start time: Jan 22 01:59 GMT Output: ---------------------------------------------------------- 2019-01-22 01:59:09.560 [ 1] I sdkVersion: 1.11.0 Running main() from gmock_main.cc Note: Google Test filter = TimeTest.testTimeConversion [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from TimeTest [ RUN ] TimeTest.testTimeConversion /home/rich/avs-device-sdk/AVSCommon/Utils/test/TimeUtilsTest.cpp:73: Failure Expected: randomDate Which is: 524089800 To be equal to: convertBack Which is: 524093400 [ FAILED ] TimeTest.testTimeConversion (0 ms) [----------] 1 test from TimeTest (1 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (1 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] TimeTest.testTimeConversion

1 FAILED TEST

Test time = 0.07 sec

Test Failed.
"TimeTest.testTimeConversion" end time: Jan 22 01:59 GMT
"TimeTest.testTimeConversion" time elapsed: 00:00:00

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:
@visayamv
Copy link
Contributor

Hi @mw1fly , to help us debug, can you please run the unit test through gdb?

  1. install gdb
    sudo apt-get install gdb

  2. Go to the build directory (you can check this in the test.sh script)
    example: cd /home/pi/user/build

  3. Execute: ctest -VV -R TimeTest.testStringConversion$

There should appear something like this:
285: Test command: /home/pi/user/build/AVSCommon/Utils/test/TimeUtilsTest "--gtest_filter=TimeTest.testStringConversion"

Make note of the test command. In this case it's:

/home/pi/user/build/AVSCommon/Utils/test/TimeUtilsTest "--gtest_filter=TimeTest.testStringConversion"

  1. Run the test command through gdb:

gdb --args <test command>

example:

gdb --args /home/pi/user/build/AVSCommon/Utils/test/TimeUtilsTest "--gtest_filter=TimeTest.testStringConversion"

  1. You will go to the (gdb) prompt.

  2. Set breakpoints:

b TimeUtils.cpp:135
b TimeUtils.cpp:203

  1. Run the test

run

  1. When it stops at breakpoint 1 (TimeUtils.cpp:135), do:

info args
print(converted)
print(offset)
continue

  1. It should stop on the second breakpoint (TimeUtils.cpp:203), now do:

info args
print(convertedTimeT)
quit

And post the results here. Thanks!

@mw1fly
Copy link
Author

mw1fly commented Jan 25, 2019

Hi Visayanv, here are the results I got as per your instructions.

rich@raspberrypi:~/build $ gdb --args /home/rich/build/AVSCommon/Utils/test/TimeUtilsTest "--gtest_filter=TimeTest.testStringConversion"
GNU gdb (Raspbian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/rich/build/AVSCommon/Utils/test/TimeUtilsTest...done.
(gdb) b TimeUtils.cpp:135
No source file named TimeUtils.cpp.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (TimeUtils.cpp:135) pending.
(gdb) b TimeUtils.cpp:203
No source file named TimeUtils.cpp.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 2 (TimeUtils.cpp:203) pending.
(gdb) run
Starting program: /home/rich/build/AVSCommon/Utils/test/TimeUtilsTest --gtest_filter=TimeTest.testStringConversion
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
2019-01-25 08:55:30.608 [ 1] I sdkVersion: 1.11.0
Running main() from gmock_main.cc
Note: Google Test filter = TimeTest.testStringConversion
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from TimeTest
[ RUN ] TimeTest.testStringConversion

Breakpoint 1, alexaClientSDK::avsCommon::utils::timing::TimeUtils::convertToUtcTimeT (this=0x7effeedc, utcTm=0x7effe2ec, ret=0x7effe2e8)
at /home/rich/avs-device-sdk/AVSCommon/Utils/src/TimeUtils.cpp:135
135 return true;
(gdb) info args
this = 0x7effeedc
utcTm = 0x7effe2ec
ret = 0x7effe2e8
(gdb) print(converted)
$1 = 524093400
(gdb) print(offset)
$2 = -3600
(gdb) continue
Continuing.

Breakpoint 2, alexaClientSDK::avsCommon::utils::timing::TimeUtils::convert8601TimeStringToUnix (this=0x7effeedc, timeString="1986-08-10T21:30:00+0000",
convertedTime=0x7effeeb8) at /home/rich/avs-device-sdk/AVSCommon/Utils/src/TimeUtils.cpp:203
203 if (!ok) {
(gdb) info args
this = 0x7effeedc
timeString = "1986-08-10T21:30:00+0000"
convertedTime = 0x7effeeb8
(gdb) print(convertedTimeT)
$3 = 524097000
(gdb) quit
A debugging session is active.

Inferior 1 [process 14405] will be killed.

Quit anyway? (y or n)

@visayamv
Copy link
Contributor

Hi @mw1fly , thanks for sending through the debug logs. Can you confirm the timezone of your device? Please execute the following on the device linux terminal:

cat /etc/timezone
date

Thanks.

@mw1fly
Copy link
Author

mw1fly commented Jan 25, 2019

Hi,
Its Europe/London

Regards
Richard.

@womw
Copy link
Contributor

womw commented Jan 26, 2019

Hey @mw1fly thanks for keeping us updated.

We are investigating this internally and will update once we have more information.

@mavamazon
Copy link
Contributor

Hi @mw1fly!

Thank you for reporting this! We have found the root cause. The fix is going to be published in one of the future versions.

kjkh pushed a commit that referenced this issue Feb 26, 2019
Changes in this update:

**Enhancements**

* Support was added for the `fr_CA` locale.
* The Executor has been optimized to run a single thread when there are active job in the queue, and to remain idle when there are not active jobs.
* An additional parameter of `alertType` has been added to the Alerts capability agent. This will allow observers of alerts to know the type of alert being delivered.
* Support for programmatic unload and load of PulseAudio Bluetooth modules was added. To enable this feature, there is a [new CMake option](https://github.com/alexa/avs-device-sdk/wiki/CMake-parameters#bluetooth): `BLUETOOTH_BLUEZ_PULSEAUDIO_OVERRIDE_ENDPOINTS`. Note that [libpulse-dev is a required dependency](https://github.com/alexa/avs-device-sdk/wiki/Dependencies#bluetooth) of this feature.
* An observer interface was added for when an active Bluetooth device connects and disconnects.
* The `BluetoothDeviceManagerInterface` instantiation was moved from `DefaultClient` to `SampleApp` to allow applications to override it.
* The `MediaPlayerInterface` now supports repeating playback of URL sources.
* The Kitt.AI wake word engine (WWE) is now compatible with GCC5+.
* Stop of ongoing alerts, management of MessageObservers, and management of CallStateObservers have been exposed through DefaultClient.

**Bug Fixes**

* [Issue 953](#953) - The `MediaPlayerInterface` requirement that callbacks not be made upon a callers thread has been removed.
* [Issue 1136](#1136) - Added a missing default virtual destructor.
* [Issue 1140](#1140) - Fixed an issue where DND states were not synchronized to the AVS cloud after device reset.
* [Issue 1143](#1143) - Fixed an issue in which the SpeechSynthesizer couldn't enter a sleeping state.
* [Issue 1183](#1183) - Fixed an issue where alarm is not sounding for certain timezones
* Changing an alert's volume from the Alexa app now works when an alert is playing.
* Added missing shutdown handling for ContentDecrypter to prevent the `Stop` command from triggering a crash when SAMPLE-AES encrypted content was streaming.
* Fixed a bug where if the Notifications database is empty, due to a crash or corruption, the SDK initialization process enters an infinite loop when it retries to get context from the Notifications capability agent.
* Fixed a race condition that caused `AlertsRenderer` observers to miss notification that an alert has been completed.

**Known Issues**

* `PlaylistParser` and `IterativePlaylistParser` generate two HTTP requests (one to fetch the content type, and one to fetch the audio data) for each audio stream played.
* Music playback history isn't being displayed in the Alexa app for certain account and device types.
* On GCC 8+, issues related to `-Wclass-memaccess` will trigger warnings. However, this won't cause the build to fail and these warnings can be ignored.
* Android error ("libDefaultClient.so" not found) can be resolved by upgrading to ADB version 1.0.40
* When network connection is lost, lost connection status is not returned via local TTS.
* `ACL` may encounter issues if audio attachments are received but not consumed.
* `SpeechSynthesizerState` currently uses `GAINING_FOCUS` and `LOSING_FOCUS` as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* `make integration` is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user text-to-speech (TTS).
* When the sample app is restarted and network connection is lost, Reminder TTS does not play. Instead, the default alarm tone will play twice.
@kclchan
Copy link
Contributor

kclchan commented Mar 5, 2019

Thanks for opening this issue. It has been fixed in our v1.12 release. Thanks!

@kclchan kclchan closed this as completed Mar 5, 2019
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