Get uncaught exception when populating a form in FireFox 3.6

Bug #605513 reported by jwsheff
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Confirmed
Unknown
firefox (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: firefox

When populating an input field on a form in Firefox (Linux or Windows) where I select or just pass the mouse over one of the historical suggestions that drops down while inputting, I receive the following error: Error: uncaught exception: [Exception... "Cannot modify properties of a WrappedNative" nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)" location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onxblpopuphiding :: line 825" data: no]

I do not receive the error in Google Chrome

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: firefox 3.6.6+nobinonly-0ubuntu0.10.04.1
ProcVersionSignature: Ubuntu 2.6.32-23.37-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-23-generic i686
Architecture: i386
Date: Wed Jul 14 10:02:01 2010
FirefoxPackages:
 firefox 3.6.6+nobinonly-0ubuntu0.10.04.1
 firefox-gnome-support 3.6.6+nobinonly-0ubuntu0.10.04.1
 firefox-branding 3.6.6+nobinonly-0ubuntu0.10.04.1
 abroswer N/A
 abrowser-branding N/A
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: firefox

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

Not a core XBL issue. Sounds like a bug in the binding.

Too bad the line number matches what was shipped in that build, and not anything in CVS. :(

Revision history for this message
In , Gavin Sharp (gavin-sharp) wrote :

I can reproduce when I cause the content autocomplete popup to appear (say on google.com), then click somewhere else to dismiss the popup.

onxblpopuphiding in that file is:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/toolkit/content/widgets/autocomplete.xml&rev=1.138#863

and in the content form autocomplete case, this.mInput is a nsFormFillController wrapping the HTMLInputElement. I'm not sure what changed that made this now throw an exception, though - a regression range would be useful.

Revision history for this message
In , Steve-england (steve-england) wrote :

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008041215 Minefield/3.0pre ID:2008041215

I am able to reproduce this too, with the steps from comment 3.

Note, however, that to get the error I have to have hovered over an auto-complete item before clicking outside the drop-down to dismiss it. If I get the auto-complete drop-down to appear (by double clicking in the Google text input) and then I immediately click away, no error is thrown.

I have a range, but it's for a change in the error thrown, rather than for no error-->error.

20080306_1241_firefox-3.0b5pre.en-US.win32 throws:
  Error: this.mInput._focus is not a function
  Source File: chrome://global/content/bindings/autocomplete.xml
  Line: 831

20080306_1912_firefox-3.0b5pre.en-US.win32 throws:
  Error: uncaught exception: [Exception... "Cannot modify properties of a WrappedNative" nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)" location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onxblpopuphiding :: line 828" data: no]

Checkins to module PhoenixTinderbox between 2008-03-06 12:41 and 2008-03-06 19:12 :
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=PhoenixTinderbox&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2008-03-06+12%3A41&maxdate=2008-03-06+19%3A12&cvsroot=%2Fcvsroot

If you want a range for: no "this.mInput._focus is not a function" error thrown --> "this.mInput._focus is not a function" error now thrown, then let me know and I'll go hunting tomorrow.

Revision history for this message
In , Gavin Sharp (gavin-sharp) wrote :

(In reply to comment #3)
> 20080306_1241_firefox-3.0b5pre.en-US.win32 throws:
> Error: this.mInput._focus is not a function

> 20080306_1912_firefox-3.0b5pre.en-US.win32 throws:
> Error: uncaught exception: [Exception... "Cannot modify properties of a
> WrappedNative" nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)"

Thanks Steve. That change looks like it was caused by the patch for bug 419725. It would be useful to know when this started throwing at all, but it probably doesn't matter that much - we probably shouldn't be doing what we're doing regardless of whether it throws an exception or not.

Revision history for this message
In , Gavin Sharp (gavin-sharp) wrote :

Oh, actually, we probably started throwing when the patch for bug 407359 landed. That patch assumes that mInput is a autocomplete.xml-implemented nsIAutocompleteInput, which isn't always the case (e.g. for content autocomplete, where we get the impl from nsFormFillController instead). The patch for bug 419725 just changed the error.

I suppose there a couple of ways to fix this - we could detect the underlying nsIAutocompleteInput implementation in that popuphiding handler somehow and behave differently based on that, or have content and chrome autocomplete use different popup implementations.

Revision history for this message
In , Steve-england (steve-england) wrote :

(In reply to comment #5)
> Oh, actually, we probably started throwing when the patch for bug 407359

Correct!

Nothing thrown: 20080123_1445_firefox-3.0b3pre.en-US.win32
"this.mInput._focus is not a function": 20080123_1608_firefox-3.0b3pre.en-US.win32

Checkins to module PhoenixTinderbox between 2008-01-23 14:45 and 2008-01-23 16:08 :
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=PhoenixTinderbox&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2008-01-23+14%3A45&maxdate=2008-01-23+16%3A08&cvsroot=%2Fcvsroot

--> bug 407359

Revision history for this message
In , Karlt (karlt) wrote :

Bug 445727 is a dupe with nice STR.

Revision history for this message
In , Karlt (karlt) wrote :

*** Bug 445727 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Alice0775 (alice0775) wrote :

The same issue is still there.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090324 Minefield/3.6a1pre ID:20090324044213
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090324 Shiretoko/3.5b4pre ID:20090324045343

Revision history for this message
In , Matti-mversen (matti-mversen) wrote :

*** Bug 490942 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Radek-antoniuk (radek-antoniuk) wrote :

Same issue with:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10

Revision history for this message
In , Ria-klaassen (ria-klaassen) wrote :

*** Bug 504542 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Andrew-walmsley (andrew-walmsley) wrote :

This bug is still there/here/existing
Error: uncaught exception: [Exception... "Cannot modify properties of a WrappedNative" nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)" location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onxblpopuphiding :: line 834" data: no]

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)

Revision history for this message
In , Jbecerra-mozilla (jbecerra-mozilla) wrote :

This is still present in 3.6RC. Duping bug 540109 to this one.

Revision history for this message
In , Jbecerra-mozilla (jbecerra-mozilla) wrote :

*** Bug 540109 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dolske (dolske) wrote :

*** Bug 558722 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cevanica (cevanica) wrote :

Yes, and it isn't just annoying. I have jquery dialog and autocomplete, and when error pops up once, all code after autocomplete just stops working.

I want to have firefox history for non-autocomplete fields. Any solutions?

Revision history for this message
In , Johnwu-pro (johnwu-pro) wrote :

Still exist on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)

Revision history for this message
jwsheff (jsheffield40) wrote :

Binary package hint: firefox

When populating an input field on a form in Firefox (Linux or Windows) where I select or just pass the mouse over one of the historical suggestions that drops down while inputting, I receive the following error: Error: uncaught exception: [Exception... "Cannot modify properties of a WrappedNative" nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)" location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onxblpopuphiding :: line 825" data: no]

I do not receive the error in Google Chrome

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: firefox 3.6.6+nobinonly-0ubuntu0.10.04.1
ProcVersionSignature: Ubuntu 2.6.32-23.37-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-23-generic i686
Architecture: i386
Date: Wed Jul 14 10:02:01 2010
FirefoxPackages:
 firefox 3.6.6+nobinonly-0ubuntu0.10.04.1
 firefox-gnome-support 3.6.6+nobinonly-0ubuntu0.10.04.1
 firefox-branding 3.6.6+nobinonly-0ubuntu0.10.04.1
 abroswer N/A
 abrowser-branding N/A
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: firefox

Revision history for this message
jwsheff (jsheffield40) wrote :
Revision history for this message
jwsheff (jsheffield40) wrote :

Just a little more information. If I uncheck Firefox Preference Privacy item "Remember search and form history", I do not get the error. That is to be expected because the history suggestions do not drop down while inputting to a form field.

Revision history for this message
Micah Gersten (micahg) wrote :

Thank you for your bug report. This bug has been reported to the developers of the software. The upstream bug will soon be imported into Launchpad where you can respond to the developers if they ask questions. Please report any other issues you may find.

Changed in firefox (Ubuntu):
assignee: nobody → Micah Gersten (micahg)
importance: Undecided → Medium
status: New → Triaged
assignee: Micah Gersten (micahg) → nobody
Changed in firefox:
status: Unknown → Confirmed
Revision history for this message
In , Marcia-mozilla (marcia-mozilla) wrote :

*** Bug 580394 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Alex Mayorga (alex-mayorga) wrote :

FWIW I just got this one or similar on today's nightly, Mozilla/5.0 (Windows NT 6.0; rv:2.0b7pre) Gecko/20100916 Firefox/4.0b7pre ID:20100916041016

Error: uncaught exception: [Exception... "Cannot modify properties of a WrappedNative" nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)" location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onxblpopuphiding :: line 847" data: no]

Changed in firefox:
importance: Unknown → Medium
Revision history for this message
In , Karl-riedling (karl-riedling) wrote :

*** Bug 454855 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Alice0775 (alice0775) wrote :

*** Bug 609412 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Owen Leibman (eclipsechasers2) wrote :

Confirming this 3 1/2 year old bug (with only one notation in the last year) is still happening in FF7.0.1. I have put up a test page to demonstrate it:
http://www.dayenu.com/interesting/ffpopupbug.htm

The specific error message written to the log now is:
Error: uncaught exception: [Exception... "Cannot modify properties of a WrappedNative"
nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)"
location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onxblpopuphiding :: line 859"
data: no]

