Error: hud.jsterm is null in resource:///modules/HUDService.jsm:2074

RESOLVED FIXED in Firefox 12

Status

()

Firefox
Developer Tools: Console
P2
normal
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: ttaubert, Assigned: jwalker)

Tracking

Trunk
Firefox 12
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
I tried to open the web console but nothing happened. The following was logged in the JS console:

Timestamp: 1/19/12 2:11:11 AM
Error: hud.jsterm is null
Source File: resource:///modules/HUDService.jsm
Line: 2074

HS.logConsoleAPIMessage() is failing here.
(Reporter)

Comment 1

6 years ago
I just noticed that the console seems to have opened but was minimized (zero height). I can resize it and it seems to be working.
(Reporter)

Comment 2

6 years ago
It's somehow working but in some kind of strange intermediate state. I can not close it.
(Reporter)

Comment 3

6 years ago
Meh, I didn't see this error again but the strange console behavior and the minimized opening and not closing is the same even after restarting the browser. Maybe this should be a different bug.
It looks to me like this:

function formatResult(x) {
 return (typeof(x) == "string") ? x : hud.jsterm.formatResult(x);
}

Fails to take into account that gcliterm could be in use.

This is a common error, and there is lots of "if (hud.jsterm) { ... } else { ... }" around our code.

We've previously considered making jsterm and gcliterm be implementations of a similar interface, and been of the opinion that it possibly wasn't worth it, but I think it is.

Thoughts?
P.S. Thanks Tim.
(In reply to Joe Walker from comment #4)
> It looks to me like this:
> 
> function formatResult(x) {
>  return (typeof(x) == "string") ? x : hud.jsterm.formatResult(x);
> }
> 
> Fails to take into account that gcliterm could be in use.
> 
> This is a common error, and there is lots of "if (hud.jsterm) { ... } else {
> ... }" around our code.
> 
> We've previously considered making jsterm and gcliterm be implementations of
> a similar interface, and been of the opinion that it possibly wasn't worth
> it, but I think it is.
> 
> Thoughts?

At this point we should land a quick fix for the bug. Later we might consider making gcliterm more similar to jsterm, but that's still probably undecided given that GCLI might move into its own UI (the developer toolbar command line) - if I am not mistaken.
(Reporter)

Updated

6 years ago
Duplicate of this bug: 719300
Assignee: nobody → jwalker
Priority: -- → P2
Target Milestone: --- → Firefox 12
Created attachment 591787 [details] [diff] [review]
upload 1
Attachment #591787 - Flags: review?(mihai.sucan)
Comment on attachment 591787 [details] [diff] [review]
upload 1

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

Thanks!
Attachment #591787 - Flags: review?(mihai.sucan) → review+
https://tbpl.mozilla.org/?tree=Fx-Team&rev=5e41076a67dd
Whiteboard: [fixed-in-fx-team]
(Reporter)

Comment 11

6 years ago
https://hg.mozilla.org/mozilla-central/rev/a5d23f7e5cb5
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
You need to log in before you can comment on or make changes to this bug.