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
-
@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###############
-
Try commenting out the self.Animate. I wonder if the repeat forever could be a problem, say if there was a memory leak somewhere.
-
@JonB Good Idea!
-
@JonB i cannot seem to find FaultHandler
-
@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.. -
-
@cvp ... guess who looked right at it earlier and didmt see it... ππΌπ€¦π»ββοΈ
-
@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?
-
@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):
-
@JonB @mikael @cvp @njm turned out he
ui.Image
calls insideTexture
combined with two corrupted images was the problem. when i removed theui.Image
calls i still crashed but with no stack report at all then i somehow came across twopng
files the were101b
in size instead of the1.1MB
lol no more crashes. thanks for all the help everyone! -
@stephen π