ISO resources not freed at end of camera lifetime.

Bug #985997 reported by Jonathan Wonders
20
This bug affects 5 people
Affects Status Importance Assigned to Milestone
libdc1394-22 (Ubuntu)
Fix Released
Medium
Damien

Bug Description

This bug was found while examining the source code of libdc1394 version 2.2.0 so OS version is irrelevant.

The API states that ISO resources associated with a camera are freed when the camera is freed by default unless they are explicitly set to persist beyond the lifetime of a camera. For both cases, the opposite of the desired behaviour occurs.

This behaviour is controlled by a private variable, iso_persist. The variable is initialised to zero. The only place it is modified is by dc1394_iso_set_persist(camera) where it is set to 1.

When a camera is freed via dc1394_camera_free(camera), a conditional expression determines whether or not the iso resources are released. It frees the iso resources if iso_persist is nonzero and does not free resources if iso_persist is 0. This is the opposite of the desired behaviour given that by default iso_persist is 0.

Tags: patch
Revision history for this message
Jonathan Wonders (jwonders88) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "0001-Correctly-release-iso-resources.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libdc1394-22 (Ubuntu):
status: New → Confirmed
Revision history for this message
Damien (takahara) wrote :

Thanks Jonathan, I've committed the fix to the GIT repo.

Changed in libdc1394-22 (Ubuntu):
status: Confirmed → Fix Committed
assignee: nobody → Damien (takahara)
Peter Antoniac (pan1nx)
Changed in libdc1394-22 (Ubuntu):
importance: Undecided → Medium
Peter Antoniac (pan1nx)
Changed in libdc1394-22 (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.