dmurday
Posts: 14
Joined: Sat Aug 25, 2012 10:35 am

Scratch Bug

Sat Aug 25, 2012 10:43 am

My son has run into a problem with the background images on Scratch which only seems to be apparent on the raspberry pi. We are running the Raspbian distro which has scratch preinstalled.
Curiously only some of the included background images can be imported; many of them just produce a blank background screen. I cant see any reason for this - the images open in image viewer just fine and there doesn't seem to be any relation to the size of the file.

I wonder if anyone else has notice this behaviour. In a way this isn't that important but if Scratch is supposed to be a means of encouraging programming skills in children it needs to work as not being able to use the background you have chosen is a big thing for a child (as I have found out!). None of these problems are present on Scratch running on Mac OS, Windows or Ubuntu.

Can anyone reproduce this problem or does anyone have an explanation or solution?

lightnin
Posts: 10
Joined: Wed Jun 20, 2012 11:57 am

Re: Scratch Bug

Fri Aug 31, 2012 8:48 pm

Interesting issue! Can you mention some of the backgrounds that don't load properly? We have a pi here at Scratch headquarters. If you give us step to reproduce, we'll take a look.

(It seems likely that it's a general rPi / X display issue of some sort, since the current version of Scratch has been released for over 3 years, and no one has reported the problem on other platforms.)

dmurday
Posts: 14
Joined: Sat Aug 25, 2012 10:35 am

Re: Scratch Bug

Sun Sep 09, 2012 11:33 am

Lightnin, thanks for the reply and sorry for the delay in getting back to you. There are several backgrounds that we can't get to load on the pi. So for example included backgrounds in the outdoors directory that don't work include atomplayground, brickwall1, pool and brickwall-and-stairs. In the indoors folder bedroom1 does load.

Would be interested if you can reproduce this error. We are using the standard Raspbian (wheezy) distro with nothing tweaked.

Thanks for your help.

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Scratch Bug

Mon Sep 10, 2012 6:54 am

@lightin
Quick experiment - no .jpg background that I've tried to import works but .gif ones work OK

So , took the a brickwall jpg and re-saved it as .png in /home/pi and that imported fine

Using Raspbian

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

dmurday
Posts: 14
Joined: Sat Aug 25, 2012 10:35 am

Re: Scratch Bug

Mon Sep 10, 2012 1:46 pm

Thanks for that simplesi!

I had looked at all manner of possible differences between the files that worked and the ones that were blank but hadn't noticed that it was always the jpg which fail to load!

I agree I cant get any jpg backgrounds to load. So the only question now left is why?

This seems like a little thing but to children (and certainly this was a big problem which put him off his Raspberry Pi for a few days!)

Justin72
Posts: 11
Joined: Tue Aug 14, 2012 6:49 am

Re: Scratch Bug

Thu Sep 13, 2012 2:26 pm

I have the same problem. I can't find any image files in my Scratch directory, where are they stored?

Did you just rename them to .png or did you do some fancy conversion?

Thanks
Justin

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Scratch Bug

Thu Sep 13, 2012 4:21 pm

Ccratch lives in /usr/share/scratch
The backgrounds are in folders within /usr/share/scratch/Media/Backgrounds

You can use the Image Viewer program in Accessories to view and save the files as .png but you'll have to save them somewhere else as you need to be root to save into the folder they are held in.

I don't think its really worth the effort as I'm sure its just a little bug somewhere that'll be fixed shortly.

In the meantime - just make your own backgrounds up :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

lightnin
Posts: 10
Joined: Wed Jun 20, 2012 11:57 am

Re: Scratch Bug

Fri Sep 21, 2012 8:01 pm

dmurday wrote:Lightnin, thanks for the reply and sorry for the delay in getting back to you. There are several backgrounds that we can't get to load on the pi. So for example included backgrounds in the outdoors directory that don't work include atomplayground, brickwall1, pool and brickwall-and-stairs. In the indoors folder bedroom1 does load.

Would be interested if you can reproduce this error. We are using the standard Raspbian (wheezy) distro with nothing tweaked.

Thanks for your help.
Thanks for the info! I can confirm that importing of .jpg background works fine on a i686 machine running Ubuntu, standard debian package. This means that the problem is most likely due to an issue with the Squeak-vm running on arm (I'd guess that there is a .jpg decode plugin that Scratch depends on).

The best thing to do would be to file this as a bug against Scratch in debian, and mention that it may be associated with the squeakVM running on rPi.

http://www.debian.org/Bugs/Reporting

That would be a good practice for all other bugs you find in Scratch.

johnm
Posts: 2
Joined: Sat Aug 25, 2012 1:17 am

Re: Scratch Bug

Fri Sep 21, 2012 9:48 pm

The JPEG plugin is compiled into the Squeak VM. I've verified plugin is available, but it (silently) fails to decode the JPEG image data. I tested a number standard Scratch JPEG backgrounds and it did not decode any of them, so I don't think this a case of a bad or corrupted JPEG file.

It's a good theory that the JPEG library is failing on ARM. Hopefully one of the Squeak VM maintainers can look into this.

-- John

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Scratch Bug

Sat Sep 22, 2012 7:26 am

@johnm - I found this
http://packages.debian.org/wheezy/armhf ... m/filelist
but seen no jpg plugin (I'm completely winging this BTW as I barely understand the words being used! :) )

Could you us a reference to where you think the problem lays :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

ked
Posts: 42
Joined: Thu Aug 04, 2011 9:18 am

Re: Scratch Bug

Sat Sep 22, 2012 6:49 pm

It's an internal plugin (compiled into the VM) and consists of 61 source files. It will take volunteers time to track down the problem running on the ARM.

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Scratch Bug

Sat Sep 22, 2012 7:55 pm

@ked - Could you give us a pointer to these 61 files
regards
Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

ked
Posts: 42
Joined: Thu Aug 04, 2011 9:18 am

Re: Scratch Bug

Sat Sep 22, 2012 9:37 pm

The files are distributed in the Debian source package from here (edit: missing link, you'll need orig src + debian patches):

http://ftp.de.debian.org/debian/pool/ma ... rig.tar.gz
http://ftp.de.debian.org/debian/pool/ma ... ian.tar.gz

...or the latest from here: http://squeakvm.org/unix/

Unpack and the jpg plugin is in this directory:

Squeak-4.10.2.2593-src/Cross/plugins/JPEGReadWriter2Plugin

Good bug hunting!

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Scratch Bug

Sun Sep 23, 2012 11:45 am

@ked
I've downloaded both but still can't find what you are talking about - which download has the plugin? :confused:

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Scratch Bug

Sun Sep 23, 2012 11:53 am

OK found it :)
[quote]squeak-vm-4.4.7.2357.orig\Cross\plugins\JPEGReadWriter2Plugin/quote]

Now this is where I need to start to learn the whys and what of what happens with Linux.

Why would this code not work in an arm compile but works on a Ubuntu compile?

What do I need to install (On what - RPi or Ubuntu machine ????) to be able to alter the code and see it make a difference?

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

ked
Posts: 42
Joined: Thu Aug 04, 2011 9:18 am

Re: Scratch Bug

Sun Sep 23, 2012 10:04 pm

Why would this code not work in an arm compile but works on a Ubuntu compile?
Million dollar question, if we knew that we'd fix it :) I spent some time this morning looking into it and will pass my findings on to someone that might be familiar with that particular plugin.

I'm happy to walk you through getting things set up to help track down bugs. I think you would benefit from getting under the hood of Scratch. It's late so it'll have to be tomorrow. In the mean time...
Now this is where I need to start to learn the whys and what of what happens with Linux.
Best to pick it up as you go along. Knowing the "man" and "info" utils is a must so you can access the help available on the machine itself. Open a terminal, try "man man" and "info info". "apropos <keyword>" is also useful (equivalents: man/info -k <keyword>). Lots more info on the web.
What do I need to install (On what - RPi or Ubuntu machine ????) to be able to alter the code and see it make a difference?
Avoid another level of complication for now and do what you need to on the RPi itself. You want "cmake", at least, to compile the SqueakVM (sudo apt-get install cmake). It's also useful to have the Scratch "source" installation so you can get behind Scratch to the Squeak desktop and put break points in code leading up to where the problem occurs. More details tomorrow if you're still interested.

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Scratch Bug

Sun Sep 23, 2012 10:48 pm

Certainly interested - been using Linux for 15 years but never tried to work at the package compile level :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

ked
Posts: 42
Joined: Thu Aug 04, 2011 9:18 am

Re: Scratch Bug

Wed Sep 26, 2012 7:39 am

Excuse delay, been busy and still need to finish a detailed reply.

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Scratch Bug

Wed Sep 26, 2012 11:50 am

No problem - any help at any time is appreciated - even if one day the gods themselves provide us with a soultion ;)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

proxima
Posts: 30
Joined: Tue Sep 18, 2012 3:16 pm

Re: Scratch Bug

Fri Sep 28, 2012 12:00 pm

Likewise - now I've got my head around the fact that a lot of this is volunteer effort, I'm happy to help, time permitting. I've been using Linux and Open Source stuff in general for a long time, but have never got involved on the 'contributor' side as yet. But if you're offering a bit of a helping hand to get up to speed, I can volunteer to try to help.

I'm a C/C++ programmer by trade, but I have no 'under the hood' knowledge of Scratch or the VM it runs on under Pi.

Tom

nglbrkr
Posts: 15
Joined: Fri Jul 26, 2013 1:39 pm

Re: Scratch Bug

Mon Nov 11, 2013 1:07 am

I know this thread is more than a year old, but I can confirm that it isn't an Arm problem. We are having the same issue on Debian-Edu Wheezy i686.

timrowledge
Posts: 1270
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Scratch Bug

Mon Nov 11, 2013 6:45 pm

Have you had a chance to test this on the very latest scratch pi system? We just fixed a bug that was messing up loading some images, though it was in a rather different section of the code. It's faintly possible that recent jpeglibs are now compiled in and working ok.

If it still fails, please try to tell us which file(s) are causing problems and I'll add it to the list of bugs to fix.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

ghp
Posts: 1391
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: Scratch Bug still existing in current release

Fri Nov 15, 2013 7:25 pm

Hello everybody, hello Tim,

today my school kids ran into this problem.
The release is 2013-09-25-wheezy-raspbian, with apt-get upgrade to current software.
The 'scratch bananas problem' is solved in this release.

The problem show like:
- in scratch, in the 'objects view', open the sprite dialog. Choose 'usr/share/scratch/Media/Backgrounds/Indoors/ and 'room3'. The preview is fine. Select this object and doubleclick (or load otherwise).
- you get a sprite loaded, looking 'transparent'. You can't make it visible.

Same for 'room1', 'party-room', 'room2', 'hall', 'chalkboard'.
As stated earlier, the gif files work, but not the jpg.

Greetings
Gerhard

shanester
Posts: 15
Joined: Tue Sep 10, 2013 8:03 pm

Re: Scratch Bug

Sat Nov 16, 2013 10:25 am

I just set up via NOOBS and this isn't fixed. Anything on the horizon?

Shane

timrowledge
Posts: 1270
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Scratch Bug

Sat Nov 16, 2013 5:42 pm

I'm away from home right now and so can't delve into this yet. It appears likely to be a library issue which may mean having to persuade some other group to make changes, or perhaps include some patching process in the build.

Hard to know yet.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

Return to “Scratch”