Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Nicolas George <george@nsup.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [RFC] Advanced Error Codes
Date: Tue, 12 Aug 2025 16:43:29 +0200
Message-ID: <aJtTEdUQDAC5rL2o@phare.normalesup.org> (raw)
In-Reply-To: <20250803213232.GH29660@pb2>

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".

  reply	other threads:[~2025-08-12 14:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-02 14:43 Michael Niedermayer
2025-07-02 14:52 ` Nicolas George
2025-07-02 17:16   ` Michael Niedermayer
2025-07-03  8:56     ` Nicolas George
2025-07-03 15:52       ` Michael Niedermayer
2025-07-04 13:29         ` Nicolas George
2025-07-06 14:33           ` Michael Niedermayer
2025-07-28 22:01             ` Nicolas George
2025-07-28 22:04               ` Nicolas George
2025-08-03 21:32               ` Michael Niedermayer
2025-08-12 14:43                 ` Nicolas George [this message]
2025-07-02 17:21 ` Michael Niedermayer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aJtTEdUQDAC5rL2o@phare.normalesup.org \
    --to=george@nsup.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git