Closed
Bug 304714
Opened 19 years ago
Closed 16 years ago
Odd errors from XPCNativeWrapper
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: dougt, Unassigned)
Details
(Keywords: mobile)
Attachments
(1 file, 1 obsolete file)
|
3.85 KB,
patch
|
dveditz
:
review+
|
Details | Diff | Splinter Review |
From a user: Unfortunately I've got a bit of a problem, I'm testing a very simple Google maps based app that works fine under Firefox, Safari, etc, and bombs out under Minimo. It's a bit hard to debug as the javascript is Google's, and they obfuscate it, but it looks to me like they're just trying to set the className on an div element, this throws a JS exception: nsIDOMHTMLDivElement.className nsresult: "0x80002e93 (<unknown>)" I poked around the source and see no way that the actual nsGenericHTMLElement::SetClassName could fail (it's one line, that I guess could be throwing an exception, and then a hard coded return NS_OK). Of course this error code doesn't exist. Also we are getting similar odd errors at startup once in a while -- properties on native objects claim they do not exist or fail with odd error codes. I have tried to reproduct this in a debug build without any luck. I know that the error comes from after making a call to XPTC_InvokeByIndex() injs/src/xpconnect/src/xpcwrappednative.cpp. I have tried to disable opts for just this function via #pragma, but that didn't work. Hmm. Then I disabled opts for this entire direction. Guess what -- that worked!! Attached is a workaround-at-best to make Minimo on WinCE more stable. The lost is about .15 mb. I want to keep this bug open after the check in so that we can spend more time understanding why the optimizer is busted (i have tried -O1, -O2 with no luck.
| Reporter | ||
Comment 1•19 years ago
|
||
| Reporter | ||
Updated•19 years ago
|
Attachment #192732 -
Flags: review?(benjamin)
Comment 2•19 years ago
|
||
Comment on attachment 192732 [details] [diff] [review] Workaround as described. The build-fu looks fine, but I'd like shaver to see this.
Attachment #192732 -
Flags: review?(benjamin) → review?(shaver)
Comment 3•19 years ago
|
||
Comment on attachment 192732 [details] [diff] [review] Workaround as described. Can we at least blacklist a specific compiler here? A configure test would be even better. r=shaver contingent on at least filing a bug to do that, with a TM of gecko1.9.
Attachment #192732 -
Flags: review?(shaver) → review+
Comment 4•19 years ago
|
||
Ah, now that I read this bug for _content_, I see that such further investigation is exactly the plan. My r= is now contingent only on dougt continuing to be such a goddamn stud.
| Reporter | ||
Comment 5•19 years ago
|
||
i will try. :-) Checking in Makefile.in; /cvsroot/mozilla/js/src/xpconnect/src/Makefile.in,v <-- Makefile.in new revision: 1.82; previous revision: 1.81 done Leaving open. hope to remove this bandaide when time permits.
Status: NEW → ASSIGNED
| Reporter | ||
Updated•19 years ago
|
Target Milestone: --- → Future
| Reporter | ||
Comment 6•19 years ago
|
||
This actually effect xpcom proxy too; return value and out params are not working very well. this is probably a bug in the XPTCall code for arm wince.
| Reporter | ||
Comment 7•19 years ago
|
||
This bug is causing all sorts of problems when passing more then 3 params. Examples are crashes when you do a window.open(), the progress meter in the url bar doesn't update, and of course xpconnect has to be complied non-optimized. Time to remove the bandaide and really fix for 013.
Target Milestone: Future → ---
| Reporter | ||
Comment 9•19 years ago
|
||
working on it. I think I found the problem. Patch coming up shortly.
| Reporter | ||
Comment 10•19 years ago
|
||
this matches what win32 does, and seams to work _alot_ better.
Attachment #192732 -
Attachment is obsolete: true
| Reporter | ||
Comment 11•19 years ago
|
||
Comment on attachment 210735 [details] [diff] [review] stdcall is a good thing this isn't working 100%.
Attachment #210735 -
Attachment is obsolete: true
| Reporter | ||
Comment 12•19 years ago
|
||
Comment on attachment 210735 [details] [diff] [review] stdcall is a good thing the change to "xptcstubsce.cpp" is okay. the change to the xpconnect make file does regress the orig. issue. Something very strang is going on wrt compiling xpconnect on wince. dan, could you r= the xptcall change. I have verifed this fix does not regress WinCE.
Attachment #210735 -
Attachment is obsolete: false
Attachment #210735 -
Flags: review?(dveditz)
Comment 13•19 years ago
|
||
Comment on attachment 210735 [details] [diff] [review] stdcall is a good thing r=dveditz
Attachment #210735 -
Flags: review?(dveditz) → review+
Comment 14•19 years ago
|
||
So originally turning off the optimizations somewhat fixed the problem. Removing the Aaron Reed section allowed you to turn optimizations on, but you're still having problems? or was the optimization change not taken? What's the current state and the current problem?
| Reporter | ||
Comment 15•19 years ago
|
||
so.. ;-) if I remove this line: http://lxr.mozilla.org/mozilla1.8/source/js/src/xpconnect/src/Makefile.in#150 the windows ce build (minimo) starts choking on xpconnect'ed js. Here is a log from a recent run with this line removed: *** Console log: 2006-06-26 13:35:05 *** [JavaScript Error: "document.getElementById(outnavTarget) has no properties" {file: "chrome://minimo/content/preferences/preferences.js" line: 445}] [JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x80000001 [nsIDOMXULElement.previousSibling]" nsresult: "0x80000001 (<unknown>)" location: "JS frame :: chrome://global/content/bindings/tabbox.xml :: set_selected :: line 564" data: no]"] [JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x8c10b900 [nsIDOMXULDocument.commandDispatcher]" nsresult: "0x8c10b900 (<unknown>)" location: "JS frame :: chrome://global/content/bindings/tabbrowser.xml :: setFocus :: line 768" data: no]"] [JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x8dfff661 [nsIDOMMouseEvent.button]" nsresult: "0x8dfff661 (<unknown>)" location: "JS frame :: chrome://global/content/bindings/browser.xml :: onxblmousedown :: line 876" data: no]"] [JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x80000001 [nsIDOMXULElement.previousSibling]" nsresult: "0x80000001 (<unknown>)" location: "JS frame :: chrome://global/content/bindings/tabbox.xml :: set_selected :: line 564" data: no]"] [JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x8c10b900 [nsIDOMXULDocument.commandDispatcher]" nsresult: "0x8c10b900 (<unknown>)" location: "JS frame :: chrome://global/content/bindings/tabbrowser.xml :: setFocus :: line 768" data: no]"] [JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x80000001 [nsIXPCComponents.interfaces]" nsresult: "0x80000001 (<unknown>)" location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onKeyPress :: line 359" data: no]"] [JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x80000001 [nsIXPCComponents.interfaces]" nsresult: "0x80000001 (<unknown>)" location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onKeyPress :: line 359" data: no]"] [JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x80000001 [nsIXPCComponents.interfaces]" nsresult: "0x80000001 (<unknown>)" location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onKeyPress :: line 359" data: no]"] [JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x80000001 [nsIXPCComponents.interfaces]" nsresult: "0x80000001 (<unknown>)" location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onKeyPress :: line 359" data: no]"] [JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x8c3770ac [nsIXPCComponents.interfaces]" nsresult: "0x8c3770ac (<unknown>)" location: "JS frame :: chrome://global/content/bindings/browser.xml :: destroy :: line 592" data: no]"] [JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x80000001 [nsIXPCComponents.interfaces]" nsresult: "0x80000001 (<unknown>)" location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onKeyPress :: line 359" data: no]"] [JavaScript Error: "aTab has no properties" {file: "chrome://global/content/bindings/tabbrowser.xml" line: 1516}] [JavaScript Error: "uncaught exception: 2147500037"] [JavaScript Error: "uncaught exception: 2147500037"] [JavaScript Error: "uncaught exception: 2147500037"] [JavaScript Error: "uncaught exception: 2147500037"] [JavaScript Error: "uncaught exception: 2147500037"] [JavaScript Error: "uncaught exception: 2147500037"] [JavaScript Error: "uncaught exception: 2147500037"] [JavaScript Error: "nsDragAndDrop is not defined" {file: "chrome://minimo/content/minimo.xul" line: 1}] [JavaScript Error: "uncaught exception: 2147500037"] [JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x8dd8a424 [nsIDOMNodeList.length]" nsresult: "0x8dd8a424 (<unknown>)" location: "JS frame :: chrome://global/content/bindings/tabbrowser.xml :: updatePopupMenu :: line 613" data: no]"] [JavaScript Error: "newBrowser has no properties" {file: "chrome://global/content/bindings/tabbrowser.xml" line: 673}] [JavaScript Error: "this.getBrowserForTab(aTab) has no properties" {file: "chrome://global/content/bindings/tabbrowser.xml" line: 1297}] [JavaScript Error: "this.getBrowserForTab(aTab) has no properties" {file: "chrome://global/content/bindings/tabbrowser.xml" line: 1297}] [JavaScript Error: "nsDragAndDrop is not defined" {file: "chrome://minimo/content/minimo.xul" line: 1}] [JavaScript Error: "this.getBrowserForTab(aTab) has no properties" {file: "chrome://global/content/bindings/tabbrowser.xml" line: 1297}] [JavaScript Error: "filter has no properties" {file: "chrome://global/content/bindings/tabbrowser.xml" line: 1328}] [JavaScript Error: "filter has no properties" {file: "chrome://global/content/bindings/tabbrowser.xml" line: 1328}] The build "sorta" works, but many many things are busted. It seams also like different runs produce different results.
Comment 16•18 years ago
|
||
So the Aaron Reed removall of the second patch was checked in. That had a positive effect, but not enough to turn on the optimization. There must be something unusual that the optimizer is doing with building the nsXPCWrappedJS class that is derived from the stub. I really need to see the assembly code that's getting generated. The code invoking the stub, the stub, and the nsXPCWrappedJS::CallMethod. Might be able to get that from the debugger and copy/paste that out. For it not to completely hose, it must be pretty close.
| Reporter | ||
Updated•17 years ago
|
Assignee: dougt → nobody
Status: ASSIGNED → NEW
Component: Build Config → XPCOM
Keywords: mobile
Product: Minimo → Core
QA Contact: chofmann → xpcom
Version: WinCE → unspecified
Updated•17 years ago
|
Component: XPCOM → XPConnect
QA Contact: xpcom → xpconnect
| Reporter | ||
Comment 17•16 years ago
|
||
haven't seen this problem after our 1.9 port.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•