Last Comment Bug 719292 - Error: hud.jsterm is null in resource:///modules/HUDService.jsm:2074
: Error: hud.jsterm is null in resource:///modules/HUDService.jsm:2074
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Console (show other bugs)
: Trunk
: All All
: P2 normal (vote)
: Firefox 12
Assigned To: Joe Walker [:jwalker] (needinfo me or ping on irc)
:
Mentors:
: 719300 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-18 17:19 PST by Tim Taubert [:ttaubert]
Modified: 2012-01-28 06:16 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
upload 1 (1.21 KB, patch)
2012-01-26 07:16 PST, Joe Walker [:jwalker] (needinfo me or ping on irc)
mihai.sucan: review+
Details | Diff | Review

Description Tim Taubert [:ttaubert] 2012-01-18 17:19:40 PST
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.
Comment 1 Tim Taubert [:ttaubert] 2012-01-18 17:22:46 PST
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.
Comment 2 Tim Taubert [:ttaubert] 2012-01-18 17:25:05 PST
It's somehow working but in some kind of strange intermediate state. I can not close it.
Comment 3 Tim Taubert [:ttaubert] 2012-01-18 17:36:39 PST
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.
Comment 4 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-01-18 22:26:47 PST
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?
Comment 5 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-01-18 22:27:05 PST
P.S. Thanks Tim.
Comment 6 Mihai Sucan [:msucan] 2012-01-19 01:27:56 PST
(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.
Comment 7 Tim Taubert [:ttaubert] 2012-01-19 03:19:54 PST
*** Bug 719300 has been marked as a duplicate of this bug. ***
Comment 8 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-01-26 07:16:02 PST
Created attachment 591787 [details] [diff] [review]
upload 1
Comment 9 Mihai Sucan [:msucan] 2012-01-26 13:39:58 PST
Comment on attachment 591787 [details] [diff] [review]
upload 1

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

Thanks!
Comment 10 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-01-27 06:50:43 PST
https://tbpl.mozilla.org/?tree=Fx-Team&rev=5e41076a67dd
Comment 11 Tim Taubert [:ttaubert] 2012-01-28 06:16:55 PST
https://hg.mozilla.org/mozilla-central/rev/a5d23f7e5cb5

Note You need to log in before you can comment on or make changes to this bug.