Chrome crashes and IE freezes => MapView instance in AngularJS deferred object.

3124
3
07-29-2015 04:48 AM
Ceesvan_Altena
New Contributor III

Hello,

We found a bug in the 4.0 beta 1 of the ArcGIS Api for JavaScript. Chrome crashes and IE 11 freezes when a AngularJS deferred object is resolved with a MapView instance.

To demonstrate this I created a Plunker. Open the link below and click on ‘Run’.

http://plnkr.co/edit/SqswhEdJUEDsVnDcvshz

I am curious if this is already a known bug by the API for JavaScript team.

With kind regards.

Tags (1)
0 Kudos
3 Replies
ChrisSmith7
Frequent Contributor

I had a brief moment to debug a little bit; here's some info, if helpful:

I wonder if there's some memory leakage...

YannCabon
Esri Contributor

Hi,

I've looked into it. View/Map/Layers are Promises too. Seams like $q doesn't like it.

I will come with something.

Thanks for the report and the example!

YannCabon
Esri Contributor

We looked into it yesterday and we found a related issue in Q: Q fails to detect circular promise chain · Issue #712 · kriskowal/q · GitHub

To validate here's a test with polyfill for Promise that works: JS Bin - Collaborative JavaScript Debugging

I would suggest that you resolve your deferred like so:

mapViewDeferred.resolve({ view: view });

0 Kudos