Scratch "Bad Header" Issue


12 posts
by HiggleBottom » Fri Sep 21, 2012 11:16 am
Hi.
I am trying to make a Scratch project, which I started on my home computer. I then edited the file on my RPi, saved it, exited out of X, and unplugged my pi. I then took my flash drive out of the Powered USB hub, plugged it into my computer, opened the file in Scratch and it came up with this error:
Code: Select all
Could not read project; file may be damaged: (Bad Header)

It took me ages to make this project and am really dissapointed. Any help would be appreciated.
Thanks!
P.S. The file comes up with 0KB when I look at it on my Windows Machine!
Posts: 21
Joined: Sun Apr 22, 2012 7:09 pm
by ked » Fri Sep 21, 2012 12:32 pm
PM'ed you

Edit: Just noticed your PS. Have you tried copying it again?
Posts: 40
Joined: Thu Aug 04, 2011 9:18 am
by lightnin » Fri Sep 21, 2012 7:54 pm
This happens on many other systems as well when the storage media isn't unmounted properly - basically the file gets corrupted (as other files may as well). There's no known fix, I'm afraid. :(
Posts: 10
Joined: Wed Jun 20, 2012 11:57 am
by HiggleBottom » Fri Sep 21, 2012 9:52 pm
ked wrote:PM'ed you

Edit: Just noticed your PS. Have you tried copying it again?


What do you mean copy it again? Like copy and paste?
Posts: 21
Joined: Sun Apr 22, 2012 7:09 pm
by ked » Fri Sep 21, 2012 10:53 pm
Does the RPi still boot from the card? Is so, can you see the file on the RPi in a terminal/file-manager and is the size still zero? If not zero then try opening it in Scratch.
Posts: 40
Joined: Thu Aug 04, 2011 9:18 am
by Bibbleycheese » Fri Dec 21, 2012 8:11 am
I have a similar problem.
Working Scratch files which I have uploaded to the Scratch website, then download to the R-Pi via Midori.
When I try to open the downloaded .sb file in Scratch, Scratch gives an error box;
Could not read project; file may be damaged: (bad header)
Where should I start looking to work out what is going on here?
User avatar
Posts: 1
Joined: Fri Dec 21, 2012 8:01 am
Location: Crowborough, East Sussex
by simplesi » Sun Dec 23, 2012 11:31 am
Cab you post a link to your projects so we can try them out please?

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 2041
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by bpalfreyman » Sat Feb 09, 2013 7:44 pm
Hi,

I'm having the same problem too as I made a big project on Scratch (20+ sprites, even more scripts and complicated variables) and I lost it this way after I unplugged the Raspberry PI and then booted it up again (very annoying). I believe it may be down to file size and complexity as I have tested with smaller, simple projects and I can still run those on Scratch without any errors and I have also tested at various stages of trying to build the project again - at the simpler stages the project still runs when I unplug the Pi and then reboot. Maybe the Pi just isn't powerful enough to handle those big projects on Scratch?
Posts: 2
Joined: Sun Dec 30, 2012 3:15 pm
by simplesi » Sat Feb 09, 2013 10:46 pm
AFIK Its to do with the file system.

This is what I've been told by Linux gurus.

The file system on an RPi DOESN'T actually save a file when you asks it to - it just remembers that you asked it to and it decides that it will actually save it when you carefully shutdown.

The problem is that there is no nice shutdown menu option or desktop short cut and so everyone just unplugs their RPi and you end up with a corrupted filesystem

Most of the time, the corruptions are not important and are ignored/dealt with but Scratch files seem to take a big hit :(

So there best way (until the Raspian/LXDE overlords give us a nice menu option) is to create a shortcut that runs a sudo halt command and stick it on the desktop

regards
Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 2041
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by simplesi » Sun Feb 10, 2013 2:17 pm
Oops :(
:embarrasing:

Just noticed that the logout button at bottom right has shutdown and reboot optionse when you click on it!

Wonder how long that's been there :)

So - no excuse for us all now :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 2041
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by lordcreeper » Sun Apr 21, 2013 2:27 pm
I am having the same problem with scratch
Posts: 1
Joined: Sun Apr 21, 2013 2:00 pm
by simplesi » Sun Apr 21, 2013 6:25 pm
Just make sure you shutdown or reboot properly using the button at bottom right and your problems should go away :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 2041
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK