[sugar] Using Git / downloading activities and Memory problems

Yeong Haur Kok yeonghaur
Fri Jun 22 17:22:43 EDT 2007


Hi Ivan,

> are preloading an array of 26 images ~32K each and this crashes on the
> olpc.

Please provide more details. Memory allocation shouldn't *crash* the
machine under any (reasonable set of) circumstances; the OOM killer
might kick in and destroy a few processes, however. In your case, you're
allocating less than a meg, so something is certainly wrong if it's
crashing. What kind of crash are you getting? Can you post the code and
the images somewhere where we can test this?
The program runs when images are scaled to 600 x 250 (using the gtk
scale_simple function) or smaller. When we try to scale up to larger
dimensions - e.g. 800 x 400 - it crashes. The application simply exits on it
own.

I tried replacing the images (to be loaded into the array) with smaller size
(~19k) black and white images and the program runs alright. But when these
are replaced with color images of similar size, the same problem occurs.

Here's the relevant part of code, KEY_X and KEY_Y are the image dimensions
we're trying to scale up (default 600 x 250):


        self.dict_pixbuf = {}
        alphastring = "abcdefghijklmnopqrstuvwxyz"

        for i in range(len(alphastring)):
            letter = alphastring[i]
            self.dict_pixbuf[letter] =
gtk.gdk.pixbuf_new_from_file(IMAGE_SOURCE
+ os.sep + "keypress" + os.sep + letter.upper() +
".gif").scale_simple(KEY_X, KEY_Y, gtk.gdk.INTERP_BILINEAR)

Any suggestions would be appreciated! Thanks!


yh

On 6/22/07, Ivan Krsti? <krstic at solarsail.hcs.harvard.edu> wrote:
>
> Hi Aneto,
>
> Aneto Okonkwo wrote:
> > I have been having difficulty installing git on windows.  Does anyone
> > have any instructions I can use to download and set it up?
>
> Git still relies on a mudball of shell and Perl scripts, so getting it
> running under Windows proper is an uphill battle. The recommended way to
> do it is to first set up Cygwin, which might be more trouble than you're
> willing to go through. Even then, it'll run quite slowly because of
> certain FS ops being substantially slower on Windows than on Linux.
>
> > Alternatively is there anyway to use git on the olpc itself, does anyone
> > have those instructions?
>
> As root, 'yum install git-core' should do it.
>
> > are preloading an array of 26 images ~32K each and this crashes on the
> > olpc.
>
> Please provide more details. Memory allocation shouldn't *crash* the
> machine under any (reasonable set of) circumstances; the OOM killer
> might kick in and destroy a few processes, however. In your case, you're
> allocating less than a meg, so something is certainly wrong if it's
> crashing. What kind of crash are you getting? Can you post the code and
> the images somewhere where we can test this?
>
> --
> Ivan Krsti? <krstic at solarsail.hcs.harvard.edu> | GPG: 0x147C722D
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/sugar/attachments/20070622/3d964371/attachment.htm 



More information about the Sugar-devel mailing list