cancel
Showing results for 
Search instead for 
Did you mean: 

"Maximum call stack exceeded error" in UI5 version 1.71

Former Member
0 Kudos
4,730

I have a scenario where I have multiple icon tabs and while switching the tabs we are making multiple batch calls(read and/or update) with expand. and many times we are getting "Maximum call stack exceeded error" during read call in UI5 version 1.71. but works fine in lower versions like 1.52

Uncaught RangeError: Maximum call stack size exceeded

at constructor.D.resolveFromCache (ODataModel-dbg.js:6422) at constructor.D.resolveFromCache (ODataModel-dbg.js:6441) at constructor.D.resolveFromCache (ODataModel-dbg.js:6441) at constructor.D.resolveFromCache (ODataModel-dbg.js:6441) at constructor.D.resolveFromCache (ODataModel-dbg.js:6441) at constructor.D.resolveFromCache (ODataModel-dbg.js:6441) at constructor.D.resolveFromCache (ODataModel-dbg.js:6441) at constructor.D.resolveFromCache (ODataModel-dbg.js:6441) at constructor.D.resolveFromCache (ODataModel-dbg.js:6441) at constructor.D.resolveFromCache (ODataModel-dbg.js:6441)

any suggestions to fix this.

View Entire Topic
scatudal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Sahidur,

Found another situation where it would do the same behavior for a get entity. Here's the sequence:

/UserSet('user1')

/UserSet('user2')

/UserSet('user1') // the third read would produce the exact same stack trace you have above

My work around was to set the local variable mPathCache to {} on logout. Since I'm extending the base ODataModel, here's what it looks like in my code.

I subscribe to the logout event in the constructor of my CustomODataModel:

sap.ui.getCore().getEventBus().subscribe("userAuthentification", "logout", this._invalidate.bind(this));

Here's the _invalidate function:

_invalidate: function() {
    this.mPathCache = {};
}

Hoping this will help someone,

Sylvain

scatudal
Product and Topic Expert
Product and Topic Expert
0 Kudos

I just realized that this is occurring because the code always makes the same call and service will return the information of the authenticated user:

/UserSet('X')

It's not a good practice, a function call should be used in such a situation (ie. getAuthenticatedUser).

Regards,
Sylvain