Opened 12 years ago

Closed 11 years ago

#3291 closed defect (fixed)

Posible Memory leak

Reported by: roman65536 Owned by: walter
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Turtleart Version: Unspecified
Severity: Major Keywords:
Cc: Distribution/OS: OLPC
Bug Status: Unconfirmed

Description

Hi,
My Kids are using Turtle Art frequently, it is a cool Activity.
Few weeks a go, I upgraded there XO-1 including Turtle Art to 130.

How ever, after while when there are working with it, the whole XO freezes. Top showed over 90MB resident memory. Since my self, I'm python greenhorn, I'm not able to track it down.

here the "top" output right after start :
# top -b -n 1 | grep Turtle

3702 romanp 20 0 129m 54m 14m S 0 2.7 0:01.21 Turtle Art <851

After putting a simple prg. basically doing for(a=0;a<5000;a++);
#top -b -n 1 | grep Turtle

3702 romanp 20 0 162m 87m 14m S 0 4.4 0:10.06 Turtle Art <851

After running it the 1. time (clicking run)
#top -b -n 1 | grep Turtle

3702 romanp 20 0 165m 90m 14m R 97 4.5 0:22.09 Turtle Art <851

After running it the 2. time (clicking run again)
#top -b -n 1 | grep Turtle

3702 romanp 20 0 169m 94m 14m S 0 4.7 0:35.90 Turtle Art <851

After staying Turtle as it was after the point before for about 10-15 min. doing nothing.
#top -b -n 1 | grep Turtle

3702 romanp 20 0 172m 97m 15m S 0 4.9 0:39.72 Turtle Art <851

Regards
roman

Attachments (2)

Turtle.png (76.3 KB) - added by roman65536 12 years ago.
Turtle Art program (sorry for the screenshot)
data (1021 bytes) - added by roman65536 12 years ago.
source code

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by roman65536

Turtle Art program (sorry for the screenshot)

Changed 12 years ago by roman65536

source code

comment:1 Changed 12 years ago by walter

Sorry to take so long getting to this. I think I have further isolated the problem, but haven't identified the specific leak yet:

If you execute the code with the blocks hidden, there does not seem to be any memory leak;
If you execute the code with the blocks shown (in which case, they are individually highlighted as the code executes), then the memory usage as seen in top slowly increases. Will keep looking.

comment:2 Changed 12 years ago by walter

Re above, I was testing with v147.

comment:3 Changed 11 years ago by walter

I think I may have finally found the problem: a memory leak in how I was using pango layout when I switched to cairo. [1] seems to fix the problem. Will be doing some more testing, but this patch will land in v169.

[1] http://git.sugarlabs.org/turtleart/mainline/commit/c3b81450372cff7b7bd5649ea4f2cbfe0df70c7f

comment:4 Changed 11 years ago by walter

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.