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.


    Odd Crash Report

    Pythonista
    crash objc scene
    5
    15
    4662
    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.
    • stephen
      stephen @JonB last edited by

      @JonB said:

      Can you install @dgelessus 's faulthandler, then reproduce the crash? That will show the full stacktrace at least.

      Which code commented out fixes the crash?

      I have seen some strange unrecognized selectors when something gets totally borked, maybe some memory got overwritten.

      sorry for the weird commenting lol i just coppied from script

      yea i will give FaultHandler a try Thank You!

      
      ###############BEGIN DEBUG BLOCK###############
      #FIXME: TESTING..
      ##class Pond(SpriteNode):
      ##	def __init__(self, p, *args, **kwargs):
      ##		self.texture = Texture('./desert/desert-pond-top.png')
      ##		self.position=Point(200, 60)
      ##		SpriteNode.__init__(self,
      ##			texture=self.texture,
      ##			position=self.position,
      ##			parent=p, *args, **kwargs)
      ##		self.fishingSpots=[
      ##			Point(-350, 100),
      ##			Point(50, -200),
      ##			Point(50, 225),
      ##			Point(325, 100)]
      ##		self.fishingNodes=[]
      ##
      ##			FishingSpotBrush(self, [], position=Point(0, 0)),#self.fishingSpots[0]),
      ##			FishingSpotBrush(self, [], position=Point(0, 0))]#self.fishingSpots[1])]
      ##		for brush in self.fishingNodes:
      ##			import random
      ##			x, y=random.choice(self.fishingSpots)
      ##			brush.run_action(Action.move_to(x, y, 5))
      ##
      ##
      ##			
      ##		self.Animate()
      ##	def Animate(self):
      ##		scale = move = alpha=[]
      ##		r = rx = ry = 0
      ##		for x in range(100):
      ##			r=random.random()
      ##			inRange = 0.80 < r < 1
      ##			if inRange:
      ##				scale.append(a.scale_to(r+.10, 5, TIMING_SINODIAL))
      ##				alpha.append(a.fade_to(r-.10, 5, TIMING_SINODIAL))
      ##			rx, ry=random.randrange(5, 30), random.randrange(5, 10)
      ##			move.append(a.move_by(rx, ry, 5, TIMING_SINODIAL))
      ##			move.append(a.move_by(-rx, -ry, 5, TIMING_SINODIAL))
      ##		self.run_action(
      ##			a.repeat(
      ##				a.group(
      ##					a.sequence(scale),
      ##					a.sequence(move)), -1))
      ##
      ##class DevMapDesert(SpriteNode):
      ##	def __init__(self, p, *args, **kwargs):
      ##		self.texture = Texture('./desert/desert-testing.png')
      ##				self.size=Size(4096, 4096)
      ##		SpriteNode.__init__(self,
      ##			texture=self.texture,
      ##			size=self.size,
      ##			parent=p, *args, **kwargs)
      ##				self.pondWater=Pond(self)
      ##			def update(self, dt):
      ##		pass
      ##		
      ###############END DEBUG BLOCK###############
      
      
      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        Try commenting out the self.Animate. I wonder if the repeat forever could be a problem, say if there was a memory leak somewhere.

        stephen 1 Reply Last reply Reply Quote 0
        • stephen
          stephen @JonB last edited by

          @JonB Good Idea!

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

            @JonB i cannot seem to find FaultHandler

            cvp 1 Reply Last reply Reply Quote 0
            • stephen
              stephen last edited by stephen

              @JonB @mikael I believe i found the one issue.

              
                      r1= SpriteNode(
              			Texture(ui.Image.named('./assets/player-ring1.png')),
              			position=p.size/2,
              			scale=0.5,
              			speed=2,
              			alpha=0,
              			parent=main)
              		r2= SpriteNode(
              			Texture(ui.Image.named('./assets/player-ring2.png')),
              			position=p.size/2,
              			scale=0.5,
              			speed=2,
              			alpha=0,
              			parent=main)
              
              

              i think Texture(ui.Image.named('./assets/player-ring1.png')), is whats crashing but i agree on the memory leak. so im going to go over every object and see if i can find what hanging up..

              1 Reply Last reply Reply Quote 0
              • cvp
                cvp @stephen last edited by

                @stephen said:

                cannot seem to find FaultHandler

                https://github.com/dgelessus/pythonista_startup

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

                  @cvp ... guess who looked right at it earlier and didmt see it... πŸ‘‰πŸΌπŸ€¦πŸ»β€β™‚οΈ

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

                    @stephen said:

                    for brush in self.fishingNodes:
                    from random import choice
                    x, y = choice(self.fishingSpots)
                    brush.run_action(Action.move_to(x, y, 5))

                    self.Animate()
                            def Animate(self):
                        scale = move = alpha=[]
                        r = rx = ry = 0
                        for x in range(100):
                    

                    @stephen, I'm confused by the indentation and code sequence in this region of class Pond. Maybe the problem is here?

                    stephen 1 Reply Last reply Reply Quote 0
                    • stephen
                      stephen @njm last edited by stephen

                      @njm i see lol this was a section that was commented out by another script i been working on and the uncomment function is still buggy. normally that code is like the following. otherwise the script wouldnt run at all

                      
                          for brush in self.fishingNodes:
                      		from random import choice
                      		x, y = choice(self.fishingSpots)
                      		brush.run_action(Action.move_to(x, y, 5))
                      
                      	self.Animate()
                      	
                      def Animate(self):
                          scale = move = alpha=[]
                          r = rx = ry = 0
                          for x in range(100):
                      
                      1 Reply Last reply Reply Quote 0
                      • stephen
                        stephen last edited by

                        @JonB @mikael @cvp @njm turned out he ui.Image calls inside Texture combined with two corrupted images was the problem. when i removed the ui.Image calls i still crashed but with no stack report at all then i somehow came across two png files the were 101b in size instead of the 1.1MB lol no more crashes. thanks for all the help everyone!

                        cvp 1 Reply Last reply Reply Quote 0
                        • cvp
                          cvp @stephen last edited by

                          @stephen πŸ‘

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