Closed Bug 1057031 Opened 10 years ago Closed 5 years ago

Reloading with a breakpoint set causes: "TypeError: info is null"

Categories

(DevTools :: Debugger, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jryans, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

STR:

1. Go to mozilla.org
2. Set a breakpoint at tabzilla.js:74 (the line says |var minimumJQuery = '1.7.1'|)
3. Reload the page

Things seem function okay, but the following stack is logged:

Handler function threw an exception: TypeError: info is null
Stack: _addBreakpoint@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/sourceeditor/debugger.js:137:5
addBreakpoint/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/sourceeditor/debugger.js:153:37
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:83:14
EventLoop.prototype.enter@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:410:5
ThreadActor.prototype._pushThreadPause@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:609:5
ThreadActor.prototype._pauseAndRespond@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:783:7
BreakpointActor.prototype.hit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:4464:12
Tabzilla<@https://mozorg.cdn.mozilla.net/en-US/tabzilla/tabzilla.js?build=cef0a04:74:9
@https://mozorg.cdn.mozilla.net/en-US/tabzilla/tabzilla.js?build=cef0a04:72:17
Line: 137, column: 4
Turns out that the patch from bug 1016310 isn't as successful as the one from bug 957174 for regular browser use, although it seemed to have a bigger impact in reducing oranges. In this patch I'm just putting the timeout back, as I still haven't found the time to dig into CodeMirror and understand the reason for this race. I verified that it fixes this case.
Attachment #8480617 - Flags: review?(vporof)
Assignee: nobody → past
Status: NEW → ASSIGNED
Comment on attachment 8480617 [details] [diff] [review]
Restore the timeout for updateEditorBreakpoints to avoid a race in CodeMirror

Review of attachment 8480617 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/devtools/debugger/debugger-controller.js
@@ +1172,5 @@
>      // both in the editor and the breakpoints pane.
>      DebuggerController.Breakpoints.updatePaneBreakpoints();
> +    setNamedTimeout("update-editor-bp", EDITOR_BREAKPOINTS_UPDATE_DELAY, () => {
> +      DebuggerController.Breakpoints.updateEditorBreakpoints();
> +    });

Shouldn't we do the same thing in the other function?
Attachment #8480617 - Flags: review?(vporof) → review+
It doesn't seem necessary, because the _onNewSource path is the one that we hit when we set a breakpoint on reload. I've been trying to minimize the extent of these workarounds, but I'm watching it closely and if I ever see a stack trace that includes the _onSourcesAdded path, I'll change it, too.
Summary: Reload with breakpoint set: TypeError: info is null → Reloading with a breakpoint set causes: "TypeError: info is null"
Blocks: 1088153
I tried it a couple of times, but I can no longer reproduce this using the given STR. Panos, could you confirm this?
Flags: needinfo?(past)
Try the STR in bug 1104936. That still throws for me.
Flags: needinfo?(past)
I no longer have the time to work on this.
Assignee: past → nobody
Status: ASSIGNED → NEW
Attachment #8480617 - Attachment is obsolete: true
I can reproduce this, it just happened to me while I was fixing another bug
with WebGL conformance.

Steps:
1) Open attached html in nightly
2) add '?webglVersion=2' to end of url
2) Open web inspector
3) Open debugger tab and enable split console
4) Type random stuff (1 + 2 + 3) into the js console, it will evaluate it
5) Reload the page
6) Let it hit the 'debugger;' statement I inserted and press continue
until page is fully reloaded
7) Reload again
8) Continue to debugger; statement
9) Evaluation in the js console no longer works.

I was able to reproduce this three times using Nightly 55.0a1 (64-bit / Linux).
The fourth time it stopped doing it so I'm not sure what changed.
Product: Firefox → DevTools

closing as this relates to the old debugger

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: