Closed Bug 905698 Opened 8 years ago Closed 8 years ago

Displaying any tab-modal prompt causes metroFX to hang at 100% cpu


(Firefox for Metro Graveyard :: Browser, defect)

Windows 8.1
Not set


(Not tracked)

Firefox 26


(Reporter: TimAbraldes, Assigned: jimm)



This became an issue in the last couple days. Not yet sure what the cause is but this needs to be fixed ASAP
OK I just tested with older versions of metroFx, including versions prior to tab-modal prompts landing, and reproduced this issue with all of them.

Either something has gone wonky with my hardware, or I'm seeing bug 840855 with increased frequency.

I did upgrade to Windows 8.1 recently; it's possible that that upgrade is related to this issue.
Further investigation shows that, while the cpu is spinning, we're spamming a Windows OriginateError. If we inspect the arguments to the RoOriginateError call, we see:

combase!RoOriginateErrorW(HRESULT error = 0x8000ffff,
                          unsigned int cchMax = 0x34,
                          wchar_t * message = 0x088b0916 "Nested calls to ProcessEvents method is not allowed.")

This is bad news: We've implemented our native event processing in terms of calls to ProcessEvents [1]. Any call to MetroAppShell::ProcessNextNativeEvent is going to encounter this exception, and any consumer that tries to spin an event loop by calling MetroAppShell::ProcessNextNativeEvent in a loop is going to spin forever without actually processing any events. This is exactly what is happening with tab-modal prompts in metro; the prompt service is attempting to spin an event loop at [2], and instead of actually processing events it is just throwing OriginateErrors.

Depends on: 907410
This bug should be fixed by fixing bug 907410. If there's any cleanup to do after bug 907410 lands I'll pick this bug back up.
Assignee: tabraldes → nobody
Closed: 8 years ago
Resolution: --- → FIXED
Assignee: nobody → jmathies
Target Milestone: --- → Firefox 26
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.