Uncaught RangeError: Maximum call stack size exceeded RRS feed

  • Question

  • Ok, bit of a strange one maybe I can get some guidance on here. Just to clarify, my application is the web control hosted inside a Chromium frame in a Windows Form app, serving the page and tile layers form an internal web server. Typical use will involve displaying multiple tile layers, adding/removing them as the application updates the visualizations they are displaying, panning/zooming the map etc. I would say the interactive is quite extensive, the layers list can reach quite high revision numbers, 1500+ in most sessions.

    What happens after a period of time is that the map will become unresponsive. It will completely refuse to render, and the JS calls I am making will become very slow. I do see interaction, such as the mouse move giving me correct and valid coordinates.

    Debugging further, I am seeing exceptions thrown by the map via one of it's callback requests to your servers only when it is in this unresponsive state, which is:

    Uncaught RangeError: Maximum call stack size exceeded


    I have tried to eliminate most of the callback requests it makes by turning the map in to lite mode and temporarily turning off the copyright text, so I am not sure specifically what this is trying to update. 

    Once it becomes unresponsive it is not possible to recover it.

    Obviously, there are many many things I that could be going wrong, from my application through to the Chrome frame I am using itself. 

    Is this error meaningful, or an indicator to a potential issue?

    Friday, December 2, 2016 3:43 PM


All replies

  • Not sure about this JavaScript issue and haven't seen it before. Will try and see if I can reproduce this in a standalone browser outside of a WinForm app. If I can reproduce it I'll log a bug for the team to investigate.

    That said, any reason for not using the WPF Bing Maps control which works in WinForm apps. You likely will be better performance and will be able to use .NET to develop against the map.

    [Blog] [twitter] [LinkedIn]

    Friday, December 2, 2016 3:50 PM
  • Thanks for looking in to it.

    Mostly historic reasons. The app has been around since... Virtual Earth 3.0 I think was the first we used. I've just finished migrating it from 6.3 to 8.0. So obviously it massively pre-dates the WPF interface. Our own JS layer isn't actually very complicated itself, just adding/removing the tile layers and tracking the viewport is about as much as it gets. What the application is doing with those tiles is where most of the logic is. We kept with the web interface as eventually the back end will be running on Azure compute and just serving the UI entirely as a web interface, but we have an awful lot of WinForms to re-write to do that yet.

    Perhaps I can send you some more about what our app does and how it uses the map more directly, for you and your teams information? I can't really post too many specifics publicly.

    Friday, December 2, 2016 4:58 PM
  • Further to before, I have managed to trap this in the Chrome debugger and it is indicating this function call. You can see from the stack trace it has recursively overflowed the call stack. Can you point me towards what this dispose is and why it would be recursively disposing?

    Monday, December 5, 2016 1:39 PM
  • Feel free to send me more details about your app to me at richbrun at

    [Blog] [twitter] [LinkedIn]

    Tuesday, December 6, 2016 2:28 PM