omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Crash report

    Pythonista
    3
    4
    2797
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tmhrtly173
      tmhrtly173 last edited by

      https://gist.github.com/4467595

      Running this code in pythonista causes the app to crash entirely... It's related to the bug in my code (after d[0]=0 I should return d, if I add in that line then it works a charm). It's funny that an app so stable might have one tiny little circumstance which would probably never happen... I'd be interested in hearing about what in the app's code caused this bug :D

      Edited to use a gist cos otherwise a distinct lack of tabulation occurs.

      1 Reply Last reply Reply Quote 0
      • omz
        omz last edited by

        When I run that code, I get a RuntimeError ("maximum recursion depth exceeded"), but it doesn't crash. What kind of device are you using?

        1 Reply Last reply Reply Quote 0
        • pudquick51
          pudquick51 last edited by

          You get the crash because you're creating an infinite recursion - dPrev starts as none and hits the part where it calls numDigitsDec(n-1).

          It never gets out without that return, it just goes deeper and deeper.

          Pythonista is likely crashing because you're hitting the memory limits of an iOS app on your device before Pythonista reached maximum stack recursion depth.

          The standard depth is around 1000 levels. You're just hitting RAM limits before that.

          My guess is you're on an iPod Touch.

          1 Reply Last reply Reply Quote 0
          • tmhrtly173
            tmhrtly173 last edited by

            I was running that on an iPad 3.

            I have just restarted my iPad (to free up memory) but it still crashed when I ran it. I checked sys.getrecursionlimit() and it gives me 256, so not excessively high...

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors