Closed Bug 1045616 Opened 10 years ago Closed 10 years ago

Starting the inspector for the Camera app freezes Firefox

Categories

(DevTools Graveyard :: WebIDE, defect)

x86_64
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Firefox 34

People

(Reporter: paul, Assigned: miker)

References

Details

Debugging the camera app, starting the toolbox (inspector being the default tool) freezes Firefox. At least on mac and linux.
This happens only with the inspector, and it happens both with the simulator and the device.
Summary: Starting the toolbox for the Camera app freezes Firefox → Starting the inspector for the Camera app freezes Firefox
Not a problem with Aurora.
I can reproduce this issue.  It seems to only affect 2.1, as 2.0 and 1.4 simulators did not show the problem.
bug 1040697 is the problem.
Mike, I need some help here.
bug 1040697 introduced a for loop:

> for (let prop of subProps)

In the case of the camera app, at some point, subProps has more than 6000 keys, and going though all the keys take a lot of time. And Firefox freeze.
Flags: needinfo?(mratcliffe)
I'm not sure exactly what's going on. I added:

> console.log("PAUL " + Object.keys(subProps).length);

And I see "6398" being printed around 50 times. Then Firefox freezes, and eventually I see:

> 2014-07-30 16:13:20: stackwalker.cc:125: INFO: Couldn't load symbols for: /home/paul/mozilla/src/obj.firefox/dist/bin/libxul.so|

And after some time, Firefox unfreezes.
If I add a `return` right before the `try`, it doesn't freeze anymore.
Regression due to bug 1040697
Assignee: nobody → mratcliffe
Flags: needinfo?(mratcliffe)
Ok - this is an issue with variable:

> console.log("PAUL " + this.name + " > " + Object.keys(subProps).length);


console.log: PAUL --color-brand-darkblue > 6398
console.log: PAUL --color-brand-blue > 6398
console.log: PAUL --color-brand-turquoise > 6398
console.log: PAUL --color-brand-darkorange > 6398
console.log: PAUL --color-brand-orange > 6398
console.log: PAUL --color-brand-yellow > 6398
console.log: PAUL --color-brand-violet > 6398
console.log: PAUL --color-brand-alpha > 6398
console.log: PAUL --color-brand-beta > 6398
console.log: PAUL --color-brand-gamma > 6398
console.log: PAUL --dim-micro > 6398
console.log: PAUL --dim-milli > 6398
console.log: PAUL --dim-small > 6398
console.log: PAUL --dim-medium > 6398
console.log: PAUL --dim-large > 6398
console.log: PAUL --dim-mega > 6398
console.log: PAUL --font-small > 6398
console.log: PAUL --font-medium > 6398
console.log: PAUL --font-large > 6398
console.log: PAUL --header-background > 6398
console.log: PAUL --header-nav-button-color > 6398
console.log: PAUL --header-nav-button-color-active > 6398
console.log: PAUL --header-button-background > 6398
console.log: PAUL --header-button-color-active > 6398
console.log: PAUL --header-button-color > 6398
console.log: PAUL --header-title-color > 6398
console.log: PAUL --button-background > 6398
console.log: PAUL --button-background-active > 6398
console.log: PAUL --button-color > 6398
console.log: PAUL --button-color-active > 6398
console.log: PAUL --button-transition > 6398
If it is truly a performance issue with the loop, try switching it to a traditional for loop.  `for of` isn't optimized and is significantly slower.
Nope. The issue is:

Cc["@mozilla.org/inspector/dom-utils;1"].getService(Ci.inIDOMUtils).getSubpropertiesForCSSProperty("--foo")

This return a super huge array. It makes no sense. Platform issue.
Depends on: 1046140
Found a fix. See bug 1046140.
It works now. See bug 1046140.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
QA Whiteboard: [qa+]
Reproduced using Nightly 2014-07-29 with 2.1 and 2.2 simulators - freeze on Ubuntu 12.04 64-bit and Mac OSX 10.9.5 and crash under Win 7 64-bit.
The issue no longer occurs using latest Aurora 34.0a2 2014-10-09 and the simulators under all platforms.
Status: RESOLVED → VERIFIED
QA Whiteboard: [qa+] → [qa!]
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.