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.


    Beta Boids with a Crash

    Pythonista
    boids beta crash scene
    3
    7
    5968
    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.
    • Oscar
      Oscar last edited by Oscar

      I've been playing with some boids (https://en.wikipedia.org/wiki/Boids) in Pythonista using the beta. It's still work in progress, but since I've run into a problem I thought it is time to share it anyway: https://gist.github.com/offe/48c833fc5bfad3571bb1

      When it's run on my iPad mini the Pythonista app crashes after around 100 seconds every time. My plan is to cut away as much as possible of the code and still keep the crash, then maybe Ole can identify the problem. But since I just ran out of weekend I appreciate all the help I can get from you guys. Either I'm doing something weird or there is a bug somewhere. My bet at the moment is that there is a memory leak somewhere.

      Up to 12 boids can swarm around the screen in 60 fps (on my iPad mini). If you touch the screen their flocking behaviour is reversed so they want to "fly solo". If I knew how to include a screenshot of the boids and obstacles it would be here :-) :

      [Nonexistng screenshot]

      (Edit:)And now I know:

      alt text

      1 Reply Last reply Reply Quote 1
      • Webmaster4o
        Webmaster4o last edited by

        Sounds cool, I'll be sure to check it out.

        PS: For uploading screenshots, I use pyimgur with this script. I can take a screenshot, then run the script, and in my clipboard I have a code snippet which I can paste in the forums.

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

          Wow, that's really cool. I like it a lot.

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

            I just tried it in the new beta, and it does no longer crash. At least not within the 10 minutes I ran the program.

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

              I've experienced a similar issue while developing the bundled "Swarm" example (also a Boid simulation). The responsible memory leak should already have been fixed in the last build though.

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

                It would be fun to look at the swarm example, but I can't find it. Is it in the the latest beta? Where?

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

                  @Oscar Should be in the Examples folder (use "Restore Examples" in the settings if it's not there).

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