Software Archive
Read-only legacy content
17061 Discussions

Range error: Maximum call stack size exceeded

Nicolas_Z_
Débutant
3 504 Visites

Hi Intel support team,

 

I am receiving this error upon compiling and running natively my app on iOS and Windows Phone, however it works just fine on the Intel's emulator, web broswer and Android (crosswalk and standard). I'm clueless about its causes as debugging the application directly on an iphone and iPad presents no error. The specific error i'm receiving is:

Range error: Maximum call stack size exceeded. At line 2076 of intelxdk.js

I kindly ask for your support on this one as i am somewhat out of options for tracing the problem.

 

Best regards,

 

Nicolas.

0 Compliments
15 Réponses
Swati_S_Intel1
Employé
3 504 Visites

Hello Nicolas,

Do you see this error on app start up or sometime after using the app?

What intel xdk plugins are you using? 

Swati

0 Compliments
Nicolas_Z_
Débutant
3 504 Visites

Hi Swati,

 

I see it on startup, the error renders the app useless as it wont load any further (it is worth noting that the message error is being trhown by an onerror handler i setted up). 

 window.onerror = function myErrorHandler(errorMsg, url, lineNumber)
     {
            console.log(errorMsg);
         alert(errorMsg + ' \n' + lineNumber + '\n ' + url);
     }

 

I am only using the inapp browser plugin.

Best regards, 

 

Nicolas

0 Compliments
Swati_S_Intel1
Employé
3 504 Visites

Are you using legacy build?

0 Compliments
Nicolas_Z_
Débutant
3 504 Visites

Yes, i am, as i am trying to create and adhoc version for local testing before submitting to the store. Also, it is the only way to generte WP8 apps at the moment.

0 Compliments
Swati_S_Intel1
Employé
3 504 Visites

I recommend you use Cordova build for iOS as legacy build is deprecated. You can build adhoc build for testing by specifying adhoc build option  on apple developer site while generating your certificate. For WP8 we can try to debug the issue, but no promises for getting it fixed. What happens if you ignore this error? Are you loading inAppBrowser upon startup? Please send your project so I can try to debug.

Swati

0 Compliments
Ryan_F_Intel1
Employé
3 504 Visites

One thing you can try is to remove the application from the device.  Make sure you have a good network connection and then install again.  There can be issues with the app because it might not have installed properly on the first run if the network connection is poor.

0 Compliments
Nicolas_Z_
Débutant
3 504 Visites

Hi Ryan, i've tried doing that but it makes no difference, even on a fresh install on different phone i still get the same error. Somehow a compiled version was approved on the windows phone store, and downloading it directly from them threw the same error. iOS compiled on Cordova 3 works just fine.

0 Compliments
John_H_Intel2
Employé
3 504 Visites

The plugins you setup in the XDK are NOT used for the legacy builds. They are only used for Cordova builds. 

0 Compliments
Nicolas_Z_
Débutant
3 504 Visites

I compiled the application again with No plugins and i get the exact same error when tested on my devices. Even more, i thought it might be a problem with the testing environment, so i recompiled it and sent it to the Wp store, and somehow it was approved, but it is useless as i get the same error: Stack overflow at line: 40.

https://www.windowsphone.com/es-co/store/app/comete-alguito/7099f97e-2cf5-4b7d-bf0f-3cabee665181

I already sent the project to Swati as i am really out of options on this one, i again kindly ask for your help.

0 Compliments
John_H_Intel2
Employé
3 504 Visites

We are still looking into this and will hopefully have something meaningful to share with you tomorrow :)

0 Compliments
John_H_Intel2
Employé
3 504 Visites

In your code, you have something like this:

<script type="text/javascript" charset="utf-8" src="intelxdk.js"></script> 
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>

The intelxdk.js MUST be first. Reorder them, and reupload/build/install your app and see if that helps.

 

0 Compliments
Nicolas_Z_
Débutant
3 504 Visites

Hi John!

That did solve the Maximum call stack size issue!

Yet, it starts loading and dies just in the first screen. No error message on console and no error display on the phone.. It doesn't even finish loading the index.

0 Compliments
Swati_S_Intel1
Employé
3 504 Visites

Hi Nicolas,

With the Maximum call stack size issue resolved I think it makes sense to try to create a very simple app without plugins and see if it works for you. Use HTML5+Cordova template to create a new project and then add the Intel XDK plugins as you need.

Let me know if it still doesn't work. 

Swati

0 Compliments
Swati_S_Intel1
Employé
3 504 Visites

One more thing, try removing cordova.js temporarily. 

0 Compliments
Swati_S_Intel1
Employé
3 504 Visites

Hello Nicolas,

Few things:

1. Your latest code has the debug tag <script src="http://debug-software.intel.com/target/target-script-min.js#75hXOGdbL3g0rC94i7zDP-k1ffvNn1BwZVd2_gsLo24"></script>

Pleases remove that and try to test again.

2. You are using SVG files for graphics. Please note that SVG is not supported on WP8 hence there is rendering issue.

3. This may not be a real issue but you may want to remove iOS Certs folder before building for WP8.

Try these and let us know if it works for you.

Thanks,

Swati

 

 

0 Compliments
Répondre