func.apply() throws Error -2147467259

R

Richard Maher

Hi,

Just a bit more info from the FireFox 3 side of things. After some time,
with a single Randomator tab and 5 EmpPickers, the Error Console spewed
out: -

"Too much recursion" at . .mozilla firefox/components/nsPlacesDBFlush.js
line 259 and then just reverted to: -

"Too much recursion"
"Too much recursion"
"Too much recursion"

before disappearing up it's own bottom

Hey, it's probably me but I just can't see the recursion at the moment :-(
I'm at pains to use setTimeout() to deliver an unparented, top-level,
stack-virginal event (come Asynchronous System Trap) to reset the depth each
time; what have I missed?

What does nsPlacesDBFlush do at munged-line 259 and could it be a FF bug or
just another red-herring pointing to the floundering of the page author?

Cheers Richard Maher

PS. While Chrome has issues of it's own with Applets this appears not to be
one of them. As we speak Chrome with 2 x 5 EmpPicker tabs has been rockin' &
rollin for over 3 hours. (Fading's a bit weird/slow though)

Richard Maher said:
rf said:
What above error?

Not sure what newsgroup reader you're using but in everyone I've seen you'll
find a subject line or title for my post that says: -
" func.apply() throws Error -2147467259"

But if it helps clarify things the error is caught and rethrown in
Tier3Client.js (which was included as a response to my original post) circa
line 188 character 24. The exception "name" was "Error" and the "number"
was -2147467259. All other attributes were unavailable and toString()
revealed [object Error]

So, in a nutshell, when I try to call (apply) the user's callback routine
IE8/Windows says no but won't say why. I was hoping someone could tell me
some great debugging option that might reveal additional information about
the "Error" or perhaps some buttons/quotas to push that might reval more.

Please note that this could be a timing/collision thing, as upping the
number of EmpPickers to 5 results in attrition of employees back to zero.
The "good" news is that the rendezvous() function must have been called (and
the JAVA console backs that up) or the browser would hang very quickly so
I'm off to see how far in positionDiv the code gets.

Stack Limit?

Maybe each DIV get's displayed the same amount of times before bombing?

Some recurrsiveness I'm missing?

Oh well, I guess I was just hoping that "Error -2147467259" wasn't as
generic as it looks and it might have rung a bell with someone. I'd better
roll up the sleaves. . .
Regards Richard Maher
 
R

Richard Maher

Hi Stefan,

Stefan Weiss said:
Are you using Firebug? I've seen that error a few times, and always in
situations where my code couldn't possibly recurse. Disabling Firebug
solved the problem.

Yes, I got it first with Firebug but after turning Firebug off I'm still
getting it with FF 3.5.7 :-(

(Error console still on though)

A further update: - FireFox 2.0.0.4 has absolutely no problem with
processing 3 tabs, 5 EmpPickers per tab and a 1 sec fade time after 4 hours.
But then FF2 doesn't have the components/nsPlacesDBFlush.js script either.

Chrome with the same load is also soldiering on admirably and not missing a
beat for about 6 hours!
Cheers Richard Maher
 
J

John B. Matthews

Richard Maher said:
Oh well, I guess I was just hoping that "Error -2147467259" wasn't as
generic as it looks and it might have rung a bell with someone. I'd better
roll up the sleaves. . .

-2147467259 = 0x80004005 = 10000000000000000100000000000101

I doubt it means anything, but I've seen systems that use high order
bits to segregate groups of errors, incorporate legacy errors or encode
multiple errors as a set.

OTOH, this may lead somewhere:

<http://www.google.com/search?q=80004005>
 
R

Richard Maher

Hi Jorge,

Thanks for the reply and taking the time to attempt a Java-free reproducer.
.. .


****FROM HERE****
On Jan 30, 11:01 am, "Richard Maher" <[email protected]>
wrote:
(...)

Removing the applet and the back-and-forth between Java-JS the
resulting java-less version seems to run fine:

http://jorgechamorro.com/cljs/095/

<script type="text/javascript">
function Tier3Client () {
(this.chan= {}).rendezvous= function () {
console.log("this.chan.rendezvous(), "+ (+new Date()));
};

this.chan.send= function (msgCandidate, msgBody, async) {
var r=
"31abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstu
vwxyz";
if (async) {
setTimeout(function () {
console.log("this.chan.send(async===true)");
msgCandidate.dispatcher(r, 0, 0);
}, (2e3*Math.random())|0);
} else {
console.log("this.chan.send(async===false)");
msgCandidate.dispatcher(r, 0, 0);
}
};

this.chan.appendConsoleMsg= function (p) {
console.log("appendConsoleMsg: "+ p);
};
}

(Tier3Client.prototype = {}).send= function (msgBody, callback,
async) {
var chan = this.chan;
var callbackArgs = [];
var i = 0;
var msgCandidate = {
dispatcher : function (responseMsg, msgSlotId, msgSeqNum) {
callbackArgs[0] = responseMsg;
callback.apply(this, callbackArgs);
},
rendezvous : function () {
console.log("msgCandidate.rendezvous(), "+ (+new Date()));
return chan.rendezvous();
}
};
for (i=3; i<arguments.length; i++) {
callbackArgs[i - 2] = arguments;
}
return chan.send(msgCandidate, msgBody, async);
};

Tier3Client.prototype.appendConsoleMsg= function (msg) {
console.log("Tier3Client.prototype.appendConsoleMsg(), "+ (+new
Date()));
this.chan.appendConsoleMsg(msg);
};
</script>
--
Jorge.

****TO HERE****

Sadly, I'm not much further down the track (away last week) but I have
narrowed the offending line down to be in the Randomator.html file and the
positionDiv function in the EmpPicker object. Specifically it is where I
reset the innerHTML of the DIV to the new employee details: -

case "31" :
targetDiv.innerHTML =
'<table border="0" cellpadding="1px" '+
' align="center" id="empDetails"> '+
' <caption>Totally Random Employee</caption>'+
' <tr><td class="promptItem">Employee Id: </td>'
[and so on. . .]
'</table><br>';
break;

Before I start clutching at straws, and doing things like instantiating a
whole new DIV each time the timer expires, can anyone offer any
half-educated guesses here as to what might be causing the problem? Look, I
know it'd be a lot easier if I could show th JAVA code or at least a
web-link but I can't. On the useful side of the ledger though let me say
that the DOM-collision theory is backed-up by the failures appearing to
occur in pairs, i.e.: Mesages 19/20 failing followed later by 31/32.

To me it screams out "attempted multi-threaded manipulation of the DOM" but
all available evidence (inclusing anecdotal :) says otherwise. They
are/should-be exclusive updates to distinct objects.

I believe there are some quite useful LiveConnect debugging/logging options
out there that someone told me about and I've subsequently forgotten. Can
anyone help me with that? (I've set the JAVA console to "5" but that didn't
up the verbosity much)

Is there a sleep(3) function in Javascript so that I can introduce the
same/similar delay to Jorge's JAVA-free t3client.send() method as I have
with my Applet<->Server version? IOW, setTimeout(myCallback,
somethingLessThanWhatImAbout to SleepFor)?

Cheers Richard Maher
 
R

Richard Maher

HI again Stefan,

Stefan Weiss said:
Are you using Firebug? I've seen that error a few times, and always in
situations where my code couldn't possibly recurse. Disabling Firebug
solved the problem.

What have you used to replace console.log(reallyUsefulStuff) when you have
had to disable FireBug?

Cheers Richard Maher
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top