BrowserHost has null mRoot when applying initial window size in debug
Discovered both on Linux and on Windows.
Similar to #41165, so the cause could be anywhere.
Maybe I should run a git bisect
.
Notice that Base Browser is known not to crash in this way but in another way (tor-browser#42189 (closed)).
Stack trace
__GI___clock_nanosleep (@clock_nanosleep@GLIBC_2.2.5:29)
__GI___nanosleep (@__nanosleep:9)
__sleep (@sleep:17)
common_crap_handler(int, void const*) (/home/piero/Tor/geckoview/toolkit/xre/nsSigHandlers.cpp:96)
ah_crap_handler(int) (/home/piero/Tor/geckoview/toolkit/xre/nsSigHandlers.cpp:104)
nsProfileLock::FatalSignalHandler(int, siginfo_t*, void*) (/home/piero/Tor/geckoview/toolkit/profile/nsProfileLock.cpp:183)
WasmTrapHandler(int, siginfo_t*, void*) (/home/piero/Tor/geckoview/js/src/wasm/WasmSignalHandlers.cpp:794)
__restore_rt (@__restore_rt:3)
RefPtr<mozilla::dom::BrowserParent>::operator->() const (/home/piero/Tor/geckoview/obj-x86_64-pc-linux-gnu/dist/include/mozilla/RefPtr.h:353)
mozilla::dom::BrowserHost::GetOwnerElement() const (/home/piero/Tor/geckoview/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BrowserHost.h:68)
mozilla::AppWindow::GetPrimaryRemoteTabSize(int*, int*) (/home/piero/Tor/geckoview/xpfe/appshell/AppWindow.cpp:2183)
mozilla::AppWindow::GetPrimaryContentSize(int*, int*) (/home/piero/Tor/geckoview/xpfe/appshell/AppWindow.cpp:2172)
mozilla::AppWindow::ForceRoundedDimensions() (/home/piero/Tor/geckoview/xpfe/appshell/AppWindow.cpp:1144)
mozilla::AppWindow::SizeShell() (/home/piero/Tor/geckoview/xpfe/appshell/AppWindow.cpp:2706)
mozilla::AppWindow::OnChromeLoaded() (/home/piero/Tor/geckoview/xpfe/appshell/AppWindow.cpp:1175)
mozilla::AppWindow::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) (/home/piero/Tor/geckoview/xpfe/appshell/AppWindow.cpp:3329)
nsDocLoader::DoFireOnStateChange(nsIWebProgress*, nsIRequest*, int&, nsresult) (/home/piero/Tor/geckoview/uriloader/base/nsDocLoader.cpp:1380)
nsDocLoader::doStopDocumentLoad(nsIRequest*, nsresult) (/home/piero/Tor/geckoview/uriloader/base/nsDocLoader.cpp:989)
nsDocLoader::DocLoaderIsEmpty(bool, mozilla::Maybe<nsresult> const&) (/home/piero/Tor/geckoview/uriloader/base/nsDocLoader.cpp:797)
nsDocLoader::OnStopRequest(nsIRequest*, nsresult) (/home/piero/Tor/geckoview/uriloader/base/nsDocLoader.cpp:680)
nsDocShell::OnStopRequest(nsIRequest*, nsresult) (/home/piero/Tor/geckoview/docshell/base/nsDocShell.cpp:13859)
mozilla::net::nsLoadGroup::NotifyRemovalObservers(nsIRequest*, nsresult) (/home/piero/Tor/geckoview/netwerk/base/nsLoadGroup.cpp:631)
mozilla::net::nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, nsresult) (/home/piero/Tor/geckoview/netwerk/base/nsLoadGroup.cpp:535)
imgRequestProxy::RemoveFromLoadGroup() (/home/piero/Tor/geckoview/image/imgRequestProxy.cpp:394)
imgRequestProxy::OnLoadComplete(bool) (/home/piero/Tor/geckoview/image/imgRequestProxy.cpp:1075)
void mozilla::image::SyncNotifyInternal<mozilla::image::ObserverTable const*>(mozilla::image::ObserverTable const* const&, bool, unsigned int, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&)::'lambda5'(mozilla::image::IProgressObserver*)::operator()(mozilla::image::IProgressObserver*) const (/home/piero/Tor/geckoview/image/ProgressTracker.cpp:356)
void mozilla::image::ImageObserverNotifier<mozilla::image::ObserverTable const*>::operator()<void mozilla::image::SyncNotifyInternal<mozilla::image::ObserverTable const*>(mozilla::image::ObserverTable const* const&, bool, unsigned int, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&)::'lambda5'(mozilla::image::IProgressObserver*)>(mozilla::image::ObserverTable const*) (/home/piero/Tor/geckoview/image/ProgressTracker.cpp:286)
void mozilla::image::SyncNotifyInternal<mozilla::image::ObserverTable const*>(mozilla::image::ObserverTable const* const&, bool, unsigned int, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&) (/home/piero/Tor/geckoview/image/ProgressTracker.cpp:355)
mozilla::image::ProgressTracker::SyncNotifyProgress(unsigned int, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&)::$_0::operator()(mozilla::image::ObserverTable const*) const (/home/piero/Tor/geckoview/image/ProgressTracker.cpp:374)
decltype(fp(static_cast<mozilla::image::ObserverTable const*>(nullptr))) mozilla::image::CopyOnWrite<mozilla::image::ObserverTable>::Read<mozilla::image::ProgressTracker::SyncNotifyProgress(unsigned int, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&)::$_0>(mozilla::image::ProgressTracker::SyncNotifyProgress(unsigned int, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&)::$_0) const (/home/piero/Tor/geckoview/image/CopyOnWrite.h:155)
mozilla::image::ProgressTracker::SyncNotifyProgress(unsigned int, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&) (/home/piero/Tor/geckoview/image/ProgressTracker.cpp:373)
mozilla::image::VectorImage::OnSVGDocumentLoaded() (/home/piero/Tor/geckoview/image/VectorImage.cpp:1491)
mozilla::image::SVGLoadEventListener::HandleEvent(mozilla::dom::Event*) (/home/piero/Tor/geckoview/image/VectorImage.cpp:213)
mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*) (/home/piero/Tor/geckoview/dom/events/EventListenerManager.cpp:1241)
mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) (/home/piero/Tor/geckoview/dom/events/EventListenerManager.cpp:1427)
mozilla::EventListenerManager::HandleEvent(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) (/home/piero/Tor/geckoview/obj-x86_64-pc-linux-gnu/dist/include/mozilla/EventListenerManager.h:412)
mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&) (/home/piero/Tor/geckoview/dom/events/EventDispatcher.cpp:342)
mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) (/home/piero/Tor/geckoview/dom/events/EventDispatcher.cpp:545)
mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) (/home/piero/Tor/geckoview/dom/events/EventDispatcher.cpp:1133)
mozilla::EventDispatcher::DispatchDOMEvent(nsISupports*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsPresContext*, nsEventStatus*) (/home/piero/Tor/geckoview/dom/events/EventDispatcher.cpp:1260)
nsINode::DispatchEvent(mozilla::dom::Event&, mozilla::dom::CallerType, mozilla::ErrorResult&) (/home/piero/Tor/geckoview/dom/base/nsINode.cpp:1399)
mozilla::dom::EventTarget::DispatchEvent(mozilla::dom::Event&) (/home/piero/Tor/geckoview/dom/events/EventTarget.cpp:180)
mozilla::AsyncEventDispatcher::DispatchEventOnTarget(mozilla::dom::EventTarget*, mozilla::dom::Event*, mozilla::ChromeOnlyDispatch, mozilla::Composed) (/home/piero/Tor/geckoview/dom/events/AsyncEventDispatcher.cpp:89)
mozilla::AsyncEventDispatcher::DispatchEventOnTarget(mozilla::dom::EventTarget*, nsTSubstring<char16_t> const&, mozilla::CanBubble, mozilla::ChromeOnlyDispatch, mozilla::Composed) (/home/piero/Tor/geckoview/dom/events/AsyncEventDispatcher.cpp:75)
mozilla::AsyncEventDispatcher::Run() (/home/piero/Tor/geckoview/dom/events/AsyncEventDispatcher.cpp:62)
mozilla::RunnableTask::Run() (/home/piero/Tor/geckoview/xpcom/threads/TaskController.cpp:555)
mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) (/home/piero/Tor/geckoview/xpcom/threads/TaskController.cpp:879)
mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) (/home/piero/Tor/geckoview/xpcom/threads/TaskController.cpp:702)
mozilla::TaskController::ProcessPendingMTTask(bool) (/home/piero/Tor/geckoview/xpcom/threads/TaskController.cpp:491)
mozilla::TaskController::TaskController()::$_0::operator()() const (/home/piero/Tor/geckoview/xpcom/threads/TaskController.cpp:218)
mozilla::detail::RunnableFunction<mozilla::TaskController::TaskController()::$_0>::Run() (/home/piero/Tor/geckoview/xpcom/threads/nsThreadUtils.h:548)
nsThread::ProcessNextEvent(bool, bool*) (/home/piero/Tor/geckoview/xpcom/threads/nsThread.cpp:1240)
NS_ProcessNextEvent(nsIThread*, bool) (/home/piero/Tor/geckoview/xpcom/threads/nsThreadUtils.cpp:479)
mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) (/home/piero/Tor/geckoview/ipc/glue/MessagePump.cpp:85)
MessageLoop::RunInternal() (/home/piero/Tor/geckoview/ipc/chromium/src/base/message_loop.cc:368)
MessageLoop::RunHandler() (/home/piero/Tor/geckoview/ipc/chromium/src/base/message_loop.cc:361)
MessageLoop::Run() (/home/piero/Tor/geckoview/ipc/chromium/src/base/message_loop.cc:343)
nsBaseAppShell::Run() (/home/piero/Tor/geckoview/widget/nsBaseAppShell.cpp:148)
nsAppStartup::Run() (/home/piero/Tor/geckoview/toolkit/components/startup/nsAppStartup.cpp:295)
XREMain::XRE_mainRun() (/home/piero/Tor/geckoview/toolkit/xre/nsAppRunner.cpp:5674)
mozconfig
. $topsrcdir/mozconfig-linux-x86_64-dev
CBINDGEN=/home/piero/Tor/toolchains/cbindgen-0.24.3/cbindgen
ac_add_options --enable-debug
ac_add_options --enable-debug-js-modules
ac_add_options --disable-optimize
ac_add_options --disable-rust-simd
ac_add_options --enable-tests