Closed Bug 2024007 Opened 8 months ago Closed 8 months ago

AssertedCast error: Cannot cast 21712000 from int64_t to float: out of range [@ mozilla::FFmpegVideoDecoder<46465650>::DecodeStats::UpdateDecodeTimes]

Categories

(Core :: Audio/Video: Playback, defect, P1)

defect

Tracking

()

VERIFIED FIXED
150 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox148 --- unaffected
firefox149 --- unaffected
firefox150 --- verified

People

(Reporter: tsmith, Assigned: jhlin)

References

(Blocks 2 open bugs, Regression, )

Details

(Keywords: assertion, regression, testcase, Whiteboard: [bugmon:bisected,confirmed])

Attachments

(1 file, 1 external file)

Attached video testcase.webm —

Found while fuzzing m-c 20260313-7bada6295526 (--enable-debug --enable-fuzzing)

To reproduce via Grizzly Replay:

$ pip install fuzzfetch grizzly-framework --upgrade
$ python -m fuzzfetch -d --fuzzing -n firefox
$ python -m grizzly.replay.bugzilla ./firefox/firefox <bugid>

AssertedCast error: Cannot cast 21712000 from int64_t to float: out of range

#0 0x7fffea70200f in MOZ_CrashSequence /builds/worker/workspace/obj-build/dist/include/mozilla/Assertions.h:237:3
#1 0x7fffea70200f in AssertedCast<float, long> /builds/worker/workspace/obj-build/dist/include/mozilla/Casting.h:238:5
#2 0x7fffea70200f in mozilla::FFmpegVideoDecoder<58>::DecodeStats::UpdateDecodeTimes(long) /builds/worker/checkouts/gecko/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:1123:31
#3 0x7fffea70262f in mozilla::FFmpegVideoDecoder<58>::DoDecode(mozilla::MediaRawData*, unsigned char*, int, bool*, nsTArray<RefPtr<mozilla::MediaData>>&) /builds/worker/checkouts/gecko/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp:0:0
#4 0x7fffea6b589d in mozilla::FFmpegDataDecoder<62>::DoDecode(mozilla::MediaRawData*, bool*, nsTArray<RefPtr<mozilla::MediaData>>&) /builds/worker/checkouts/gecko/dom/media/platforms/ffmpeg/FFmpegDataDecoder.cpp:334:10
#5 0x7fffea6fa20b in mozilla::FFmpegDataDecoder<58>::ProcessDrain() /builds/worker/checkouts/gecko/dom/media/platforms/ffmpeg/FFmpegDataDecoder.cpp:365:21
#6 0x7fffea6ce6a8 in operator()<> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1083:18
#7 0x7fffea6ce6a8 in __invoke_impl<RefPtr<mozilla::MozPromise<nsTArray<RefPtr<mozilla::MediaData> >, mozilla::MediaResult, true> >, (lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1082:9)> /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/invoke.h:60:14
#8 0x7fffea6ce6a8 in __invoke<(lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1082:9)> /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/invoke.h:95:14
#9 0x7fffea6ce6a8 in __apply_impl<(lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1082:9), std::tuple<> &> /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/tuple:1740:14
#10 0x7fffea6ce6a8 in apply<(lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1082:9), std::tuple<> &> /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/tuple:1751:14
#11 0x7fffea6ce6a8 in apply<mozilla::FFmpegDataDecoder<46465650>, RefPtr<mozilla::MozPromise<nsTArray<RefPtr<mozilla::MediaData> >, mozilla::MediaResult, true> > (mozilla::FFmpegDataDecoder<46465650>::*)()> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1081:12
#12 0x7fffea6ce6a8 in Invoke /builds/worker/workspace/obj-build/dist/include/mozilla/MozPromise.h:1711:47
#13 0x7fffea6ce6a8 in mozilla::detail::ProxyRunnable<mozilla::MozPromise<nsTArray<RefPtr<mozilla::MediaData>>, mozilla::MediaResult, true>, RefPtr<mozilla::MozPromise<nsTArray<RefPtr<mozilla::MediaData>>, mozilla::MediaResult, true>> (mozilla::FFmpegDataDecoder<62>::*)(), mozilla::FFmpegDataDecoder<62>>::Run() /builds/worker/workspace/obj-build/dist/include/mozilla/MozPromise.h:1731:42
#14 0x7fffe5d56437 in mozilla::TaskQueue::Runner::Run() /builds/worker/checkouts/gecko/xpcom/threads/TaskQueue.cpp:311:20
#15 0x7fffe5d7d03e in nsThreadPool::Run() /builds/worker/checkouts/gecko/xpcom/threads/nsThreadPool.cpp:446:14
#16 0x7fffe5d74859 in nsThread::ProcessNextEvent(bool, bool*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:1175:16
#17 0x7fffe5d7a2ef in NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:467:10
#18 0x7fffe695dac8 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:299:20
#19 0x7fffe68b62a1 in RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:366:3
#20 0x7fffe68b62a1 in MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:348:3
#21 0x7fffe5d7036e in nsThread::ThreadFunc(void*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:376:10

This issue has also been detected via live site testing.

Verified bug as reproducible on mozilla-central 20260317212032-ffa0522d513b.
The bug appears to have been introduced in the following build range:

Start: 660174cd6e91069b96c6dc1b1070b64cc35c6428 (20260313012639)
End: 257c23ca81a8a1d76573ec111ede82dd62b51190 (20260313025015)
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=660174cd6e91069b96c6dc1b1070b64cc35c6428&tochange=257c23ca81a8a1d76573ec111ede82dd62b51190

Keywords: regression
Whiteboard: [bugmon:bisected,confirmed]

:chunmin, since you are the author of the regressor, bug 2020854, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(cchang)

:chunmin is on PTO and I'll take this.

Assignee: nobody → jolin
Severity: -- → S2
Status: NEW → ASSIGNED
Flags: needinfo?(cchang)
Priority: -- → P1

Promote mAverageFrameDecodeTime and mAverageFrameDuration
members to double to maintain precision.

Pushed by jolin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/b6b5750f987f https://hg.mozilla.org/integration/autoland/rev/cb6090119bdb promote float values in FFmpegVideoDecoder decode stats r=media-playback-reviewers,alwu
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch

Verified bug as fixed on rev mozilla-central 20260320045236-7a02c40691b2.
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.

Status: RESOLVED → VERIFIED
Keywords: bugmon
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: