User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Scratch 2 - segmentation fault

Thu Jul 06, 2017 1:54 pm

An electronics student intends to use Scratch 2 on an A+ for a project. Having installed 2017-07-05 (current latest) Rasbian with them, clicking the menu item for Scratch 2 and the hourglass mouse pointer appears for a short while and then goes away and nothing else happens.

Typing the command scratch2 into terminal gives the error "segmentation fault" as does sudo scratch2.
Any troubleshooting ideas?

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Scratch 2 - segmentation fault

Thu Jul 06, 2017 2:02 pm

...interestingly, putting the same SD card into a raspberry pi 2 and it works fine. I didn't notice a hardware req in the blog post? (but then I do have a tendency to scan read things)
Not sure if the pi2 will fit in the case they have made... if it does I will just give it to them.

mavster1973
Posts: 1
Joined: Fri Jul 07, 2017 8:27 am

Re: Scratch 2 - segmentation fault

Fri Jul 07, 2017 8:32 am

I've got a similar problem with my PiZeroW. Just upgraded using the usual apt-get upgrade/update & then installed scratch 2. When I rebooted the Pi and subsequently tried to run Scratch 2 then it gets a segmentation fault. I have tried re-installing scratch 2 but it doesn't make any difference.

Just downloading the lastest NOOB installation which includes Scratch 2 I believe. I will see if that solves the problem.

picsail
Posts: 1
Joined: Sat Jul 29, 2017 9:02 pm

Re: Scratch 2 - segmentation fault

Sat Jul 29, 2017 9:21 pm

Same here - Pi B+ / newly installed Raspbian/Jessie

I reinstalled using scatch2 and it now now gives illegal instruction instead. I guess I'll be starting the kid off with Scratch1.4 as my attempts to steer him away from a life of IT seem to be failing miserably...

Code: Select all

root@sam-matt-pi:~# apt-get --reinstall install scratch2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 29 not upgraded.
Need to get 66.6 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian/ jessie/main scratch2 armhf 0.9 [66.6 MB]
[...]
Any other clue gratefully accepted :idea:

pggp
Posts: 4
Joined: Sat Aug 19, 2017 6:13 pm

Re: Scratch 2 - segmentation fault

Sun Aug 20, 2017 7:42 am

I'm using RPi Zero W. Maybe Electron (contained by Scratch 2 package) was built only for RPi 3?

pggp
Posts: 4
Joined: Sat Aug 19, 2017 6:13 pm

Re: Scratch 2 - segmentation fault

Sun Aug 20, 2017 8:14 am

Another way...

The latest version already supports remote GPIO:

Code: Select all

scratch2 (0.13) jessie; urgency=medium
  * Remote GPIO extension added
 -- Simon Long <simon@raspberrypi.org>  Wed, 07 Jun 2017 10:28:40 +0100
But I'm not sure, can Scratch 2 run on Debian (Ubuntu) PC with RPi extension...

pggp
Posts: 4
Joined: Sat Aug 19, 2017 6:13 pm

Re: Scratch 2 - segmentation fault

Mon Aug 21, 2017 5:29 pm

pggp wrote:
Sun Aug 20, 2017 7:42 am
I'm using RPi Zero W. Maybe Electron (contained by Scratch 2 package) was built only for RPi 3?
Yes. :(

See the announcement:
https://www.raspberrypi.org/blog/a-rasp ... ing-tools/
This first release works well, although it can be slow for some operations; this is largely unavoidable for Flash code running under Electron. Bear in mind that you will need to have the Pepper Flash plugin installed (which it is by default on standard Raspbian images). As Pepper Flash is only compatible with the processor in the Pi 2.0 and Pi 3, it is unfortunately not possible to run Scratch 2.0 on the Pi Zero or the original models of the Pi.

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

Re: Scratch 2 - segmentation fault

Tue Aug 22, 2017 2:02 am

Just run the still-included Scratch 1.4, eh? It's faster, cleaner, uses less memory, includes a decent gpio server and best of all, has nothing to do with Flash.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

NoMod_Programming
Posts: 8
Joined: Mon Nov 02, 2015 8:16 pm

Re: Scratch 2 - segmentation fault

Wed Nov 08, 2017 4:01 am

Scratch 2.0, at the moment, does not support ARMv6 processors, which may lead to the problem you are experiencing. In a terminal, type "scratch2". Does it say "Segmentation Fault"? If so, your hardware is incompatible, and you will not be able to run the official Scratch 2.0 editor. However, there is a project I've been working on called Whiskers that aims to allow it to run on older raspberry pi versions without flash. In a terminal, just paste the following command:

Code: Select all

curl -sLS https://github.com/NoMod-Programming/Whiskers/raw/master/raspi-install.sh | sudo bash
An icon will appear called "Whiskers" on your desktop. You can then run that to use Scratch 2.0 features, and save/open scratch 2.0 files. The Scratch forums topic for this is located here: https://scratch.mit.edu/discuss/topic/168060/

Return to “Scratch”

Who is online

Users browsing this forum: No registered users and 1 guest