From patchwork Tue Feb 27 17:53:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dufresne X-Patchwork-Id: 19561 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 ECB72BD160 for ; Tue, 27 Feb 2024 17:53:59 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F25F362867; Tue, 27 Feb 2024 18:53:58 +0100 (CET) Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [IPv6:2a00:1098:ed:100::25]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 09C7162806 for ; Tue, 27 Feb 2024 18:53:57 +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 5556C378000B; Tue, 27 Feb 2024 17:53:56 +0000 (UTC) From: Nicolas Dufresne To: libcamera-devel@lists.libcamera.org Subject: [PATCH v1 0/3] gstreamer: Fix a crash when memory outlives the pipeline Date: Tue, 27 Feb 2024 12:53:33 -0500 Message-ID: <20240227175336.560009-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 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