From patchwork Tue Mar 5 15:30:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dufresne X-Patchwork-Id: 19632 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 12748BD160 for ; Tue, 5 Mar 2024 15:31:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CE5CC62874; Tue, 5 Mar 2024 16:31:06 +0100 (CET) Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8733961C92 for ; Tue, 5 Mar 2024 16:31:05 +0100 (CET) Received: from nicolas-tpx395.lan (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nicolas) by madrid.collaboradmins.com (Postfix) with ESMTPSA id CDC8D37813B5; Tue, 5 Mar 2024 15:31:04 +0000 (UTC) From: Nicolas Dufresne To: libcamera-devel@lists.libcamera.org Subject: [PATCH v2 0/3] gstreamer: Fix a crash when memory outlives the pipeline Date: Tue, 5 Mar 2024 10:30:55 -0500 Message-ID: <20240305153058.1761020-1-nicolas@ndufresne.ca> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicolas Dufresne Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Nicolas Dufresne This set fixes a memory lifetime issue which in the end happens because the camera manager needs to outlive all of its object, including the FrameBufferAllocator. This is fixing a crash reported at: https://bugs.libcamera.org/show_bug.cgi?id=211 Changes in v2: - Fixed copyright and header comment Nicolas Dufresne (3): gstreamer: allocator: Ensure camera manager stay alive test: gstreamer: Simplify single stream test test: gstreamer: Test memory lifetime src/gstreamer/gstlibcameraallocator.cpp | 16 +++- .../gstreamer_memory_lifetime_test.cpp | 75 +++++++++++++++++++ .../gstreamer_single_stream_test.cpp | 27 +++---- test/gstreamer/meson.build | 4 +- 4 files changed, 102 insertions(+), 20 deletions(-) create mode 100644 test/gstreamer/gstreamer_memory_lifetime_test.cpp