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

Re: Scratch Bug

Tue Dec 03, 2013 8:34 pm

I've just had a moment to take a look at this; and on my Pi there is no problem. I just love bugs like this...

I'll dig out a spare PI, stick the latest NOOBS on it and see if that makes any difference.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

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

Re: Scratch Bug

Tue Dec 03, 2013 8:59 pm

Hello,

on my Pi, I run raspbian and ugraded a few minutes ago (update + upgrade). The jpg-Background still not loading, e,g, room3.
I had seen some updates on jpeg libraries, so I retried this feature.

Greetings,

Gerhard

asb
Forum Moderator
Forum Moderator
Posts: 853
Joined: Fri Sep 16, 2011 7:16 pm
Contact: Website

Re: Scratch Bug

Wed Dec 18, 2013 12:38 am

Me and Tim discussed this, and I've found a fix. The issue is due to the Debian package inheriting a patch from the original Debian packager making it link against the system libjpeg (rather than the rather ancient libjpeg bundled in the squeak-vm sources). For some reason, it seems squeak-vm isn't happy working with the newer libjpeg, so I've removed that patch and it all seems well. I'll post here when the updated squeak-vm is added to the repository, which should be tomorrow.

asb
Forum Moderator
Forum Moderator
Posts: 853
Joined: Fri Sep 16, 2011 7:16 pm
Contact: Website

Re: Scratch Bug

Wed Dec 18, 2013 3:20 pm

It's now in the repo, so if you're using one of our Raspbian images just do:

Code: Select all

sudo apt-get update && sudo apt-get install squeak-vm

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

Re: Scratch Bug

Wed Dec 18, 2013 3:35 pm

Hello,

it works. 'room 3' loads into scratch. Thank you !

Greetings,
Gerhard

typhoont
Posts: 2
Joined: Tue Jan 28, 2014 9:54 pm

Re: Scratch Bug

Tue Jan 28, 2014 10:09 pm

I wish to report that I am experiencing the same problem with Background images. I downloaded NOOBS v1.3.0 Built Sep 27 2013. I am running Scratch 1.4 of 2013-09-16 having selected "Raspbian boot to Scratch".
Is there a new version of NOOBS which contains the VM fix, or should I reboot back to Raspbian and apply the fix to Scratch from there? Will this new version of Scratch be selected if I then select "Raspbian boot to Scratch" option from the NOOBS menu again?
Thanks, typhoont

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

Re: Scratch Bug

Tue Jan 28, 2014 10:40 pm

a
sudo apt-get update && apt-get upgrade

will bring your system up to speed

the fix didn't get fixed till mid-Dec 2013

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

typhoont
Posts: 2
Joined: Tue Jan 28, 2014 9:54 pm

Re: Scratch Bug

Wed Jan 29, 2014 10:48 am

Thank you for your prompt reply last night Simon. I rebooted to Raspbian and performed the Upgrade as you recomended. Using Startx and running Scratch from the desktop I was able to confirm that the Background images are now accessible. However, I then reset the Noobs option to "Raspbian boot to Scratch", and the problem is still there. There is no LXTerminal facility in this direct boot version of Scratch, so I assume that a different Upgrade Strategy is required to apply fixes to the copy of Raspbian which supports this Scratch., otherwise you would need to issue a new Noobs version for each fix.

asb
Forum Moderator
Forum Moderator
Posts: 853
Joined: Fri Sep 16, 2011 7:16 pm
Contact: Website

Re: Scratch Bug

Tue Feb 04, 2014 9:19 pm

Hi, the 'boot to scratch' installation is separate from your standalone Raspbian installation. You can get a normal terminal if you do ctrl+alt+f2. Then log in with pi/raspberry, sudo apt-get update && sudo apt-get upgrade. Hope that helps.

ajxn
Posts: 4
Joined: Sat Jul 07, 2012 12:53 am

Re: Scratch Bug

Tue Mar 22, 2016 12:55 am

Have looked into this libjpeg problem.
It looks like squeak-vm own version of libjpeg are there to avoid it to exit() the program.

Get source

Code: Select all

$ aptitude update; aptitude upgrade
$ aptitude install build-essential  # To be able to compile programs
$ apt-get source squeak-vm          # Download source.
$ sudo apt-get build-dep squeak-vm  # Install dependencies.
$ cd squeak-vm-*

Code: Select all

$ cd Cross/plugins/JPEGReadWriter2Plugin/
$ cat Cross/plugins/JPEGReadWriter2Plugin/{JPEGReadWriter2Plugin.h,Error.c}
Redefine struct error_mgr2, method error_exit() and jpeg_mem_src_newLocationOfData()
That error_exit() are define in Error.c to not call exit(EXIT_FAILURE); as it does in jerror.c.
Function error_exit() is also declared in jerror.h.

Code: Select all

$ cat Cross/plugins/JPEGReadWriter2Plugins/{jmemdatasrc.c,jmemdatadst.c}
In jmemdatasrc.c function jpeg_mem_src() is removed by a #if 0
The function jpeg_mem_src_newLocationOfData() is created there too.
In jmemdatadst.c function jpeg_mem_dest() are also removed with a #if 0

In unix/doc/HowToBuildFromSource.pdf could it be interesting building instructions.
In unix/src/vm/intplugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c is jpeg_mem_src_newLocationOfData() used. That file is auto generated...
JPEGReadWriter2Plugin are mentioned in unix/src/plugins.int, unix/src/vm/sqNamedPrims.h and debian/rules

What has to be done to not use the old libjpeg compiled by squeak-vm, is by someone who knows how libjpeg handle errors without calling error_exit() with exit(EXIT_FAILURE).

Also have a look in the plugin JPEGReadWriter2Plugin how jpeg_mem_src_newLocationOfData() should be handled in unix/src/vm/intplugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c

If you want to build a package, try:

Code: Select all

$ fakeroot debian/rules binary
This is all I managed to do this evening. Good night.

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

Re: Scratch Bug

Wed Mar 23, 2016 7:54 pm

Thanks for looking at this. We'll see what the general opinion in the vm-dev team is about changing this.

In general I'd advise against using anything fro the general debian repository relating to Squeak since it is quite seriously out of date (to the best of my knowledge) and they have a nasty habit of altering the source in ways that just plain break it. The best way to get the vm source is via

Code: Select all

svn co http://www.squeakvm.org/svn/squeak/branches/Cog
and then read the various HowToBuild files.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

ajxn
Posts: 4
Joined: Sat Jul 07, 2012 12:53 am

Re: Scratch Bug

Sun Mar 27, 2016 5:45 am

Well, the thing to do is to report errors and with enough information to explain the bugs..
But most useful are patches added to the information. It is the Debian maintainer that should give this to the upstage, Scratch in this case.

That list was my contribution for someone to look into, to see if I are right. Then it should be sent to Debian upstream. The latest was a patch that added the new Jpeg library, instead of the one that is compiled especially for Scratch. So a fast patch would be to remove the latest patch to Debian Scratch package.

Return to “Scratch”