Closed Bug 1554597 Opened 5 years ago Closed 5 years ago

Crash in [@ mozilla::gfx::VRProcessManager::OnPreferenceChange]

Categories

(Core :: Graphics, defect)

Unspecified
Windows 7
defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla69
Tracking Status
firefox-esr60 --- unaffected
firefox67 --- unaffected
firefox67.0.1 --- unaffected
firefox68 --- unaffected
firefox69 + verified

People

(Reporter: calixte, Assigned: jya)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

This bug is for crash report bp-ad2ab310-7dc9-4049-8355-4f5f60190527.

Top 10 frames of crashing thread:

0 xul.dll void mozilla::gfx::VRProcessManager::OnPreferenceChange gfx/vr/ipc/VRProcessManager.cpp:221
1 xul.dll nsresult mozilla::gfx::VRProcessManager::Observer::Observe gfx/vr/ipc/VRProcessManager.cpp:191
2 xul.dll static void nsPrefBranch::NotifyObserver modules/libpref/Preferences.cpp:2735
3 xul.dll static void NotifyCallbacks modules/libpref/Preferences.cpp:1644
4 xul.dll static nsresult pref_SetPref modules/libpref/Preferences.cpp:1601
5 xul.dll mozilla::Preferences::SetInt modules/libpref/Preferences.cpp:4797
6 xul.dll nsresult mozilla::detail::RunnableMethodImpl< xpcom/threads/nsThreadUtils.h:1174
7 xul.dll nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:1176
8 xul.dll NS_ProcessNextEvent xpcom/threads/nsThreadUtils.cpp:486
9 xul.dll void mozilla::ipc::MessagePump::Run ipc/glue/MessagePump.cpp:110

There are 34 crashes (from 22 installations) in nightly 69 with buildid 20190526211422. In analyzing the backtrace, the regression may have been introduced by patch [1] to fix bug 1550422.

[1] https://hg.mozilla.org/mozilla-central/rev?node=0a6cc70b3c31

Flags: needinfo?(jyavenard)
Assignee: nobody → jyavenard
Flags: needinfo?(jyavenard)

This is a null deref as Observer::mManager was cleared in ~VRProcessManager and the Preferences observer wasn't deregistered.

I don't fully register on why we would reach the VRProcessManager destructor could be called before receiving the XPCOM shutdown message.

But seeing there was specific code to handle this case it must be for a reason.

Remove unecessary Unregister method.

The method is called only once and right prior the parent object gets deleted.
There could be a case where the VRProcessManager destructor gets called before xpcom's shutdown. This would have lead to the now deleted object being called by the Preferences.

Hi guys, I managed to reproduce this crash (ID: e30ad90b-23b5-458e-86d1-1d52e0190527) with a few tabs open.

  1. Have Youtube , Facebook, Pinterest and https://edition.cnn.com/2016/10/10/us/weather-matthew/index.html all opened in different tabs,
  2. Play the video on Top and then scroll to the bottom of the page.
  3. Paste this URL : https://om.forgeofempires.com/foe/us/?ref=mib_us_us_sebr&k=forge%20of%20empires in the CNN tab and after the page loads click the back button.
  4. Switch through the tabs a few times and the repaste the url in the CNN tab and hit ENTER.

In case it doesnt crash try going back and forward from CNN to the Empires game and switch tabs, for me its 100% repro rate.
I may have been playing with the Autoplay feature a bit but I'm not sure its related since the crash happens without it.

https://crash-stats.mozilla.org/report/index/26dfa3fa-9c88-4498-a011-be8390190527

Flags: needinfo?(jyavenard)
Blocks: 1554708

Issue also occurring on Windows 10 1903. Quite an annoying bug.

Flags: needinfo?(jyavenard)

The VR process will be shutdown once we exit from a WebVR page and be relaunched a new VR process when entering a WebVR page again. That's why it will shutdown prior XPCOM. Our test cases should cover it already.

Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/mozilla-central/rev/d8321d0b2c5b Deregister Preferences observer on destructor. r=daoshengmu a=nightly-ifx
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69

Hi, This issue seems to be fixed in beta 69.0b3. I tried the same steps as before , different reloads, multiple tabs and I can no longer reproduce the crash. I will mark this issue accordingly. I tested this issue on Windows 10 1903.

Status: RESOLVED → VERIFIED
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: