Wednesday, April 9, 2014

Week14 Blog10: Unexpected Travis Build Fail

As a final check for my work this term, I decided to run the unit tests and flake8 once again. Both went well on my computer. So I committed and pushed the final version to my github repo.

Then an unexpected event came up: the Travis CI Build failed!

All of the unit tests and flake8 passed in the travis build. However, right after the green message "174 passed, 1 skipped", it threw the error:
"Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion `map->l_init_called' failed!"

Note that the error didn't come from the "1 skipped", since the last successful travis build in master also had "1 skipped".
The issue probably had something to do with the library I was trying to install in Travis.
In .travis.yml, I added the line:
sudo apt-get install python-qt4-phonon phonon-backend-gstreamer
(Note: we cannot install PyQt4's phonon with pip, because I couldn't find PyQt4 phonon in pypi. Instead, there was only PySide's phonon)
So, with this idea in mind, I tried to fix the problem by looking for another way to install phonon. However, I wasn't able to find another way of installation that made phonon work properly.

So in the end, I decided to look for another way to play sound. From the discussion with Thanh on IRC last week, it seems that Snack is a small library that we can use. After some research and experimentation, I got the sound working with Snack. The advantage of this library is that I generated the alert sound by using a sine frequency to make a musical note. This way, we don't need to store an additional binary file (alert.mp3) and its license anymore.

The new dependencies can be installed using:
sudo apt-get install libsnack2
sudo apt-get install libsnack2-dev
sudo apt-get install libsnack2-alsa
sudo apt-get install python-tksnack

No comments:

Post a Comment