Closed Bug 223247 Opened 21 years ago Closed 21 years ago

unable to connect to irc servers: internal error dispatching command “goto-url”

Categories

(Other Applications :: ChatZilla, defect)

defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bernd_mozilla, Assigned: rginda)

References

Details

Attachments

(1 file)

I just downloaded 2003102204 with the one and only 0.9.44 when I type /attach moznet I get internal error dispatching command “goto-url”. [ERROR] TypeError: ary[2] has no properties @ <chrome://chatzilla/content/static.js> 1190
switching back to a nightly from 2003102004 and installing 0.9.44 works. with todays nightly even falling back to 0.9.40 does not work.
Summary: cant login into moznet with chatzilla 0.9.44 → cant login into moznet with chatzilla 0.9.44 with 2003102204
sounds like a regression in the jseng regexp code. The chatzilla code where the error happens looks like this: var ary = "moznet".match (/^([^\s\:]+)?(\:\d+)?$/); if (2 in ary) rv.port = parseInt(ary[2].substr(1)); If (2 in ary) evaluates to true, then ary[2] must be a string, but the error you're getting implies that it isn't.
Summary: cant login into moznet with chatzilla 0.9.44 with 2003102204 → string.match
Over to jseng.
Assignee: rginda → general
Component: ChatZilla → JavaScript Engine
QA Contact: samuel → PhilSchwartau
Summary: string.match → string.match returning empty elements for optional captures that don't match
I've verified that in 1.5, "moznet".match (/(.*)(:.*)?/); returns ["moznet", "moznet"], while in the 10/22 nightly, it returns ["moznet", "moznet", undefined]. IE6 returns ["moznet", "moznet", undefined]. I don't see anywhere in the spec where an optional capture is addressed, but maybe I just missed it. Maybe this will turn out to be a chatzilla issue after all, but this change should be made public somewhere.
See bug 123437, which has been fixed by the checkin for bug 85721. This is a bug in chatzilla, relying on wrong js behavior.
.
Assignee: general → rginda
Component: JavaScript Engine → ChatZilla
Depends on: 123437
QA Contact: PhilSchwartau → samuel
*** Bug 223368 has been marked as a duplicate of this bug. ***
Severity: normal → critical
OS: Windows XP → All
Hardware: PC → All
Summary: string.match returning empty elements for optional captures that don't match → unable to connect to irc servers: internal error dispatching command “goto-url”
Attached patch patch (deleted) — Splinter Review
account for new behavior, without causing strict warnings on older builds.
Attachment #133968 - Flags: approval1.6a?
+ return (i in ary) && (typeof ary[i] != "undefined"); (i in ary) is redundant (but won't hurt if this isn't performance critical code).
> (i in ary) is redundant (but won't hurt if this isn't performance critical code). Actually, that is there specifically to avoid the strict warning generated when you ask for ary[i] where i >= ary.length. In cases where |arrayHasElementAt| is used in this patch, ary is likely to not have an element at index i on builds older than a few days ago. Event the most recent versions of ChatZilla (and Venkman) are meant to work reasonably well on any post Mozilla 1.0 build.
Status: NEW → ASSIGNED
I just saw the same problem with the 2003102304 build of 1.6a, 1.6a from 10/1 was fine. [ERROR] Internal error dispatching command “goto-url”. [ERROR] TypeError: ary[2] has no properties @ <chrome://chatzilla/content/static.js> 1190
> Actually, that is there specifically to avoid the strict warning generated when > you ask for ary[i] where i >= ary.length. But the "typeof" disables the warning, e.g. ~ $ js -s js> var a= []; js> typeof a[0] != "undefined"; false js> a[0] != undefined; 3: strict warning: reference to undefined property a[0] false
> But the "typeof" disables the warning Oh yeah, I forgot about that. Thanks for the suggestion, I'll fix it in my local tree.
Comment on attachment 133968 [details] [diff] [review] patch a=asa (on behalf of drivers) for checkin to 1.6alpha
Attachment #133968 - Flags: approval1.6a? → approval1.6a+
I cannot reproduce Chatzilla 0.9.45(2003102504/Win2k).
Confirmed here. It looks like version .45 resolves the problem on WinXP as well.
Rob, did this land? We're wrapping up 1.6a tonight (hopefully) and I'd hate for it to miss if it's not landed.
Sorry for the false alarm, I see the checkin now. This did land. Should the bug be resolved? 10/24/2003 11:29 rginda%netscape.com mozilla/ extensions/ irc/ js/ lib/ irc.js 1.49 10/1 bug 223247, unable to connect to irc servers: internal error dispatching command “goto-url” a=asa js engine new returns empty array element for optional captures in regexps, we need to account for that. 10/24/2003 11:29 rginda%netscape.com mozilla/ extensions/ irc/ js/ lib/ command-manager.js 1.9 4/4 10/24/2003 11:29 rginda%netscape.com mozilla/ extensions/ irc/ xul/ content/ static.js 1.79 9/9 10/24/2003 11:29 rginda%netscape.com mozilla/ extensions/ irc/ xul/ content/ commands.js 1.22 2/2 10/24/2003 11:29 rginda%netscape.com mozilla/ extensions/ irc/ js/ lib/ utils.js 1.38 5/26
Upgrading to a nightly that included this patch resolved the issue for me. I'd move for it to be marked as FIXED.
oops, yeah, this should have been marked fixed.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Core → Other Applications
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: