Closed Bug 1298305 Opened 8 years ago Closed 8 years ago

Intermittent dom/media/test/test_mediarecorder_record_canvas_captureStream.html | application terminated with exit code -11 after Assertion failure: !aOther.IsNull() (Cannot compute with aOther null value)

Categories

(Core :: Audio/Video: MediaStreamGraph, defect, P2)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1300871

People

(Reporter: intermittent-bug-filer, Assigned: ctai)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Component: Audio/Video → Audio/Video: MediaStreamGraph
Rank: 25
Priority: -- → P2
Assignee: nobody → ctai
Comment on attachment 8787089 [details] Bug 1298305 - Skip the beginning of null frames. https://reviewboard.mozilla.org/r/75950/#review73966 What does mFirstFrame mean? No doc and I failed to infer from code and name.
Attachment #8787089 - Flags: review?(pehrson)
Comment on attachment 8787089 [details] Bug 1298305 - Skip the beginning of null frames. https://reviewboard.mozilla.org/r/75950/#review74360 ::: dom/media/encoder/TrackEncoder.h:262 (Diff revision 2) > , mTrackRate(aTrackRate) > , mTotalFrameDuration(0) > , mLastFrameDuration(0) > , mVideoBitrate(0) > , mLastFrameTimeStamp(TimeStamp::Now()) > - , mFirstFrame(true) > + , mFirstNonNullFrameAppended(true) I think the name is fine but the bug is here. It should be false at construction. I also think we don't need it at all. More on that below. ::: dom/media/encoder/TrackEncoder.h:365 (Diff revision 2) > - bool mFirstFrame; > + // This is a temporal solution for migrating from duration-based to > + // timestamp-based VideoTrackEncoder. Sp we need to know the first > + // non-null frame for calculating the duration between frames. > + bool mFirstNonNullFrameAppended; Let's remove this and use mLastFrameTimeStamp as the source of truth instead. ::: dom/media/encoder/TrackEncoder.cpp:288 (Diff revision 2) > + > + RefPtr<layers::Image> image = chunk.mFrame.GetImage(); > + // The video segment might contain empty frame in the beginning. > + // Skip those frame. > + if (!mFirstNonNullFrameAppended && !image) { > + continue; > + } > + Not needed. ::: dom/media/encoder/TrackEncoder.cpp:305 (Diff revision 2) > - RefPtr<layers::Image> image = chunk.mFrame.GetImage(); > > // Fixme: see bug 1290777. We should remove the useage of duration here and > // in |GetEncodedTrack|. > StreamTime duration; > - if (mFirstFrame) > + if (mFirstNonNullFrameAppended) Make this `if (!mLastFrameTimeStamp)` instead. ::: dom/media/encoder/TrackEncoder.cpp:321 (Diff revision 2) > if (image) { > mRawSegment.AppendFrame(image.forget(), > duration, > chunk.mFrame.GetIntrinsicSize(), > PRINCIPAL_HANDLE_NONE, > chunk.mFrame.GetForceBlack()); > mLastFrameDuration = 0; > } > mLastFrameTimeStamp = chunk.mTimeStamp; Move the assignment of mLastFrameTimeStamp into the `if (image)` block. Hopefully that doesn't break anything. If it does we should probably fix that instead.
Attachment #8787089 - Flags: review?(pehrson)
Comment on attachment 8787089 [details] Bug 1298305 - Skip the beginning of null frames. https://reviewboard.mozilla.org/r/75950/#review74854 ::: dom/media/encoder/TrackEncoder.cpp:283 (Diff revisions 2 - 3) > ReentrantMonitorAutoEnter mon(mReentrantMonitor); > > // Append all video segments from MediaStreamGraph, including null an > // non-null frames. > VideoSegment::ChunkIterator iter(const_cast<VideoSegment&>(aSegment)); > while (!iter.IsEnded()) { Let's make this a for loop. Otherwise your guard with `continue` is broken at the moment. ::: dom/media/encoder/TrackEncoder.cpp:291 (Diff revisions 2 - 3) > - if (!mFirstNonNullFrameAppended && !image) { > + if (mLastFrameTimeStamp.IsNull() && !image) { > continue; > } Not needed. I think you need to pull the mLastFrame assignment at the bottom of the loop in to the `if (image)` block as well, but I can't see any side effects. ::: dom/media/encoder/TrackEncoder.cpp:304 (Diff revisions 2 - 3) > (mLastFrameDuration >= mTrackRate)) { > > // Fixme: see bug 1290777. We should remove the useage of duration here and > // in |GetEncodedTrack|. > StreamTime duration; > - if (mFirstNonNullFrameAppended) > + if (mLastFrameTimeStamp.IsNull()) This can be `if (!mLastFrameTimeStamp)`.
Attachment #8787089 - Flags: review?(pehrson)
Comment on attachment 8787089 [details] Bug 1298305 - Skip the beginning of null frames. https://reviewboard.mozilla.org/r/75950/#review74998 ::: dom/media/encoder/TrackEncoder.cpp:282 (Diff revisions 3 - 4) > VideoSegment::ChunkIterator iter(const_cast<VideoSegment&>(aSegment)); > - while (!iter.IsEnded()) { > + for (; !iter.IsEnded();iter.Next()) { Nit: The iterator could be declared in the for as well, then we don't keep it around outside the for loop's scope.
Attachment #8787089 - Flags: review?(pehrson) → review+
The solution of 1300871 might also fix this bug. Let's monitor it.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Comment on attachment 8787089 [details] Bug 1298305 - Skip the beginning of null frames. https://reviewboard.mozilla.org/r/75950/#review87820 bug was duped
Attachment #8787089 - Flags: review?(rjesup)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: