Closed Bug 594054 Opened 14 years ago Closed 14 years ago

JM: Firebug crashes Firefox when accessing the call stack scope chain

Categories

(Core :: JavaScript Engine, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 595743
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: Honza, Unassigned)

References

Details

Tested with JaegerMonkey (Built from http://hg.mozilla.org/projects/jaegermonkey/rev/3be2436f23d9)

1) Install Firebug 1.6b1: http://getfirebug.com/releases/firebug/1.6X/firebug-1.6X.0b1.xpi

2) Enable all Firebug panels (right click on the icon in Fx status bar and pick (Enable All Panels)

3) Open Firebug UI (F12) and load: http://www.janodvarko.cz/firebug/tests/content/net/601/issue601.html

4) Switch to the Script panel and create a breakpoint on line 37

5) Press the button on the page ("POST")

6) The breakpoint should hit

7) Press F10 or click the "Step Over" button in the toolbar -> CRASH

Honza
Whiteboard: [Fierbug-p1]
Can you provide a stack or crash-stats ID?
Per bug 586104, this feature isn't implemented yet. However, it still should not crash.
Nominating against the possibility that this still crashes once JM merges to m-c
blocking2.0: --- → ?
Whiteboard: [Fierbug-p1] → [Firebug-p1]
(In reply to comment #1)
> Can you provide a stack or crash-stats ID?
http://crash-stats.mozilla.com/report/index/bp-718a27dd-e02b-4c78-b092-ee8db2100906

Honza
blocking2.0: ? → ---
Restoring and upgrading blockerage.
blocking2.0: --- → betaN+
(In reply to comment #0)
> Tested with JaegerMonkey (Built from
> http://hg.mozilla.org/projects/jaegermonkey/rev/3be2436f23d9)
> 
> 1) Install Firebug 1.6b1:
> http://getfirebug.com/releases/firebug/1.6X/firebug-1.6X.0b1.xpi
> 
> 2) Enable all Firebug panels (right click on the icon in Fx status bar and pick
> (Enable All Panels)
> 
> 3) Open Firebug UI (F12) and load:
> http://www.janodvarko.cz/firebug/tests/content/net/601/issue601.html

When I load this, the Firebug panels disappear and I have to show them again. Is that expected?

> 4) Switch to the Script panel and create a breakpoint on line 37

I press F12, then hit reload. Then the Script panel just says:

No Javascript on this page

If <script> tags have a "type" attribute it should equal "text/javascript" or "application/javascript"
Another bit of info: I can get it to crash by showing the script panel and then reloading a couple of times. But this is because debug mode is not set. What do we need to do in order to get Firebug to turn debug mode on?
(In reply to comment #6)
> (In reply to comment #0)
> > Tested with JaegerMonkey (Built from
> > http://hg.mozilla.org/projects/jaegermonkey/rev/3be2436f23d9)
> > 
> > 1) Install Firebug 1.6b1:
> > http://getfirebug.com/releases/firebug/1.6X/firebug-1.6X.0b1.xpi
> > 
> > 2) Enable all Firebug panels (right click on the icon in Fx status bar and pick
> > (Enable All Panels)
> > 
> > 3) Open Firebug UI (F12) and load:
> > http://www.janodvarko.cz/firebug/tests/content/net/601/issue601.html
> 
> When I load this, the Firebug panels disappear and I have to show them again.
> Is that expected?
Yes, Firebug was not activated for that specific page (URL) and so it has been closed. As soon as you activate Firebug for specific page and keep it activated (ie, you close the page with Firebug open) it'll be remembered and Firebug will be activated automatically as soon as you open the page the next time.


> 
> > 4) Switch to the Script panel and create a breakpoint on line 37
> 
> I press F12, then hit reload. Then the Script panel just says:
> 
> No Javascript on this page
> 
> If <script> tags have a "type" attribute it should equal "text/javascript" or
> "application/javascript"
Yes, I can reproduce the same behavior, this is because debugMode is set to false.

For my tests I am applying Andrew's patch from here:
https://bug563000.bugzilla.mozilla.org/attachment.cgi?id=465522


(In reply to comment #7)
> Another bit of info: I can get it to crash by showing the script panel and then
> reloading a couple of times. But this is because debug mode is not set.
Yes


> What do we need to do in order to get Firebug to turn debug mode on?
The debugMode is set to false (by default) in JSCompartment that in turn lives in JSContext.

There is also a method js_SetDebugMode (jsdbgapi.h, expecting context and boolean value) that allows to change it.

Firebug is based purely on JS/HTML/XUL/CSS and so it can only use APIs exposed via XPCOM. This means that we need to have setDebugMode available in a jsdI* interface.

If I understand it well JSContext (C++) is accessible through jsdIContext interface so, what about having an additional method setDebugMode(debug) in it?

void setDebugMode (in boolean debug);

As soon as there is such method, I'll patch Firebug to use it.

Honza
Blocks: 595243
No longer blocks: 595243
Depends on: 595243
I guess this is a dupe of bug 595743, or rather this one is JM and that on is after JM landed in Firefox
Depends on: 610793
The call stack in comment 4 lead me to change the title of this bug report. Plus we know from bug 609663 that Firebug could not have been single stepping with JaegerMonkey.
Summary: JM: Firebug crashes Firefox when single stepping → JM: Firebug crashes Firefox when accessing the call stack scope chain
Honza, 
            Mozilla/5.0 (Windows NT 6.1; rv:2.0b8pre) Gecko/20101113 Firefox/4.0b8pre

does not crash on this test for me. So I'm going with Comment 9
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Whiteboard: [Firebug-p1]
You need to log in before you can comment on or make changes to this bug.