angular2-busy icon indicating copy to clipboard operation
angular2-busy copied to clipboard

Maximum call stack size

Open msphn opened this issue 8 years ago • 10 comments

Hey,

I run a pretty complex application and need to dynamically change the subscriptions inside busy. This works quite well sometimes and sometimes not.

Sometimes, I don't understand why, I receive a maximum call stack inside the equals method.

error_handler.js:53 RangeError: Maximum call stack size exceeded
    at equals (util.js:70)
    at equals (util.js:76)
    at equals (util.js:76)
    at equals (util.js:76)
    at equals (util.js:76)
    at equals (util.js:76)
    at equals (util.js:76)
    at equals (util.js:76)
    at equals (util.js:76)
    at equals (util.js:76)

Any ideas how to deal with it? :(

msphn avatar Nov 15 '16 17:11 msphn

At some time subscriptions containing a reference to itself which can break the equals method.

This isn't happening with promises.

msphn avatar Nov 17 '16 09:11 msphn

Using promises makes the whole a lot more stable, I would suggest to everyone.

Btw. is there a special reason why you copied the angular equals method to the lib?

msphn avatar Nov 17 '16 09:11 msphn

I have the same problem!

paria-tk avatar Nov 18 '16 13:11 paria-tk

@paria-tk use promises to get rid of it until theres a solution for observers, worked quite well for me! :)

msphn avatar Nov 18 '16 14:11 msphn

@devyumao @cookiekiller I am using observables and I get Maximum call stack size exceeded error as I am calling another service call inside this.busy . Did anyone found workaround for this issue. I cannot changes to promises now as it will be a lot of code changes.

Another scenario getting call stack error:

on page load i will be loading data into several panels, I have service calls on ngOnit() one after the other, but this throwing error call stack maximum exceeded , if i remove "this.busy =" to other panels it just works fine, its only that before subscription complete of first panel load another is triggered and I am getting max call stack issue i guess.

How can I fix this ?

vijender1256 avatar Feb 19 '17 23:02 vijender1256

The same problem. Can not use Subscription as 'busy'.

arusak avatar Apr 25 '17 08:04 arusak

I have the same problem. Is there going to be a fix for this?

zzurka avatar Jul 19 '17 14:07 zzurka

I used FlatMap and forkjoin where ever it's needed and got rid of this issue in most of the cases.

vijender1256 avatar Jul 19 '17 14:07 vijender1256

@vijender1256 Can you provide small example? Thanks

zzurka avatar Jul 19 '17 14:07 zzurka

Any new on this issue now, maybe a workaround ?

lyvyu avatar Oct 06 '17 08:10 lyvyu