New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 820658 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 823592
Owner: ----
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Quick View DCHECK failure when viewing certain Video

Project Member Reported by sashab@chromium.org, Mar 10 2018

Issue description

What steps will reproduce the problem?
(1) Download sample DivX video from http://trailers.divx.com/divx_prod/divx_plus_hd_showcase/Sintel_DivXPlus_6500kbps.mkv (source: http://www.divx.com/en/devices/profiles/video)
(2) Open with Files App
(3) Click Space to view in Quick View

What is the expected result?

The video is displayed.

What happens instead?

The browser process crashes (DCHECK failure).

Stack trace:

[131003:131003:0310/112737.291794:FATAL:media_web_contents_observer.cc(227)] Check failed: has_audio || has_video. 
#0 0x7f51a4e0041c base::debug::StackTrace::StackTrace()
#1 0x7f51a4e2709c logging::LogMessage::~LogMessage()
#2 0x7f51a22ca477 content::MediaWebContentsObserver::OnMediaPlaying()
#3 0x7f51a22ca250 _ZN3IPC8MessageTI46MediaPlayerDelegateHostMsg_OnMediaPlaying_MetaNSt3__15tupleIJibbbN5media16MediaContentTypeEEEEvE8DispatchIN7content24MediaWebContentsObserverESA_NS9_15RenderFrameHostEMSA_FvPSB_ibbbS5_EEEbPKNS_7MessageEPT_PT0_PT1_T2_
#4 0x7f51a22c9d83 content::MediaWebContentsObserver::OnMessageReceived()
#5 0x7f51a24d3f92 content::WebContentsImpl::OnMessageReceived()
#6 0x7f51a21a8ba6 content::RenderFrameHostImpl::OnMessageReceived()
#7 0x7f51a239ee8d content::RenderProcessHostImpl::OnMessageReceived()
#8 0x7f51a3fc9cb1 IPC::ChannelProxy::Context::OnDispatchMessage()
#9 0x7f51a3fcc7db _ZN4base8internal7InvokerINS0_9BindStateIMN3IPC12ChannelProxy7ContextEFvRKNS3_7MessageEEJ13scoped_refptrIS5_ES6_EEEFvvEE3RunEPNS0_13BindStateBaseE
#10 0x7f51a4e00d04 base::debug::TaskAnnotator::RunTask()
#11 0x7f51a4e31dc9 base::internal::IncomingTaskQueue::RunTask()
#12 0x7f51a4e359db base::MessageLoop::RunTask()
#13 0x7f51a4e35d7a base::MessageLoop::DeferOrRunPendingTask()
#14 0x7f51a4e35fdc base::MessageLoop::DoWork()
#15 0x7f51a4e383c9 base::MessagePumpLibevent::Run()
#16 0x7f51a4e35309 base::MessageLoop::Run()
#17 0x7f51a4e6c159 base::RunLoop::Run()
#18 0x55a91d9725ba ChromeBrowserMainParts::MainMessageLoopRun()
#19 0x7f51a2049987 content::BrowserMainLoop::RunMainMessageLoopParts()
#20 0x7f51a204cc16 content::BrowserMainRunnerImpl::Run()
#21 0x7f51a20459ea content::BrowserMain()
#22 0x7f51a2a34dbe content::ContentMainRunnerImpl::Run()
#23 0x7f51a5342024 service_manager::Main()
#24 0x7f51a2a333e4 content::ContentMain()
#25 0x55a91ce28943 ChromeMain
#26 0x7f5197c842b1 __libc_start_main
#27 0x55a91ce287ba _start


 

Comment 1 by sashab@chromium.org, Mar 10 2018

Description: Show this description

Comment 2 by sashab@chromium.org, Mar 10 2018

Cc: slangley@chromium.org
Labels: -Pri-1 M-67 Pri-2
Owner: noel@chromium.org
Status: Assigned (was: Available)
Summary: Quick View DCHECK failure when viewing certain Video (was: Quick View Crashes when viewing certain Video)
This is a DCHECK failure so it's unclear what the impact is. Disabling the DCHECK seems to work, except the video plays with no audio and no video.

Noel -- assigning to you to investigate (might be an easy fix/good first bug) and marking as a P2 for M67.

Comment 3 by sashab@chromium.org, Mar 10 2018

Description: Show this description

Comment 4 by noel@chromium.org, Mar 18 2018

