Skip to content

[BUGIFX 176] Fix dbus connection leak#228

Open
a-elkaim wants to merge 160 commits intowillprice:masterfrom
a-elkaim:fix-error-24
Open

[BUGIFX 176] Fix dbus connection leak#228
a-elkaim wants to merge 160 commits intowillprice:masterfrom
a-elkaim:fix-error-24

Conversation

@a-elkaim
Copy link
Copy Markdown

@a-elkaim a-elkaim commented Jun 1, 2023

Prevent "errno 24 too many open files" from hapenning when opening / closing files over and over.

willprice and others added 30 commits August 19, 2017 23:37
We were incorrectly accessing properties, don't know how this ever worked
before... now we use the org.freedesktop.DBus.Properties interface with `Get`
and `Set` to read/write properties from the `omxplayer` dbus object.

I've also ditched the smoketests as they're too manual in favour of an
integration test suite built a top of unittest.

TODO:
* Write integration tests for player interface methods
* Check what time units are being passed around and make sure its consistent,
  try to be backwards compatible, put warnings for inconsistencies
* Release
* On a separate branch rework the API to make heavy use of properties
TODO:

* Stuff on todo from last commit
* Fix mute test, why isn't it working, looking at src looks like mute should set
  volume to min volume value (0 in src)
* Add integration tests for new methods
* Fix up unit tests
* Add unit tests for new methods after verifying behaviour with integration
  tests
* WIP: Fix unit tests

* Fix unit tests

* Remove underscores from numeric literals

* Default tox check to unit tests only

* Fix those damn numeric literals

* Fix tox.ini
* Separate unit and integration tests under top level testing dir
* Add Pipfile
* Add `doc-serve` Makefile target
* Use `pipenv` in `tox`
* Add dbus-python as explicit dep

* Add `pip install funcsigs` to tox

Necessary to prevent mock from being unimportable
in python2.7. It seems mock doesn't depend on funcsigs :(

* Update requirements.txt from pipenv
pyup-bot and others added 29 commits November 5, 2018 23:13
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.24.1 to 1.24.2.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/master/CHANGES.rst)
- [Commits](urllib3/urllib3@1.24.1...1.24.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…lprice#201)

* Move process killing to a separate method

This allows calling just the killing part of quit in a subsequent
commit. This only moves some code, without changing behaviour.

* Terminate process on startup errors

Before, if a process was successfully started, but there would be a
problem in subsequent setup (in particular the dbus connection could
fail), the process could keep running in the background.

This was particularly problematic when this caused the OMXPlayer
constructor to raise an exception, since then no player instance would
be created so the process pid would be lost.

This commit ensures that whenever the OMXPlayer constructor or load
method throws, no process will be dangling in the background.

This fixes willprice#196

* Add more tests for player.quit

This adds test coverage for two exception handling cases.
…price#213)

As mentioned in issue willprice#198 the `libglib2.0-dev` is not pre-installed in current Raspbian versions. Had the same occur to me with a fresh Raspbian Buster on a RPi 3+ today. To reduce friction for first time users, I suggest adding it to the docs.
Bumps [jinja2](https://github.com/pallets/jinja) from 2.10 to 2.11.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](pallets/jinja@2.10...2.11.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [jinja2](https://github.com/pallets/jinja) from 2.10 to 2.11.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](pallets/jinja@2.10...2.11.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

7 participants