Bug 255484 - Chromium crashes when I open screen sharing on Discord Web
Summary: Chromium crashes when I open screen sharing on Discord Web
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-chromium (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-29 14:09 UTC by Jonas Lopes
Modified: 2021-05-20 16:01 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (chromium)


Attachments
Chromium crashes when I open screen sharing on Discord Web (30.86 KB, image/png)
2021-04-29 14:09 UTC, Jonas Lopes
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Lopes 2021-04-29 14:09:58 UTC
Created attachment 224526 [details]
Chromium crashes when I open screen sharing on Discord Web

After the update, Chromium crashes when I open screen sharing on Discord Web. 


-----------------------------------------------------------

❯ sudo pkg info chromium
chromium-89.0.4389.128
Name           : chromium
Version        : 89.0.4389.128
Installed on   : Tue Apr 27 07:31:51 2021 -03
Origin         : www/chromium
Architecture   : FreeBSD:14:amd64
Prefix         : /usr/local
Categories     : java www
Licenses       : BSD3CLAUSE, LGPL21, MPL11
Maintainer     : chromium@FreeBSD.org
WWW            : https://www.chromium.org/Home
Comment        : Google web browser based on WebKit
...

❯ uname -a
FreeBSD freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #2 main-n246315-4b84b4cca47: Mon Apr 26 07:50:16 -03 2021     root@freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64

-----------------------------------------------------------

P.S.
Comment 1 Matthias Wolf 2021-04-29 14:17:00 UTC
A quick test with 90.0.4430.93 seems to work (on 13.0-RELEASE).

Can you try to run this, or run your version in the console and see whether there is any error message that might hint at what exactly happens?
Comment 2 Jonas Lopes 2021-04-30 04:22:44 UTC
(In reply to Matthias Wolf from comment #1)

Hello Matthias,

Of course!

Indeed, a fatal error has occurred.

-------------------------------------------------------------------------------
[60094:388478:0430/011016.623886:ERROR:audio_rtp_receiver.cc(90)] AudioRtpReceiver::OnSetVolume: No audio channel exists.
[60094:388478:0430/011016.624286:ERROR:audio_rtp_receiver.cc(90)] AudioRtpReceiver::OnSetVolume: No audio channel exists.
[60094:388478:0430/011016.624811:ERROR:audio_rtp_receiver.cc(90)] AudioRtpReceiver::OnSetVolume: No audio channel exists.
[60094:388478:0430/011016.879215:ERROR:webrtc_video_engine.cc(3366)] Absent receive stream; ignoring clearing encoded frame sink for ssrc 0


#
# Fatal error in: ../../third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc, line 81
# last system error: 13
# Check failed: context->lowres == 0 (215241120 vs. 0)
# [87119:388822:0430/011026.334699:ERROR:audio_rtp_receiver.cc(90)] AudioRtpReceiver::OnSetVolume: No audio channel exists.


[87119:388822:0430/011026.335281:ERROR:audio_rtp_receiver.cc(90)] AudioRtpReceiver::OnSetVolume: No audio channel exists.
[87119:388822:0430/011026.335406:ERROR:audio_rtp_receiver.cc(90)] AudioRtpReceiver::OnSetVolume: No audio channel exists.
[87119:388822:0430/011026.335500:ERROR:audio_rtp_receiver.cc(90)] AudioRtpReceiver::OnSetVolume: No audio channel exists.
[87119:388822:0430/011026.335597:ERROR:audio_rtp_receiver.cc(90)] AudioRtpReceiver::OnSetVolume: No audio channel exists.
-------------------------------------------------------------------------------
Comment 3 Matthias Wolf 2021-04-30 13:42:39 UTC
context->lowres should be set by FFmpeg initially, and only checked by webrtc. I'll prepare a patch to force it to 0 on allocating the context, hoping that helps.

In the meantime, can you share the options set for your ffmpeg package?
Comment 4 Jonas Lopes 2021-04-30 17:17:21 UTC
(In reply to Matthias Wolf from comment #3)

Hello Matthias,

Nice!

----------------------------------------------------------------------------
❯ ffmpeg
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe)
  configuration: --prefix=/usr/local --mandir=/usr/local/man --datadir=/usr/local/share/ffmpeg --pkgconfigdir=/usr/local/libdata/pkgconfig --disable-static --enable-shared --enable-pic --enable-gpl --enable-avresample --cc=cc --cxx=c++ --disable-alsa --disable-libopencore-amrnb --disable-libopencore-amrwb --enable-libaom --disable-libaribb24 --enable-asm --enable-libass --disable-libbs2b --disable-libcaca --disable-libcdio --disable-libcelt --disable-libcodec2 --enable-libdav1d --disable-libdavs2 --disable-libdc1394 --disable-debug --enable-htmlpages --enable-libdrm --disable-libfdk-aac --disable-libflite --enable-fontconfig --enable-libfreetype --enable-frei0r --disable-libfribidi --disable-gcrypt --disable-libglslang --disable-libgme --enable-gmp --enable-gnutls --enable-version3 --disable-libgsm --enable-iconv --disable-libilbc --disable-libjack --disable-libklvanc --disable-libkvazaar --disable-ladspa --enable-libmp3lame --disable-liblensfun --disable-libbluray --disable-librsvg --disable-librtmp --enable-libxml2 --disable-lto --disable-lv2 --disable-mbedtls --disable-libmfx --disable-libmodplug --disable-libmysofa --disable-nonfree --disable-openal --disable-opencl --disable-opengl --disable-libopenh264 --disable-libopenjpeg --disable-libopenmpt --disable-openssl --disable-libopenvino --enable-optimizations --enable-libopus --disable-pocketsphinx --disable-libpulse --disable-librabbitmq --disable-librav1e --disable-librist --enable-runtime-cpudetect --disable-librubberband --disable-sdl2 --disable-libsmbclient --disable-libsnappy --disable-sndio --disable-libsoxr --disable-libspeex --disable-libsrt --disable-libssh --disable-libtensorflow --disable-libtesseract --enable-libtheora --disable-libtwolame --disable-libuavs3d --enable-libv4l2 --enable-vaapi --disable-vapoursynth --enable-vdpau --disable-libvidstab --disable-libvmaf --enable-libvorbis --disable-libvo-amrwbenc --enable-libvpx --disable-vulkan --disable-libwebp --enable-libx264 --enable-libx265 --disable-libxavs2 --enable-libxcb --enable-libxvid --disable-outdev=xv --disable-libzimg --disable-libzmq --disable-libzvbi
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

❯ sudo pkg info ffmpeg  
ffmpeg-4.4,1
Name           : ffmpeg
Version        : 4.4,1
Installed on   : Fri Apr 23 00:18:24 2021 -03
Origin         : multimedia/ffmpeg
Architecture   : FreeBSD:14:amd64
Prefix         : /usr/local
Categories     : net audio multimedia
Licenses       : GPLv3+, LGPL3+
Maintainer     : multimedia@FreeBSD.org
WWW            : http://ffmpeg.org/
Comment        : Realtime audio/video encoder/converter and streaming server
Options        :
	ALSA           : off
	AMR_NB         : off
	AMR_WB         : off
	AOM            : on
	ASM            : on
	ASS            : on
	BS2B           : off
	CACA           : off
	CDIO           : off
	CELT           : off
	CODEC2         : off
	DAV1D          : on
	DC1394         : off
	DEBUG          : off
	DOCS           : on
	DRM            : on
	FDK_AAC        : off
	FLITE          : off
	FONTCONFIG     : on
	FREETYPE       : on
	FREI0R         : on
	FRIBIDI        : off
	GCRYPT         : off
	GLSLANG        : off
	GME            : off
	GMP            : on
	GNUTLS         : on
	GPL3           : on
	GSM            : off
	ICONV          : on
	ILBC           : off
	JACK           : off
	KVAZAAR        : off
	LADSPA         : off
	LAME           : on
	LENSFUN        : off
	LIBBLURAY      : off
	LIBRSVG2       : off
	LIBRTMP        : off
	LIBXML2        : on
	LTO            : off
	LV2            : off
	MBEDTLS        : off
	MFX            : off
	MODPLUG        : off
	MYSOFA         : off
	NONFREE        : off
	OPENAL         : off
	OPENCL         : off
	OPENGL         : off
	OPENH264       : off
	OPENJPEG       : off
	OPENMPT        : off
	OPENSSL        : off
	OPTIMIZED_CFLAGS: on
	OPUS           : on
	POCKETSPHINX   : off
	PULSEAUDIO     : off
	RABBITMQ       : off
	RAV1E          : off
	RIST           : off
	RTCPU          : on
	RUBBERBAND     : off
	SDL            : off
	SMB            : off
	SNAPPY         : off
	SNDIO          : off
	SOXR           : off
	SPEEX          : off
	SSH            : off
	SVTAV1         : off
	SVTHEVC        : off
	SVTVP9         : off
	TESSERACT      : off
	THEORA         : on
	TWOLAME        : off
	V4L            : on
	VAAPI          : on
	VAPOURSYNTH    : off
	VDPAU          : on
	VIDSTAB        : off
	VMAF           : off
	VORBIS         : on
	VO_AMRWBENC    : off
	VPX            : on
	VULKAN         : off
	WEBP           : off
	X264           : on
	X265           : on
	XCB            : on
	XVID           : on
	XVIDEO         : off
	ZIMG           : off
	ZMQ            : off
	ZVBI           : off
Shared Libs required:
	libtheoraenc.so.1
	libxcb-shape.so.0
	libxcb-xfixes.so.0
	libopus.so.0
	libfreetype.so.6
	libvorbisenc.so.2
	libva-drm.so.2
	libxml2.so.2
	libxcb-shm.so.0
	libgnutls.so.30
	libdrm.so.2
	libvpx.so.6
	libxcb.so.1
	libvdpau.so.1
	libtheoradec.so.1
	libva.so.2
	libX11.so.6
	libv4l2.so.0
	libx265.so.192
	libgmp.so.10
	libdav1d.so.5
	libx264.so.161
	libxvidcore.so.4
	libvorbis.so.0
	libmp3lame.so.0
	libaom.so.3
	libfontconfig.so.1
	libass.so.9
Shared Libs provided:
	libswscale.so.5
	libavutil.so.56
	libavfilter.so.7
	libavcodec.so.58
	libavdevice.so.58
	libavformat.so.58
	libswresample.so.3
	libavresample.so.4
	libpostproc.so.55
Annotations    :
	FreeBSD_version: 1400008
	cpe            : cpe:2.3:a:ffmpeg:ffmpeg:4.4:::::freebsd14:x64
	repo_type      : binary
	repository     : FreeBSD
Flat size      : 33.2MiB
Description    :
FFmpeg is a complete, cross-platform solution to record, convert and stream
audio and video. It includes libavcodec - the leading audio/video codec
library.

WWW: http://ffmpeg.org/
----------------------------------------------------------------------------
Comment 5 Matthias Wolf 2021-05-11 16:26:14 UTC
Added a fix for h264_decoder_impl.cc to 90.0.4430.212. Tested with Discord and Microsoft Teams, seems to be working so far.
Comment 6 Jonas Lopes 2021-05-12 13:51:20 UTC
(In reply to Matthias Wolf from comment #5)
Hello Matthias,
Thanks! 
I will test and return.
Comment 7 Marek Zarychta 2021-05-15 06:29:37 UTC
*** Bug 255687 has been marked as a duplicate of this bug. ***
Comment 8 commit-hook freebsd_committer 2021-05-16 10:31:33 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=74647995deae7050b6f9a3bf3b3a3ef8ff25ad63

commit 74647995deae7050b6f9a3bf3b3a3ef8ff25ad63
Author:     Rene Ladan <rene@FreeBSD.org>
AuthorDate: 2021-05-15 18:56:06 +0000
Commit:     Rene Ladan <rene@FreeBSD.org>
CommitDate: 2021-05-16 10:29:58 +0000

    www/chromium: attempt to make it work with Microsoft Teams

    - add dependency virtual_oss so the microphone works [1]
    - skip assertion in h264_decoder, we will force it to initialize
      later [2]

    PR:     246214 [1]
    PR:     255484 [2]
    MFH:    2021Q2

 www/chromium/Makefile                              |  4 +++-
 ...ideo__coding_codecs_h264_h264__decoder__impl.cc | 22 ++++++++++++++++------
 2 files changed, 19 insertions(+), 7 deletions(-)
Comment 9 commit-hook freebsd_committer 2021-05-16 11:31:47 UTC
A commit in branch 2021Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c82dfb1970514b7f33883c7651b4cfc676e8c7fc

commit c82dfb1970514b7f33883c7651b4cfc676e8c7fc
Author:     Rene Ladan <rene@FreeBSD.org>
AuthorDate: 2021-05-15 18:56:06 +0000
Commit:     Rene Ladan <rene@FreeBSD.org>
CommitDate: 2021-05-16 11:31:05 +0000

    www/chromium: attempt to make it work with Microsoft Teams

    - add dependency virtual_oss so the microphone works [1]
    - skip assertion in h264_decoder, we will force it to initialize
      later [2]

    PR:     246214 [1]
    PR:     255484 [2]
    MFH:    2021Q2
    (cherry picked from commit 74647995deae7050b6f9a3bf3b3a3ef8ff25ad63)

 www/chromium/Makefile                              |  4 +++-
 ...ideo__coding_codecs_h264_h264__decoder__impl.cc | 22 ++++++++++++++++------
 2 files changed, 19 insertions(+), 7 deletions(-)
Comment 10 Rene Ladan freebsd_committer 2021-05-16 11:33:45 UTC
I commented out the assert, Teams runs fine now.
Comment 11 Jonas Lopes 2021-05-17 13:16:30 UTC
(In reply to Matthias Wolf from comment #5)
Hi,

Strangely the problem remains!

> #
> # Fatal error in: ../../third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc, line 80
> # last system error: 13
> # Check failed: context->lowres == 0 (223629728 vs. 0)
> #
Comment 12 Jonas Lopes 2021-05-17 13:19:20 UTC
(In reply to Matthias Wolf from comment #5)

The version is correct:

> ❯ sudo pkg info chromium
> chromium-90.0.4430.212
> Name           : chromium
> Version        : 90.0.4430.212
> Installed on   : Mon May 17 10:00:07 2021 -03
> Origin         : www/chromium
> Architecture   : FreeBSD:14:amd64
> Prefix         : /usr/local
> Categories     : java www
> Licenses       : BSD3CLAUSE, LGPL21, MPL11
> Maintainer     : chromium@FreeBSD.org
> WWW            : https://www.chromium.org/Home
> Comment        : Google web browser based on WebKit
> ...
Comment 13 Marek Zarychta 2021-05-17 13:26:28 UTC
It should be fixed in 90.0.4430.212_1 which hasn't been built yet. Please follow https://www.freshports.org/www/chromium to check availability for the specific platform and FreeBSD version.
Comment 14 Jonas Lopes 2021-05-20 13:19:32 UTC
(In reply to Marek Zarychta from comment #13)
Hi,

Version 90.0.4430.212_1 installed through binary ports.

I tested it on Discord and Teams. Everything is working!!! 

Thanks!
Comment 15 Marek Zarychta 2021-05-20 13:42:21 UTC
(In reply to Jonas Lopes from comment #14)
Thanks for testing. That's really good news! If you are satisfied with the results, then please consider closing this bug.
Comment 16 Jonas Lopes 2021-05-20 16:01:23 UTC
Everything tested and working:

- Skype
- Teams
- Discord
- Google Meet

Thank you to everyone involved. 

Fixed!