Cc: dalecur...@chromium.org
Labels: Needs-Feedback OS-Chrome
[131003:131003:0310/112737.291794:FATAL:media_web_contents_observer.cc(227)] Check failed: has_audio || has_video. 

The DCHECk code is there from about 2015.

+dalecurtis, not sure how we could be in this state on ChromeOS: the DCHECK is in MediaWebContentsObserver::OnMediaPlaying()

https://cs.chromium.org/chromium/src/content/browser/media/media_web_contents_observer.cc?type=cs&q=MediaWebContentsObserver::OnMediaPlaying&sq=package:chromium&l=196

So we are playing media? (not that I know the chrome media stack well) And we have no audio and no video based on the DCHECK.  One wonders what media is playing? ...
What does it mean to play with "no audio and no video" ? If this doesn't happen in Chrome proper I'd guess something is going wrong in however Files/Quick View is working. Is that a CrOS app or a ARC++ thing?

Comment 6 by noel@chromium.org, Mar 20 2018

> What does it mean to play with "no audio and no video"?

Yeah, weird that something would send MediaWebContentsObserver::OnMediaPlaying message when the source renderer is not doing either.

> Is that a CrOS app or a ARC++ thing?

FilesApp is a CrOS app.  Pressing space key when a file is selected in FilesApp, pops open a window to show that file.  In the case of video, the window is a <webview> element (a sandboxed renderer) and its DOM document contains an autoplay <video> element ...

file_manager/foreground/elements/files_safe_video_webview_content.html https://goo.gl/31uYM8

<html>
  <head>
    <link rel="stylesheet" type="text/css" href="files_safe_video_webview_content.css">
  </head>
  <body>
    <video hidden id="content" muted autoplay controls controlsList="nodownload">
    </video>
    <script src="files_safe_media_webview_content.js"></script>
  </body>
</html>

cros-filesapp-quickview-simtel.png
161 KB View Download

Comment 7 by noel@chromium.org, Mar 20 2018

Cc: noel@chromium.org
Owner: sashab@chromium.org
I changed the MediaWebContentsObserver::OnMediaPlaying code to intentionally crash

   // Notify observers of the new player.
-  DCHECK(has_audio || has_video);
+  LOG(ERROR) << __FUNCTION__ << " has_audio " << has_audio;
+  LOG(ERROR) << __FUNCTION__ << " has_video " << has_video;
+  CHECK(has_audio || has_video);
   web_contents_impl()->MediaStartedPlaying(
       WebContentsObserver::MediaPlayerInfo(has_video, has_audio), id);
}

and built M67 chrome with the SimpleChrome flow and gn args:

  is_official_build = true
  is_chrome_branded = true

and then deployed chrome to my CrOS chell device.

$ export BOARD=chell && cros chrome-sdk --board=$BOARD --log-level=info
$ autoninja -C out_${BOARD}/Release chrome chrome_sandbox nacl_helper
$ deploy_chrome --build-dir=out_${BOARD}/Release --to=${IPADDR}

After the reboot, opened Sintel_DivXPlus_6500kbps.mkv file in FilesApp, selected the file, and pressed space:  It opened in the FilesApp QuickView <webview> (picture attached above).

Should crash per this report, but it does not crash for me.  I mashed the space key also for good measure, still no crash.

@sashab: no reproduction, dunno what CrOS device/gn args/chrome you are using, but if you have a reliable reproduction ... :)
Cc: mlamouri@chromium.org
I think this is  issue 823592 
Mergedinto: 823592
Status: Duplicate (was: Assigned)
Yes, it's a dup from  bug 823592 . Because the audio is muted, we pretend that it's an audio-less playback. Then, if the video can't be played, it might crash. Maybe sashab@ did not have proprietary_codecs set.

Comment 10 by noel@chromium.org, Mar 21 2018

Thanks Dale and Mounir.  CrOS FilesApp QuickView's video is "autoplay muted".

> Maybe sashab@ did not have proprietary_codecs set

Yeap: no proprietary_codecs set. Docs we're using need improvement re flags to use match official chrome video in CrOS. /me currently using

cros chrome-sdk --board=$BOARD --log-level=info --internal \
  --gn-extra-args='ffmpeg_branding="Chrome" proprietary_codecs=true'

Note sure it's right.  Any tips appreciated.

Comment 11 by noel@chromium.org, Mar 21 2018

Cc: sashab@chromium.org
Labels: -Needs-Feedback
Owner: ----

Sign in to add a comment