Last Comment Bug 683096 - Error: [Exception... "Could not convert JavaScript argument arg 5 [calIOperationListener.onGetResult]"...
: Error: [Exception... "Could not convert JavaScript argument arg 5 [calIOperat...
Status: RESOLVED FIXED
[needed beta][no l10n impact]
:
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla9
Assigned To: Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary)
:
: Nathan Froyd [:froydnj]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-29 23:33 PDT by Philipp Kewisch [:Fallen]
Modified: 2011-09-03 06:53 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix - v1 (1.42 KB, patch)
2011-09-01 09:36 PDT, Philipp Kewisch [:Fallen]
ssitter: review+
Details | Diff | Splinter Review
Patch (1.18 KB, patch)
2011-09-02 05:04 PDT, Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary)
ted: review+
Details | Diff | Splinter Review

Description Philipp Kewisch [:Fallen] 2011-08-29 23:33:04 PDT
Error: [Exception... "Could not convert JavaScript argument arg 5 [calIOperationListener.onGetResult]"  nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"  location: "JS frame :: file:///Users/kewisch/mozilla/comm-central/obj-x86_64-apple-darwin11.0.0/mozilla/dist/Shredder.app/Contents/MacOS/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calMemoryCalendar.js :: <TOP_LEVEL> :: line 485"  data: no]
Source File: file:///Users/kewisch/mozilla/comm-central/obj-x86_64-apple-darwin11.0.0/mozilla/dist/Shredder.app/Contents/MacOS/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calMemoryCalendar.js
Line: 485

When doing various calendar additions. Also caused a test failure, so this must be from one of the recent checkins.
Comment 1 Philipp Kewisch [:Fallen] 2011-08-30 14:15:00 PDT
Hmm strange. Works on Linux, fails on Mac/Windows. Argument 5 is a PRUint32, so I have no idea why the hell its going wrong. Relevant lines are:

aListener.onGetResult (this.superCalendar,
                       Components.results.NS_OK, 
                       typeIID,
                       null,
                       itemsFound.length
                       itemsFound);
Comment 2 Stefan Sitter 2011-08-30 15:17:13 PDT
Based on the win32 hourly build log this is the regression range:
https://hg.mozilla.org/comm-central/pushloghtml?fromchange=f4bbdf829ffd&tochange=a728bb065609

Maybe Bug 681720 caused regression on how the interface is created? And maybe only the win32 hourly build fails because it seems to be the only one that was clobbered in the last days?

Wild guess: Is the number in "JavaScript argument arg 5" 0-based or 1-based? In the former case: maybe the new pyxpidl parser doesn't like the line break inside aItems definition?

 627   void onGetResult (in calICalendar aCalendar,
 628                     in nsresult aStatus,
 629                     in nsIIDRef aItemType, 
 630                     in nsIVariant aDetail,
 631                     in PRUint32 aCount, 
 632                     [array, size_is(aCount), iid_is(aItemType)] 
 633                     in nsQIResult aItems );
Comment 3 Philipp Kewisch [:Fallen] 2011-09-01 09:36:48 PDT
Created attachment 557534 [details] [diff] [review]
Fix - v1

(In reply to Stefan Sitter from comment #2)
> Wild guess: Is the number in "JavaScript argument arg 5" 0-based or 1-based?
> In the former case: maybe the new pyxpidl parser doesn't like the line break
> inside aItems definition?
Hmm strange. I probably missed clearing out the right things, but your idea might actually fix it. I changed that, ran the tests, it worked. Then I popped off the patch, make clean in base/public, make in calendar/lightning, and for some reason it still worked. I think we should try it and see what the tinderboxen say.
Comment 4 Stefan Sitter 2011-09-01 11:21:49 PDT
Comment on attachment 557534 [details] [diff] [review]
Fix - v1

r=ssitter for testing. do you intend to keep the cal.WARN statement?
Comment 5 Philipp Kewisch [:Fallen] 2011-09-01 12:45:11 PDT
Oh no, forgot to qref that patch it seems. Thanks!
Comment 6 Philipp Kewisch [:Fallen] 2011-09-01 14:37:25 PDT
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/71c2f36ca280>
-> FIXED
Comment 7 Philip Chee 2011-09-01 20:45:51 PDT
> Wild guess: Is the number in "JavaScript argument arg 5" 0-based or 1-based? In the
> former case: maybe the new pyxpidl parser doesn't like the line break inside aItems
> definition?
File a bug?
Comment 8 Stefan Sitter 2011-09-01 21:40:51 PDT
Unfortunately it doesn't seem to help. Now Linux shows the same error, maybe because the checkin caused a rebuild http://tinderbox.mozilla.org/showbuilds.cgi?tree=CalendarTrunk

TEST-UNEXPECTED-FAIL | (xpcshell/head.js) | [Exception... "Could not convert JavaScript argument arg 5 [calIOperationListener.onGetResult]"  nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"  location: "JS frame :: file:///builds/buildbot/comm-central-lightning-linux/build/objdir-tb/mozilla/dist/bin/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calStorageCalendar.js :: cSC_getItem :: line 634"  data: no]
Comment 9 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-09-02 04:52:41 PDT
I'm 95% sure this is a bug in the new IDL compiler.
Comment 10 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-09-02 05:03:43 PDT
Yep, definitely a bug in the IDL compiler.  We're not handling array's of nsQIResults.  Patch forthcoming.
Comment 11 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-09-02 05:04:17 PDT
Created attachment 557802 [details] [diff] [review]
Patch
Comment 12 Stefan Sitter 2011-09-02 06:01:50 PDT
Are the tests in mozilla/js/src/xpconnect/ related to or used by this component?

https://mxr.mozilla.org/comm-central/source/mozilla/js/src/xpconnect/tests/idl/xpctest.idl#230 defines a test method that is similar to the one defined by Lightning code. Therefore I assumed the new idl compiler still supports this.
Comment 13 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-09-02 06:07:21 PDT
There's some in js/src/xpconnect/tests/js, but I don't think those are running ...
Comment 14 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-09-02 14:49:52 PDT
http://hg.mozilla.org/mozilla-central/rev/e5815c156b6c
Comment 15 Ed Morley [:emorley] 2011-09-02 20:48:20 PDT
The whole b-s merge backed out of m-c for causing bustage:
http://hg.mozilla.org/mozilla-central/rev/472716252ea3

https://tbpl.mozilla.org/?usebuildbot=1&rev=e5815c156b6c
Comment 16 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-09-03 06:53:55 PDT
http://hg.mozilla.org/mozilla-central/rev/a351ae35f2c4

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