Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Chromium and Chromecast Crashes on wifi—a workaround
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 17

PostPosted: Tue Oct 10, 2017 1:40 am    Post subject: Chromium and Chromecast Crashes on wifi—a workaround Reply with quote

TL;DR: build Chromium with Clang if you want it to cast over wifi.

Hi all,

I had installed Chromium on my laptop in order to use it to cast to the TV (I typically use Firefox on my desktop), but ran into problems. After some searching and following the advice found here: https://askubuntu.com/questions/825903/using-chromium-v52-chromecast-no-longer-works-and-cant-find-device/908074#908074 This enabled me to cast natively (apparently the extension is no longer supported), but it only worked once. After that Chromium would crash as soon as I opened it.

After further searching, I found this issue: https://askubuntu.com/questions/932016/chromium-crashes-as-soon-as-i-log-in I was able to get Chromium to cast, but only after invoking it from the command line with:
Code:
chromium-browser --disable-extensions

Chromium cannot find anything to cast to in that mode, but after closing and reopening in regular user mode, it would work, but only for that one session, and it would sometimes still crash right in the middle of casting.

More digging came up with comment #23 on this bug report: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1702407 and the link to here: https://bugs.chromium.org/p/chromium/issues/detail?id=409318 , that further led me to this blog post: http://blog.llvm.org/2015/01/using-clang-for-chrome-production.html all of which is very interesting, but suffice it to say, I was convinced to go through the effort of installing Clang and try building Chromium with it.

There’s a very nice tutorial here: https://wiki.gentoo.org/wiki/Clang about how to get it up-and-going. After following that and patiently waiting for it to build, I was met with a solid, stable Chromium that would indeed cast without issue—no bugs, no crashing—a very satisfying result.

Hope this saves someone else from the same struggle.

Peace. Love. Happiness.

EDITED: used wrong link in first paragraph.


Last edited by unheatedgarage on Wed Oct 11, 2017 3:53 am; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 11302

PostPosted: Wed Oct 11, 2017 1:11 am    Post subject: Reply with quote

Interesting. Thank you. Chrome relied on an unspecified part of the language (order of evaluation of function arguments). One compiler (gcc) implemented it in a way that caused a use-after-free. Another compiler (clang) implemented it in a way that happened to work for this particular case. According to the standard, both are correct. Incidentally, if the arguments had been written in the other order in the source, gcc would've produced a stable program and clang would've produced an unstable program. In that case, both compilers would again be correct.

As an alternative to using clang, users could incorporate the commit referenced in the Chromium upstream bug report, either by backporting it or by using a version of Chromium which includes it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum