Chief1981
Posts: 2
Joined: Sun Sep 08, 2019 8:20 pm

Raspberry Pi 4 and Scratch 2

Sun Sep 08, 2019 8:31 pm

Hi

I have a new raspberry pi 4 for my son. When we click on the upload background button in Scratch 2 we get the file manager box pop up but we can’t click on anything. It’s as if the screen has frozen but you can move the mouse pointer around the screen. You can’t even click on the menus at the top to restart the raspberry pi. The only way I can get it to anything is to reboot. I’ve tried uploading a new raspbian image of the most up to date operating system from the raspberry pi website onto a new SD card. But the most up to date OS and Scratch 2 seems to the same thing. Can anyone advise as to what is going on and how I can fix it?

I brought the raspberry pi for my 9year old son to start coding but we are off to a bumpy start!

Thanks.

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

Re: Raspberry Pi 4 and Scratch 2

Mon Sep 09, 2019 7:14 pm

Hello, had similiar problems here. Happens here on pi4, scratch2 both when uploading file for a sprite or stage background 'backdrop'.
Selection menu opens, pi seems to be frozen in the menu.

A ssh-connection to the pi is still working. "top" shows low cpu usage. "killall electron" stops scratch2.

Experimented with key combinations to switch away from scratch2 in this situation. ESC seems to work, terminating the selection menu. In second try, the "open"-method then works. Not a solution, but a workaround. Could you confirm that this works also on your machine ?

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

Re: Raspberry Pi 4 and Scratch 2

Thu Sep 12, 2019 8:43 pm

Just out of interest because I don’t have a pi4 yet, does my ‘original ‘ Scratch run ok? It should but proof is always good.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

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

Re: Raspberry Pi 4 and Scratch 2

Sat Sep 14, 2019 9:25 am


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

Re: Raspberry Pi 4 and Scratch 2

Tue Sep 17, 2019 11:11 pm

:-)
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

Chief1981
Posts: 2
Joined: Sun Sep 08, 2019 8:20 pm

Re: Raspberry Pi 4 and Scratch 2

Thu Sep 19, 2019 11:13 am

timrowledge wrote:
Thu Sep 12, 2019 8:43 pm
Just out of interest because I don’t have a pi4 yet, does my ‘original ‘ Scratch run ok? It should but proof is always good.
Yes the ‘original’ scratch works okay. You can upload backgrounds and sprites from the file manager.

The problem just seems to be with Scratch 2.

Is there anyone I can contact in Raspberry Pi to see if this is a overall Pi 4 problem and if so, would they be able to fix it?

Cheers

scotty101
Posts: 4016
Joined: Fri Jun 08, 2012 6:03 pm

Re: Raspberry Pi 4 and Scratch 2

Thu Sep 19, 2019 11:29 am

This isn't exclusively a Pi 4 issues. I experienced the same thing with a Pi3 at code club last weekend.

I was able to import a background from the background editor rather than via the normal import button. I haven't had a chance to figure out what the issue is however.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

MisterEd
Posts: 137
Joined: Mon Apr 16, 2018 5:28 am
Location: Huntsville, AL USA

Re: Raspberry Pi 4 and Scratch 2

Fri Oct 11, 2019 6:11 pm

scotty101 wrote:
Thu Sep 19, 2019 11:29 am
This isn't exclusively a Pi 4 issues. I experienced the same thing with a Pi3 at code club last weekend.

I was able to import a background from the background editor rather than via the normal import button. I haven't had a chance to figure out what the issue is however.
I figured out what the problem was. See thread "raspberry pi4 freeze while trying to upload astronaut backdrop".

To summarize Scratch 2 cannot handle uploading a backdrop with an empty project. After I created a small Scratch project uploading a backdrop worked fine.

User avatar
Gareth Halfacree
Posts: 127
Joined: Wed May 30, 2012 5:17 pm
Location: Bradford, UK
Contact: Website Twitter

Re: Raspberry Pi 4 and Scratch 2

Wed Oct 30, 2019 4:12 pm

Hi, all. Just had an email through from somebody trying to do the Astronaut Reaction Timer project in the Beginner's Guide and hitting this bug.

The bad news: it's definitely a bug, and right now I don't know when it'll be fixed.

The good news: there's a reasonably simple workaround.

When you attempt to import the background and the file selection window appears, it's only unresponsive to the mouse - the keyboard works fine. Use the Up and Down Arrow keys to highlight the file you need, then hit Enter to import it.

It's not quite as friendly as pointing and clicking, but it'll work for now while the cause of the issue is found and fixed!

