Hello, while using the new TitaniumStudio debugger I'm been quite frustrated by the
msg:org.mozilla.javascript.EvaluatorException: Too deep recursion while parsingerror when placing breakpoints in my code and debugging it on the android simulator. It doesn't happen with iOS.
I even tried setting the stack size to ridiculously large values
<property name="ti.android.threadstacksize" type="int">2097152</property>but didn't really help :/
any suggestion?
thx lucio
4 Answers
this thing is VERY annoying... Placing a breakpoint in whatever code that is not totally trivial will just break up everything ending up in that too-deep recursion error... What's the point of a debugger that breaks you code while trying to debug it? :/
Lucio
Please take note of this advice in the docs: Avoid deep nesting
Setting threadstacksize to very large values is likely to cause problems; 128K or lower is recommended.
Hope this helps
Hi paul, thx for aswering :)
I'm not really deep nesting: it's just a webView in a modal window opening upon click on an advertising banner. The app is tabbed base. This code use to work fine on 1.6.2 but now crashes the app on android (titanium 1.7.0) for some reason, no problems on iOS. I was trying to find the reason and placed 2 break points hoping the new debugger could help me figure out what's going on Here's the code:
(banner is an imageView displaying a PNG) banner.addEventListener('click', __bind(function(e) { var closeBtn, landingPageWin, webView; landingPageWin = Ti.UI.createWindow({ backgroundColor: 'white', navBarHidden: false, tabBarHidden: true, orientationModes: [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT, Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT] }); if (bz.os !== 'android') { closeBtn = Ti.UI.createButton({ title: "Chiudi" }); closeBtn.addEventListener('click', function() { return landingPageWin.close(); }); landingPageWin.leftNavButton = closeBtn; } else { landingPageWin.addEventListener('android:back', function() { return landingPageWin.close(); }); } webView = Ti.UI.createWebView({ url: e.source.clickURL, touchEnabled: true }); landingPageWin.add(webView); // break point 1 landingPageWin.open({ // break point 2 modal: true }); }, this)); }I'm aware of the stack size :) I was setting those insane values trying to get passed that "recursion" error, but it didin't help at all and I'm pretty much still stucked there
Is it possible that you simply have a bug in that the closeBtn has not been created on 'android'?
if (bz.os !== 'android') { closeBtn = Ti.UI.createButton({ title: "Chiudi" });
Your Answer
Think you can help? Login to answer this question!