[Etoys] etoys image freezing?

polishookm polishookm at mail.montclair.edu
Sun May 11 23:43:48 EDT 2008

>   Ok.  Do you have the correct EtoysV3.sources file, yes?

>> Then I went to FileDirectory startup and changed the following line
>> self setDefaultDirectory: (self dirPathFor: SmalltalkImage current 
>> imageName)
>> to
>> self setDefaultDirectory: '/Users/home'
>> and did Cmd-s (to accept) and entered my initials.
>> Then after then leaving the browser and going back to the desktop and 
>> opening a workspace, I've found several times that Squeak is frozen.
>   - Is it really after you save the image and relaunch it? 

It's after I leave the code browser and return to the Squeak desktop. 
After (on OS X) doing a force quit and then relaunching, the image 
starts (is fine) but freezes after a few doits in a workspace.

>  FileDirectory
>     class>>startUp won't have any effect until you manually execute it
>     or restart the image.
>   - Do you have write permission to the directory?

> And the biggest question is:
>   - *Why* do you want to change the default directory in that way, not
>      just copying the .image and .changes file to the directory?

It never occurred to me to do what you suggest (thanks for mentioning 
that). But the reason for changing the defafult is on my OS X laptop, I 
usually have Squeak in the Applications directory and I'm often loading 
project files (from a class I've been teaching) that have been saved to 
a folder on my desktop (/Users/home/Desktop).

Actually, that directory has been changed from some time now with now 
ill effects - it hasn't been until my recent experiments with sound that 
the freezes I'm noticing started. From tests I'll describe below, my 
impression is that the directory issue has nothing to do with the freeze.

>   Let us solve one problem at a time.  So please explain the reasoning
> behind of the change first place.  Without chainging the #startUp
> method but just open a workspace, does your image freeze?
To test, I just now opened made a fresh directory from the etoys-dev.zip 
folder. I copied a Squeakland.app into that folder. I dropped 
etoys-dev.image onto Squeakland app. I loaded the 101 code updates. I 
brought a sound file into the SoundLibrary. I pressed the save image 
button on the desktop. Then I ran the (sound) code from my previous 
email (a few lines at a time). Squeak froze after about 10 doits or so.

Next, I force quit from Squeak. I started again (dropped etoys-dev.image 
onto Squeakland.app). Squeak opened (a little slowly, but it did open). 
The SoundLibraryMorph was still on the desktop. I deleted the sound I 
had previously loaded and then pressed the save image button. I went 
through the same experiments, but this time using the camera sound from 
the SoundLibrary. After about 15 or so doits, Squeak froze.

Next, I force quit, again, from Squeak. I started again (dropped 
etoys-dev.image onto Squeakland.app). This time I only ran the code

SampledSound playSoundNamed: 'camera'

s := (SampledSound soundNamed:  'camera').
s play.

snd := SampledSound fromAIFFfileNamed: '/Users/polishookm/Desktop/fox.aiff'.
snd play.

r := RepeatingSound repeat: s count: 2.
r play

s := (SampledSound soundNamed:  'camera').
s samples

which which I've been working and I didn't press the save image button. 
Squeak froze after 10 doits or so.

I force quit from Squeak, started again, and added this code

Transcript open.
Transcript show: 'hello'; cr.
Transcript clear.

The Transcript code was fine (no matter how many times I ran it). But 
returning to the code that deals with sound caused Squeak to freeze yet 
again. So having gone through to this point, I would say the freeze 
seems to be happening when working with code to play sound files. That's 
also consistent with my experience in that I wasn't experiencing freezes 
until I began to play with the sound code above. (Which was just a day 
or so ago).

>   Accepting a workspace has an obscure effect but you usually don't
> have to care it at all.

Thanks. I understand now that there's probably now reason to accept code 
in a workspace. (A question is why is that option there? .... accept (s)
>> But I also found too that without the "copy/paste from an external file 
>> series of steps" that changing (in a workspace) this line
>> SampledSound playSoundNamed: 'this'
>> to this line
>> SampledSound playSoundNamed: 'fox'
>> is freezing Squeak.
>   Did you actually evaluate these expressions to play the sound? 


>  What
> is your VM and what is your platform?  

Squeakland.app from squeakland.org on OS X (10.5.2)

> Does your system have the
> proper sound system 
As far as I know.  I have no problem running things like SuperCollider, 
Pd, etc.

> and Squeak VM is using a right driver? 
As far as I know. I haven't specified anything to Squeak (or OS X) about 
drivers. I'm just using, as best as I know, whatever the defaults are.

>  At some
> old time, Unix VM did freeze the image when trying to play a sound and
> when the sound driver wasn't available.

Perhaps I'm experiencing this  now in OS X? How do I know if the driver 
is available or not? (Shouldn't it just be present and working?)
>> and started again (and then again) with fresh files to which I added 
>> Squeakland.app and then downloaded the 101 or so code updates.
>   But you did change a crucial method, yes?

The only change was to #startUp and as I'm mentioning in the most recent 
tests, that change has been omitted  (from testing). So I'm thinking now 
that changes I made to #startUp really haven't had anything to do with 
what I'm reporting (the freezes)
>   I tried to change the startUp method on my computer and it doesn't
> freeze my image (as it shouldn't) there is still something missing.
> Hope you explain it in a way that somebody else can reproduce...
If we (and/or others) can solve this, I'd be very grateful :) .... I'm 
experimenting with sound with the idea of extending the sound category 
in tiles. So obviously my first step is to get sound running.

Thanks Yoshiki -

> -- Yoshiki
> _______________________________________________
> Etoys mailing list
> Etoys at lists.laptop.org
> http://lists.laptop.org/listinfo/etoys

Mark Polishook, D.M.A.
Technology Coordinator
Morehead Hall, Rm 132
Center for Academic Advising and Adult Learning
Montclair State University
Montclair, NJ 07043

polishookm at mail.montclair.edu

More information about the Etoys mailing list