spl23
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 403
Joined: Fri Dec 26, 2014 11:02 am

Re: Raspberry Pi 4 and Scratch 2

Thu Oct 31, 2019 9:22 am

I've been looking into this problem this morning.

It turns out it is a problem with recent versions of the Adobe Flash player which is used by Scratch; this gets updated on a monthly basis, and it turns out that the June update broke mouse operations in dialog boxes. I'll report this back to Adobe and hopefully get a fixed version.

In the meantime, the best fix is just to download the older version of Flash and install it.

Download http://archive.raspberrypi.org/debian/p ... _armhf.deb on your Pi - Chromium will warn you that the file may be unsafe, but that's just because it is installable code; it is coming straight from our servers, so is safe.

Open a Terminal window, and go into the directory where you downloaded the file, and type 'sudo dpkg -i rpi-chromium-mods_20190514_armhf.deb' (without the quotes).

Once the file has installed, try Scratch again - it should fix the problem.

Bear in mind that any system updates will install a newer version of the Flash player again, so for the time being keep the downloaded version and reinstall it after any updates.

spl23
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 403
Joined: Fri Dec 26, 2014 11:02 am

Re: Raspberry Pi 4 and Scratch 2

Fri Nov 01, 2019 2:48 pm

OK, ignore the fix above - it seems this is an intermittent problem which just happened to go away when I used the older version of Flash. This is why people suggested it was to do with having an empty project - it's nothing to do with that, but sometimes it just works and other times it doesn't, but it seems to work less often than it fails.

It looks as if it is a known issue in the Electron application used to run Scratch - there are numerous reports online of the same problem from various Electron applications. I'm not sure yet if anyone has actually found a reliable fix - for now, using the keyboard to navigate the dialog is the only reliable solution. We'll continue to investigate and report back if we find a fix.

The other suggestion, of course, is to use Scratch 3 instead of Scratch 2 (on recent Pis - on Pi 0 and Pi 1, you'll have to use Scratch 1).

sirozha
Posts: 101
Joined: Sat Dec 28, 2019 2:44 am

Re: Raspberry Pi 4 and Scratch 2

Sat Dec 28, 2019 9:00 pm

It's December 28, 2019. I did the Astronaut project with my son yesterday, and we hit the same bug with Scratch 2 freezing on Raspberry PI 4 when trying to import the astronaut sprite and the background according to the Raspberry Pi book. I ran

Code: Select all

apt update
and
apt full-upgrade
commands after that, but Scratch 2 froze again after the system was updated.

I have a question about Scratch 3. Supposedly, it's only compatible with Raspberry Pi 4. Is Scratch 3 similar to Scratch 2? Can the same book be used with Scratch 3? How do I install Scratch 3?

Thanks.

MisterEd
Posts: 137
Joined: Mon Apr 16, 2018 5:28 am
Location: Huntsville, AL USA

Re: Raspberry Pi 4 and Scratch 2

Sun Jan 12, 2020 3:24 am

sirozha wrote:
Sat Dec 28, 2019 9:00 pm
It's December 28, 2019. I did the Astronaut project with my son yesterday, and we hit the same bug with Scratch 2 freezing on Raspberry PI 4 when trying to import the astronaut sprite and the background according to the Raspberry Pi book. I ran

Code: Select all

apt update
and
apt full-upgrade
commands after that, but Scratch 2 froze again after the system was updated.

I have a question about Scratch 3. Supposedly, it's only compatible with Raspberry Pi 4. Is Scratch 3 similar to Scratch 2? Can the same book be used with Scratch 3? How do I install Scratch 3?

Thanks.
To get the Scratch 3 desktop version read this:
Scratch 3 Desktop for Raspbian on Raspberry Pi
https://www.raspberrypi.org/blog/scratc ... pberry-pi/

If you want to try the Scratch examples using Scratch 3 get the latest Beginner’s Guide v3. It is updated for Raspberry Pi 4 and the latest software, including Scratch 3.

I just loaded the backdrop Space-background.png and the sprite Astronaut-Tim.png using the Scratch 3 desktop version. No problems.

My first impression of Scratch 3 was that they moved the stage area from the left side to the right side. The programming area on the left area makes more sense to me. This seems more intuitive than the way Scratch 2 did it. Building programs in Scratch is the same on both versions 2 and 3. Like the article above said Scratch 3 requires a more powerful Pi than Scratch 2. A RPi 4 with 2GB RAM is probably the minimum needed.

Return to “Scratch”