Commit 5718b4d5 authored by Kieran Bingham's avatar Kieran Bingham
Browse files

libcamera: camera: Validate requests are completed in Running state

All requests must have completed before the Camera has fully stopped.

Requests completing when the camera is not running represent an internal
pipeline handler bug.

Trap this event with a fatal error.
Reviewed-by: default avatarNiklas Söderlund <>
Reviewed-by: default avatarLaurent Pinchart <>
Signed-off-by: default avatarKieran Bingham <>
parent 1dfb8d45
......@@ -1062,11 +1062,11 @@ int Camera::stop()
LOG(Camera, Debug) << "Stopping capture";
d->pipe_->invokeMethod(&PipelineHandler::stop, ConnectionTypeBlocking,
return 0;
......@@ -1079,6 +1079,12 @@ int Camera::stop()
void Camera::requestComplete(Request *request)
Private *const d = LIBCAMERA_D_PTR();
/* Disconnected cameras are still able to complete requests. */
if (d->isAccessAllowed(Private::CameraRunning, true))
LOG(Camera, Fatal) << "Trying to complete a request when stopped";
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment