From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id AA2F94CFAA for ; Tue, 12 Aug 2025 14:43:41 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 1E74968C2F0; Tue, 12 Aug 2025 17:43:38 +0300 (EEST) Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id D9066687BEB for ; Tue, 12 Aug 2025 17:43:30 +0300 (EEST) X-ENS-nef-client: 129.199.129.80 ( name = phare.normalesup.org ) Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef.ens.fr (8.14.4/1.01.28121999) with ESMTP id 57CEhUku010852 for ; Tue, 12 Aug 2025 16:43:30 +0200 Received: by phare.normalesup.org (Postfix, from userid 1001) id D89F52EFE9; Tue, 12 Aug 2025 16:43:29 +0200 (CEST) Date: Tue, 12 Aug 2025 16:43:29 +0200 From: Nicolas George To: FFmpeg development discussions and patches Message-ID: References: <20250702144355.GE29660@pb2> <20250702171641.GF29660@pb2> <20250703155205.GK29660@pb2> <20250706143354.GA29660@pb2> <20250803213232.GH29660@pb2> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250803213232.GH29660@pb2> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Tue, 12 Aug 2025 16:43:30 +0200 (CEST) Subject: Re: [FFmpeg-devel] [RFC] Advanced Error Codes X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Michael Niedermayer (HE12025-08-03): > well, you may have deep call stacks > > user_app->libavfilter->libavformat->libavcodec->decoder->jpeg_decoder->... > > and the user of the user_app needs to know what file had what failure > so the error details must pass through all this. > > Some of the API calls failing here can be final calls that are > expected to leave nothing allocated on a failure return. > > also other subsequent and prior errors may have occured in some contexts > I thiink we want to be able to distingish what caused teh current error from > the previous or next Before we dig deeper into the technical details, we need to clarify what exactly you need to do. The subject of the thread evokes error messages. Error messages are meant for users, to give them the information they need to fix their issue: did they make a typo in the file name? did they forget to enable wifi? do they need to free some space on their hard drive? is there no solution because the file is too damaged? But what you describe along this discussion looks more like debug messages: messages that the user transmits to the developer to let them fix a bug when they cannot offer a test case to reproduce the issue. They might look like two instances of the same thing from a developer point of view, but they are not. Anybody who has spent time helping clueless users (of FFmpeg or anything else) or teaching realizes they are more antithetical: any extra detail that might help a developer figure out a bug is likely to panic a clueless user and prevent them from reading the part that would be useful to them. For debug messages, I think av_log() is mostly fine. We might want to extend it somewhat, for example add a stack backtrace at debug log level, but I do not think a change in architecture is required. What I want to improve is error messages, to make it easier for applications to separate them from the noise of logs and display them in nice dialog boxes. We might get a few features helping debug at the same time, but it is not the main objective, and chasing two hares is a recipe for catching zero. I have quite a lot to answer to the technical points you made below and that I will now snip, but before that I think it is important we check we are on the same page about the goals. Regards, -- Nicolas George _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".