Revision history for this message
In , Tmptgr (tmptgr) wrote :

http://www.dayenu.com/interesting/ffpopupbug.htm gave me 3 errors on load and the mentioned error on submit with autocomplete popup open.

I'd copy my errors but my Error Console got flooded with onBeforeItemRemoved errors when i pasted that URI.

Firefox 10.0 (because the About screen doesn't say more).

Revision history for this message
In , Owen Leibman (eclipsechasers2) wrote :

I only see the "expected" error on 10.0; no load errors and no onBeforeItemRemoved (which is definitely not part of the test page). The error line number is now changed from 859 to 862.

Revision history for this message
In , peepo (j-chetwynd) wrote :

OS X

Cannot modify properties of a WrappedNative
[Break On This Error]

Filtered chrome url chrome://global/content/bindings/autocomplete.xml
autocomplete.xml (line 864)

Revision history for this message
In , Alex Mayorga (alex-mayorga) wrote :

*** Bug 595121 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Alice0775 (alice0775) wrote :

*** Bug 784225 has been marked as a duplicate of this bug. ***

Revision history for this message
In , 0-lat-0 (0-lat-0) wrote :

I found this error was created by an errant URL in a call to xhrGet. By correcting the URL the error was resolved. In Chrome, the error was better identified in the response showing the errant URL. In my case, I'd embedded an undefined value in the URL request by mistake like this:
http://localhost:9080undefinedjson/IssueSummaries

Perhaps because the port number was FUBAR, it causes this error to be reported?

Anyway, this error was a red herring reported back from the xhrGet call to a bad URL.

I'm using version 10.0.10 of Firefox.

Revision history for this message
In , M-wada (m-wada) wrote :

As I wrote in bug 831664, I also observed same exception by atempting to change two properties of an nsIMsgIncomingServer of Thundebird when the property value is "undefined".
  nsIMsgIncomingServer.trashFolderName (string) == undefined
  nsIMsgIncomingServer.isGMailServer (boolean == undefined
  If change of this property value is attempted, the exception occurs.
The property acually doesn't exist, even when value should be set by Tb.
  for(var prop in msgFolder.server)
  { text = prop + " = " + msgFolder.server[prop]; Write text to Error Console; }
  => trashFolderName, isGMailServer, is not listed.
Reason of exception in this case looks for me "property doesn't exist".

In this case, when above value was shown by button click, the value was shown by a button click, but the value was not shown by next button click, althouh Thunderbird won't alter property value between the two button clicks.
In my test, probability of "the property is listed" was very low, although it was never ZERO.
If the property exists and value is normally returned, change of property value is successful.

So, I guessed this is not problem in wrapper side. I guessed problem in object initialization by creator of the object in Tb.
However, almost all reports on same exception of "NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN" were closed as dup of this bug, even though problem report on different native object.

Wrapper side problem? (fails to find property or propertyy value, fails to show property if not initialzed by value, ...)
Or object creator side problem? (fails to define property)

Revision history for this message
In , M-wada (m-wada) wrote :

During test for bug 831664, funny phenomenon was observed.
(0) A customized ToolBar button does following.
(a) Write data of some wrapped objects and text messages to Error Console:
    - incomingServer.isGMailServer/trasfFolderName and some other attributes.
    - some properties of some other wrapped objects.
(b) Sometimes, change incomingServer.isGMailServer/trashFolderName value
    when value is normally returned.
(c) Sometimes, try to change incomingServer.isGMailServer/trashFolderName value
    even if it's undefined(=> Exception of this bug occurs)
(d) Sometimes, writes very-long/multi-line text to Error Console.
    var msg=new Array();for(var key in obj){msg[msg.length]=key+" = "+obj[key];}
    var text=msg.join("\n"); Write text to Error Console;

(1) After restart of Thunderbird, while doing (a)/(b)/(c), undefined is returned for isGMailServer/trashFolderName.
(2) When (d) is executed one or a few times("clear Error Console or not" seems irrelevant), isGMailServer/trashFolderName is normally returned suddenly for (a)/(b)/(c). Because isGMailServer/trashFolderName is not undefined, change of property value is successful.
(3) After (2), if (a)/(b)/(c) is executed after some other operations in Thunderbird(account switch, account collapse/expand etc.), undefined is suddenly returned again for isGMailServer/trashFolderName.
(4) After (3), if (d) is executed one(or a few) times, isGMailServer/trashFolderName is normally returned again for (a)/(b)/(c) => Returns to step (2).

Why wrapped object's property value depends on length of JavaScript string data and/or Error Console log data volume?

Wrapper tries to refer to non-existent memory address, or object which is not released yet by Garbage Collector after Destroy Object?
(if garbage data is fortunately held at referred memory address, object's property is successfully shown.)
Or similar problem in object initialization/update by Thunderbird?

Revision history for this message
In , M-wada (m-wada) wrote :

Phenomenon of bug 831664 was as follows.

  var Folder=window.GetFirstSelectedMsgFolder();
  var data=Folder.server.isGmailServer; => data is "undefined"
  var t=[];for(var xx in Folder.server){t[t.length]=xx+"="+Folder.server[xx];}
      => isGmailServer is not returned by enumerator
  If Folder.server.isGmailServer=true(or false) is atempted when undefined,
  Exception of this bug occurs because isGmailServer doesn't exist.

  After access of all properties of Folder(owner of Folder.server) by following,
       var u=[];for(var yy in Folder){u[u.length]=yy+"="+Folder[yy];}
  Folder.server.isGmailServer is returned normally, and value change is OK.

  Same phenomenon is also seen on som other properties of the Folder.server.

Who is wrong? Wrapper? Creator of original object what is accessed by window.GetFirstSelectedMsgFolder() or window.GetFirstSelectedMsgFolder().server?

Revision history for this message
In , M-wada (m-wada) wrote :

I checked with "never-defined property of existent wrapped object".

Requested following by test extesion where CurrentServer is [xpconnect wrapped nsIMsgIncomingServer],
  CurrentServer.ABCDEFGHIJKLMN=true;
and following exceptin was caught by try/catch(e).
> Try to change never-existent property of wrapped object for bug 831664
> Exception by CurrentServer.ABCDEFGHIJKLMN=true
> [Exception... "Cannot modify properties of a WrappedNative" nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)"

It looks for me simply a "misleading condition name".
If NS_ERROR_XPC_CANT_*CREATE*_PROP_ON_WN, no problem...
If such condition name, it's apparent that fault is in JS code who requestd property value change even though the property is undefined(i.e. non-existent), if "creation of property via wrapped object" is not supported.
And, "why undefined is returned even though property should exist" is different problem from this bug, as seen in bug 831664.

Revision history for this message
In , M-wada (m-wada) wrote :

> http://mxr.mozilla.org/comm-central/source/mozilla/js/xpconnect/src/XPCWrappedNativeJSOps.cpp#481
> 481 XPC_WN_OnlyIWrite_SetPropertyStub(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict,
> 484 return XPC_WN_OnlyIWrite_AddPropertyStub(cx, obj, id, vp);
> http://mxr.mozilla.org/comm-central/source/mozilla/js/xpconnect/src/XPCWrappedNativeJSOps.cpp#467
> 467 XPC_WN_OnlyIWrite_AddPropertyStub(JSContext *cx, JSHandleObject obj, JSHandleId id, JSMutableHandleValue vp)
> 473 // Allow only XPConnect to add/set the property
> 474 if (ccx.GetResolveName() == id)
> 475 return true;
> 477 return Throw(NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN, cx);

If apparent AddPropertyStub request for non-existent property, it should be NS_ERROR_XPC_CANT_CREATE_WN, or NS_ERROR_XPC_CANT_ADD_PROP_TO_WRAPPED_NATIVE, or one like NS_ERROR_XPC_CANT_CREATE_PROP_ON_WN.
If XPC_WN_OnlyIWrite_SetPropertyStub is called both when "setting of existent property" and "stting non-existent property" case, they should be separated to NS_ERROR_XPC_CANT_CREATE_WN(or NS_ERROR_XPC_CANT_ADD_PROP_TO_WRAPPED_NATIVE or one like NS_ERROR_XPC_CANT_CREATE_PROP_ON_WN) case and NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN case.

> http://mxr.mozilla.org/comm-central/source/mozilla/xpcom/base/ErrorList.h#608
> 608 ERROR(NS_ERROR_XPC_CANT_CREATE_WN, FAILURE(25)),
> http://mxr.mozilla.org/comm-central/source/mozilla/xpcom/base/ErrorList.h#629
> 629 ERROR(NS_ERROR_XPC_CANT_ADD_PROP_TO_WRAPPED_NATIVE, FAILURE(46)),
> http://mxr.mozilla.org/comm-central/source/mozilla/xpcom/base/ErrorList.h#635
> 635 ERROR(NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN, FAILURE(52)),

Changed in firefox:
status: Confirmed → Unknown
Changed in firefox:
status: Unknown → Confirmed
Changed in firefox:
importance: Medium → Unknown
Revision history for this message
In , Release-mgmt-account-bot (release-mgmt-account-bot) wrote :

The severity field for this bug is relatively low, S3. However, the bug has 10 duplicates.
:mstriemer, could you consider increasing the bug severity?

For more information, please visit [auto_nag documentation](https://wiki.mozilla.org/Release_Management/autonag#severity_underestimated.py).

Revision history for this message
In , Autonag-nomail-bot (autonag-nomail-bot) wrote :

The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.