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

[sound_play/scripts/soundplay_node.py] updates states and force stop after play #78

Closed
wants to merge 1 commit into from

Conversation

furushchev
Copy link
Contributor

This pull request is minimum fix of bug reported at #75 from #77.
(Still other bugs are left without fix)

@furushchev
Copy link
Contributor Author

created patched debian file for hydro user (because of EOL of hydro)
jsk-ros-pkg/jsk_common#1401 (comment)

self.sound.seek_simple(gst.FORMAT_TIME, gst.SEEK_FLAG_FLUSH, 0)
self.sound.set_state(gst.STATE_PLAYING)
elif self.state == self.COUNTING:
self.stop()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This diff looks like it's fixing looping behavior; did this make it into the PR by mistake?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trainman419 You are correct. I fixed.

@trainman419
Copy link
Contributor

I've seen the "too many open files" bug before, and the fix at the time was to make sure that each sound object properly cleaned up its file handles when it was removed from the cache.

It looks like this fix calls update() on all sounds at the idle loop rate, but I don't understand how that fixes the file descriptor leak.

@furushchev
Copy link
Contributor Author

@@ -188,6 +188,14 @@ def stopall(self):
self.stopdict(self.filesounds)
self.stopdict(self.voicesounds)

def update(self):
for sound in self.builtinsounds.values():
sound.update()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleanupdict() is already iterating through all of the sounds looking for things that need to be cleaned up; it seems like it would be better to call update there instead of introducing a new code path.

@trainman419
Copy link
Contributor

This has been blocked for a long time because it hasn't been easy for me to reproduce it. Do you still need this merged into the hydro-devel branch or should I re-target it into indigo-devel?

@furushchev
Copy link
Contributor Author

@trainman419 Sorry for very late reply. I answered at #75.
I'm using indigo and this issue also occurs on indigo-devel.
It does not matter for me not to port to hydro-devel. Can I create another pull request to indigo-devel?

@furushchev furushchev closed this Nov 10, 2017
@furushchev
Copy link
Contributor Author

Closed. See #75

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.

2 participants