Interaction with Sugar on Ubuntu.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
38 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Interaction with Sugar on Ubuntu.

Gustavo Duarte
HI guys,

We are working on a project of Dextrose (Sugar version) over Ubuntu. http://wiki.sugarlabs.org/go/Ubuntu

I installed last version of Etoys: http://etoys.squeak.org/download/Etoys-To-Go-5.0.1-RC4.zip on machine 

The problem that we are having is, when from Etoys, when I trying to save the project, journal option isn't showed on menu.

I think that a kind of problem is on the interaction with  journal, (datastore binding).

Could you suggest me from where I can start my research to find out the problem ?

Regards.

Gustavo.


Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

dcorking
Yesterday Gustavo Duarte wrote
> I installed last version of Etoys:
> http://etoys.squeak.org/download/Etoys-To-Go-5.0.1-RC4.zip on machine
>
> The problem that we are having is, when from Etoys, when I trying to save
> the project, journal option isn't showed on menu.

Welcome Gustavo!

I am sorry, I haven't the bandwidth to try the versions you need, and
I don't know the
relevant classes deeply. Instead I had a quick look at Etoys 5.0 in
Sugar 0.98 in Fedora 19. You may already have tried this:

Print

  SugarLauncher new isRunningInSugar

That should be true. If it is false, the navigator flap will not show
the journal buttons.

If it is false, then print

  SmalltalkImage current extractParameters

It should be a dictionary that includes parameters set by the
Sugar launch script. In the older version of Sugar I have here, they
are ACTIVITY_ID, BUNDLE_ID, BUNDLE_PATH, SQUEAKLETS

If not, I would suggest a look at the python and shell scripts that
launch Etoys.

Have fun! David

p.s. I expect your question will be welcome on the etoys-dev mailing list:
http://lists.squeakland.org/mailman/listinfo/etoys-dev

Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

Gustavo Duarte
HI David,

You are right, the output of: "SmalltalkImage current extractParameters" is an empty Dictionary.

Many thanks for the clue, now i have to figure out, why the parameter passing isn't working.

Regards.

Gustavo.


On Wed, Dec 4, 2013 at 1:13 PM, David Corking <[hidden email]> wrote:
Yesterday Gustavo Duarte wrote
> I installed last version of Etoys:
> http://etoys.squeak.org/download/Etoys-To-Go-5.0.1-RC4.zip on machine
>
> The problem that we are having is, when from Etoys, when I trying to save
> the project, journal option isn't showed on menu.

Welcome Gustavo!

I am sorry, I haven't the bandwidth to try the versions you need, and
I don't know the
relevant classes deeply. Instead I had a quick look at Etoys 5.0 in
Sugar 0.98 in Fedora 19. You may already have tried this:

Print

  SugarLauncher new isRunningInSugar

That should be true. If it is false, the navigator flap will not show
the journal buttons.

If it is false, then print

  SmalltalkImage current extractParameters

It should be a dictionary that includes parameters set by the
Sugar launch script. In the older version of Sugar I have here, they
are ACTIVITY_ID, BUNDLE_ID, BUNDLE_PATH, SQUEAKLETS

If not, I would suggest a look at the python and shell scripts that
launch Etoys.

Have fun! David

p.s. I expect your question will be welcome on the etoys-dev mailing list:
http://lists.squeakland.org/mailman/listinfo/etoys-dev




Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

Gustavo Duarte
Following with my research, as you suggested, i checked the what parameters I'm passing at starting of squeak VM.

I executed "SmalltalkImage current extractParameters" on a XO (where Etoys is working fine and on a ClassMate with Ubuntu)

Te result are:



As you can see, on CM (Ubuntu) the Dictionary has the key-value inverted.

I got an echo output from script etoys of classmate, as you can see bellow.
Seems the passing argument is correct, right ?

ECHO OUTPUT:

exec  squeak -encoding UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity -sugarActivityId fb6717c7fece5e96de49f74ead6b01110228f086 -vm-sound-pulse /usr/share/etoys/etoys.image   BUNDLE_PATH /usr/share/sugar/activities/Etoys.activity SQUEAKLETS /home/gustavo/.sugar/default/org.vpri.EtoysActivity/instance BUNDLE_ID org.vpri.EtoysActivity ACTIVITY_ID fb6717c7fece5e96de49f74ead6b01110228f086


For what reason the the key-values of Dictionary are inverted ?

Another thing, that could you me suggest to follow ?

Thanks in advance.

Gustavo.


On Wed, Dec 4, 2013 at 11:01 PM, Gustavo Duarte <[hidden email]> wrote:
HI David,

You are right, the output of: "SmalltalkImage current extractParameters" is an empty Dictionary.

Many thanks for the clue, now i have to figure out, why the parameter passing isn't working.

Regards.

Gustavo.


On Wed, Dec 4, 2013 at 1:13 PM, David Corking <[hidden email]> wrote:
Yesterday Gustavo Duarte wrote
> I installed last version of Etoys:
> http://etoys.squeak.org/download/Etoys-To-Go-5.0.1-RC4.zip on machine
>
> The problem that we are having is, when from Etoys, when I trying to save
> the project, journal option isn't showed on menu.

Welcome Gustavo!

I am sorry, I haven't the bandwidth to try the versions you need, and
I don't know the
relevant classes deeply. Instead I had a quick look at Etoys 5.0 in
Sugar 0.98 in Fedora 19. You may already have tried this:

Print

  SugarLauncher new isRunningInSugar

That should be true. If it is false, the navigator flap will not show
the journal buttons.

If it is false, then print

  SmalltalkImage current extractParameters

It should be a dictionary that includes parameters set by the
Sugar launch script. In the older version of Sugar I have here, they
are ACTIVITY_ID, BUNDLE_ID, BUNDLE_PATH, SQUEAKLETS

If not, I would suggest a look at the python and shell scripts that
launch Etoys.

Have fun! David

p.s. I expect your question will be welcome on the etoys-dev mailing list:
http://lists.squeakland.org/mailman/listinfo/etoys-dev





Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

dcorking
Gustavo,

You wrote: "For what reason the key-values of Dictionary are inverted ?"

I am not sure. Please post the output of these shell commands:

    which squeak

and

    squeak -version

then let's hope someone with expertise in the Squeak VM (virtual
machine) has some ideas.

Have fun! David

(p.s. Is it possible to see the etoys script echo output from the XO?)

Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

Eliot Miranda-2
In reply to this post by Gustavo Duarte



On Thu, Dec 5, 2013 at 5:30 AM, Gustavo Duarte <[hidden email]> wrote:
Following with my research, as you suggested, i checked the what parameters I'm passing at starting of squeak VM.

I executed "SmalltalkImage current extractParameters" on a XO (where Etoys is working fine and on a ClassMate with Ubuntu)

Te result are:



As you can see, on CM (Ubuntu) the Dictionary has the key-value inverted.

I got an echo output from script etoys of classmate, as you can see bellow.
Seems the passing argument is correct, right ?

ECHO OUTPUT:

exec  squeak -encoding UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity -sugarActivityId fb6717c7fece5e96de49f74ead6b01110228f086 -vm-sound-pulse /usr/share/etoys/etoys.image   BUNDLE_PATH /usr/share/sugar/activities/Etoys.activity SQUEAKLETS /home/gustavo/.sugar/default/org.vpri.EtoysActivity/instance BUNDLE_ID org.vpri.EtoysActivity ACTIVITY_ID fb6717c7fece5e96de49f74ead6b01110228f086


For what reason the the key-values of Dictionary are inverted ?

what's the output of ps ww PID for the running process on XO and CM?  That should show you what arguments have been passed to the VM.  If the arguments look screwy the bug is in the launch script.  If they don't look screwy the problem is in the VM.


Another thing, that could you me suggest to follow ?

Thanks in advance.

Gustavo.


On Wed, Dec 4, 2013 at 11:01 PM, Gustavo Duarte <[hidden email]> wrote:
HI David,

You are right, the output of: "SmalltalkImage current extractParameters" is an empty Dictionary.

Many thanks for the clue, now i have to figure out, why the parameter passing isn't working.

Regards.

Gustavo.


On Wed, Dec 4, 2013 at 1:13 PM, David Corking <[hidden email]> wrote:
Yesterday Gustavo Duarte wrote
> I installed last version of Etoys:
> http://etoys.squeak.org/download/Etoys-To-Go-5.0.1-RC4.zip on machine
>
> The problem that we are having is, when from Etoys, when I trying to save
> the project, journal option isn't showed on menu.

Welcome Gustavo!

I am sorry, I haven't the bandwidth to try the versions you need, and
I don't know the
relevant classes deeply. Instead I had a quick look at Etoys 5.0 in
Sugar 0.98 in Fedora 19. You may already have tried this:

Print

  SugarLauncher new isRunningInSugar

That should be true. If it is false, the navigator flap will not show
the journal buttons.

If it is false, then print

  SmalltalkImage current extractParameters

It should be a dictionary that includes parameters set by the
Sugar launch script. In the older version of Sugar I have here, they
are ACTIVITY_ID, BUNDLE_ID, BUNDLE_PATH, SQUEAKLETS

If not, I would suggest a look at the python and shell scripts that
launch Etoys.

Have fun! David

p.s. I expect your question will be welcome on the etoys-dev mailing list:
http://lists.squeakland.org/mailman/listinfo/etoys-dev









--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

Gustavo Duarte
In reply to this post by dcorking
David,

Here the  outpts:

gustavo-cm1@ceibal-1:~$ which squeak
/usr/local/bin/squeak


gustavo-cm1@ceibal-1:~$ squeak -version
4.4.7-2357 #1 XShm Tue Apr 24 17:10:59 UTC 2012 gcc 4.6.3
Linux vernadsky 2.6.24-31-server #1 SMP Wed Mar 7 00:23:46 UTC 2012 i686 i686 i386 GNU/Linux
plugin path: /usr/lib/squeak/4.4.7-2357/ [default: /usr/lib/squeak/4.4.7-2357/]







On Thu, Dec 5, 2013 at 4:12 PM, David Corking <[hidden email]> wrote:
Gustavo,

You wrote: "For what reason the key-values of Dictionary are inverted ?"

I am not sure. Please post the output of these shell commands:

    which squeak

and

    squeak -version

then let's hope someone with expertise in the Squeak VM (virtual
machine) has some ideas.

Have fun! David

(p.s. Is it possible to see the etoys script echo output from the XO?)




Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

Gustavo Duarte
In reply to this post by Eliot Miranda-2
Eliot,

Here the output of ps ww PID command.

XO:

PID TTY      STAT   TIME COMMAND
  976 ?        S      0:22 /usr/lib/squeak/4.10.2-2614/squeakvm -encoding UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity -sugarActivityId d25f8c2f9a19397ce914965abf04ed31b3f6b0ea -vm-sound-ALSA /usr/share/etoys/etoys.image  BUNDLE_PATH /home/olpc/Activities/Etoys.activity SQUEAKLETS /home/olpc/.sugar/default/org.vpri.EtoysActivity/instance BUNDLE_ID org.vpri.EtoysActivity ACTIVITY_ID d25f8c2f9a19397ce914965abf04ed31b3f6b0ea


CM:

PID TTY      STAT   TIME COMMAND
 5912 ?        Rl     0:06 /usr/lib/squeak/4.4.7-2357/squeakvm -encoding UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274 -vm-sound-pulse /usr/share/etoys/etoys.image BUNDLE_PATH /usr/share/sugar/activities/Etoys.activity SQUEAKLETS /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance BUNDLE_ID org.vpri.EtoysActivity ACTIVITY_ID c03be0a816bee1440f701b7d3b504b0968cb3274


Seem the script that start squeak is ok, right ?


thanks in advance



On Thu, Dec 5, 2013 at 4:14 PM, Eliot Miranda <[hidden email]> wrote:



On Thu, Dec 5, 2013 at 5:30 AM, Gustavo Duarte <[hidden email]> wrote:
Following with my research, as you suggested, i checked the what parameters I'm passing at starting of squeak VM.

I executed "SmalltalkImage current extractParameters" on a XO (where Etoys is working fine and on a ClassMate with Ubuntu)

Te result are:



As you can see, on CM (Ubuntu) the Dictionary has the key-value inverted.

I got an echo output from script etoys of classmate, as you can see bellow.
Seems the passing argument is correct, right ?

ECHO OUTPUT:

exec  squeak -encoding UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity -sugarActivityId fb6717c7fece5e96de49f74ead6b01110228f086 -vm-sound-pulse /usr/share/etoys/etoys.image   BUNDLE_PATH /usr/share/sugar/activities/Etoys.activity SQUEAKLETS /home/gustavo/.sugar/default/org.vpri.EtoysActivity/instance BUNDLE_ID org.vpri.EtoysActivity ACTIVITY_ID fb6717c7fece5e96de49f74ead6b01110228f086


For what reason the the key-values of Dictionary are inverted ?

what's the output of ps ww PID for the running process on XO and CM?  That should show you what arguments have been passed to the VM.  If the arguments look screwy the bug is in the launch script.  If they don't look screwy the problem is in the VM.


Another thing, that could you me suggest to follow ?

Thanks in advance.

Gustavo.


On Wed, Dec 4, 2013 at 11:01 PM, Gustavo Duarte <[hidden email]> wrote:
HI David,

You are right, the output of: "SmalltalkImage current extractParameters" is an empty Dictionary.

Many thanks for the clue, now i have to figure out, why the parameter passing isn't working.

Regards.

Gustavo.


On Wed, Dec 4, 2013 at 1:13 PM, David Corking <[hidden email]> wrote:
Yesterday Gustavo Duarte wrote
> I installed last version of Etoys:
> http://etoys.squeak.org/download/Etoys-To-Go-5.0.1-RC4.zip on machine
>
> The problem that we are having is, when from Etoys, when I trying to save
> the project, journal option isn't showed on menu.

Welcome Gustavo!

I am sorry, I haven't the bandwidth to try the versions you need, and
I don't know the
relevant classes deeply. Instead I had a quick look at Etoys 5.0 in
Sugar 0.98 in Fedora 19. You may already have tried this:

Print

  SugarLauncher new isRunningInSugar

That should be true. If it is false, the navigator flap will not show
the journal buttons.

If it is false, then print

  SmalltalkImage current extractParameters

It should be a dictionary that includes parameters set by the
Sugar launch script. In the older version of Sugar I have here, they
are ACTIVITY_ID, BUNDLE_ID, BUNDLE_PATH, SQUEAKLETS

If not, I would suggest a look at the python and shell scripts that
launch Etoys.

Have fun! David

p.s. I expect your question will be welcome on the etoys-dev mailing list:
http://lists.squeakland.org/mailman/listinfo/etoys-dev









--
best,
Eliot






Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

Eliot Miranda-2



On Thu, Dec 5, 2013 at 2:01 PM, Gustavo Duarte <[hidden email]> wrote:
Eliot,

Here the output of ps ww PID command.

XO:

PID TTY      STAT   TIME COMMAND
  976 ?        S      0:22 /usr/lib/squeak/4.10.2-2614/squeakvm -encoding UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity -sugarActivityId d25f8c2f9a19397ce914965abf04ed31b3f6b0ea -vm-sound-ALSA /usr/share/etoys/etoys.image  BUNDLE_PATH /home/olpc/Activities/Etoys.activity SQUEAKLETS /home/olpc/.sugar/default/org.vpri.EtoysActivity/instance BUNDLE_ID org.vpri.EtoysActivity ACTIVITY_ID d25f8c2f9a19397ce914965abf04ed31b3f6b0ea


CM:

PID TTY      STAT   TIME COMMAND
 5912 ?        Rl     0:06 /usr/lib/squeak/4.4.7-2357/squeakvm -encoding UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274 -vm-sound-pulse /usr/share/etoys/etoys.image BUNDLE_PATH /usr/share/sugar/activities/Etoys.activity SQUEAKLETS /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance BUNDLE_ID org.vpri.EtoysActivity ACTIVITY_ID c03be0a816bee1440f701b7d3b504b0968cb3274


Seem the script that start squeak is ok, right ?


Looks like it :-(.  That implies theres a bug in the VM on ubuntu :-(.  Might it be something to do with the vm-sound-pulse plugin mis-parsing the command line?  What happens if you start it with no sound (omit -vm-sound-pulse) ?


thanks in advance



On Thu, Dec 5, 2013 at 4:14 PM, Eliot Miranda <[hidden email]> wrote:



On Thu, Dec 5, 2013 at 5:30 AM, Gustavo Duarte <[hidden email]> wrote:
Following with my research, as you suggested, i checked the what parameters I'm passing at starting of squeak VM.

I executed "SmalltalkImage current extractParameters" on a XO (where Etoys is working fine and on a ClassMate with Ubuntu)

Te result are:



As you can see, on CM (Ubuntu) the Dictionary has the key-value inverted.

I got an echo output from script etoys of classmate, as you can see bellow.
Seems the passing argument is correct, right ?

ECHO OUTPUT:

exec  squeak -encoding UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity -sugarActivityId fb6717c7fece5e96de49f74ead6b01110228f086 -vm-sound-pulse /usr/share/etoys/etoys.image   BUNDLE_PATH /usr/share/sugar/activities/Etoys.activity SQUEAKLETS /home/gustavo/.sugar/default/org.vpri.EtoysActivity/instance BUNDLE_ID org.vpri.EtoysActivity ACTIVITY_ID fb6717c7fece5e96de49f74ead6b01110228f086


For what reason the the key-values of Dictionary are inverted ?

what's the output of ps ww PID for the running process on XO and CM?  That should show you what arguments have been passed to the VM.  If the arguments look screwy the bug is in the launch script.  If they don't look screwy the problem is in the VM.


Another thing, that could you me suggest to follow ?

Thanks in advance.

Gustavo.


On Wed, Dec 4, 2013 at 11:01 PM, Gustavo Duarte <[hidden email]> wrote:
HI David,

You are right, the output of: "SmalltalkImage current extractParameters" is an empty Dictionary.

Many thanks for the clue, now i have to figure out, why the parameter passing isn't working.

Regards.

Gustavo.


On Wed, Dec 4, 2013 at 1:13 PM, David Corking <[hidden email]> wrote:
Yesterday Gustavo Duarte wrote
> I installed last version of Etoys:
> http://etoys.squeak.org/download/Etoys-To-Go-5.0.1-RC4.zip on machine
>
> The problem that we are having is, when from Etoys, when I trying to save
> the project, journal option isn't showed on menu.

Welcome Gustavo!

I am sorry, I haven't the bandwidth to try the versions you need, and
I don't know the
relevant classes deeply. Instead I had a quick look at Etoys 5.0 in
Sugar 0.98 in Fedora 19. You may already have tried this:

Print

  SugarLauncher new isRunningInSugar

That should be true. If it is false, the navigator flap will not show
the journal buttons.

If it is false, then print

  SmalltalkImage current extractParameters

It should be a dictionary that includes parameters set by the
Sugar launch script. In the older version of Sugar I have here, they
are ACTIVITY_ID, BUNDLE_ID, BUNDLE_PATH, SQUEAKLETS

If not, I would suggest a look at the python and shell scripts that
launch Etoys.

Have fun! David

p.s. I expect your question will be welcome on the etoys-dev mailing list:
http://lists.squeakland.org/mailman/listinfo/etoys-dev









--
best,
Eliot










--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

dcorking
In reply to this post by Gustavo Duarte
This may be a red herring, Gustavo, but the squeakvm your used in
Ubuntu is about a year and a half older than the one in Fedora (and so
in your XO), which is 4.10.2-2614

It may be worth trying the current VM in Ubuntu.

Apparently it is available in 'raring ringtail'

http://packages.ubuntu.com/search?suite=saucy&arch=any&searchon=names&keywords=squeak-vm

You probably know the upstream site for the VM is

http://squeakvm.org/unix/

Have fun! David

Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

dcorking
I typed:

> It may be worth trying the current VM in Ubuntu.
>
> Apparently it is available in 'raring ringtail'

Sorry - that is not correct.

I meant that that the current VM is in Ubuntu 13.10 'saucy salamander'
(more recent)

http://packages.ubuntu.com/saucy/squeak-vm

Have fun! David

Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

David T. Lewis
In reply to this post by Eliot Miranda-2
On Thu, Dec 05, 2013 at 02:36:42PM -0800, Eliot Miranda wrote:

> On Thu, Dec 5, 2013 at 2:01 PM, Gustavo Duarte
> <[hidden email]>wrote:
>
> > Eliot,
> >
> > Here the output of ps ww PID command.
> >
> > XO:
> >
> > PID TTY      STAT   TIME COMMAND
> >   976 ?        S      0:22 /usr/lib/squeak/4.10.2-2614/squeakvm -encoding
> > UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity
> > -sugarActivityId d25f8c2f9a19397ce914965abf04ed31b3f6b0ea -vm-sound-ALSA
> > /usr/share/etoys/etoys.image  BUNDLE_PATH
> > /home/olpc/Activities/Etoys.activity SQUEAKLETS
> > /home/olpc/.sugar/default/org.vpri.EtoysActivity/instance BUNDLE_ID
> > org.vpri.EtoysActivity ACTIVITY_ID d25f8c2f9a19397ce914965abf04ed31b3f6b0ea
> >
> >
> > CM:
> >
> > PID TTY      STAT   TIME COMMAND
> >  5912 ?        Rl     0:06 /usr/lib/squeak/4.4.7-2357/squeakvm -encoding
> > UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity
> > -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274 -vm-sound-pulse
> > /usr/share/etoys/etoys.image BUNDLE_PATH
> > /usr/share/sugar/activities/Etoys.activity SQUEAKLETS
> > /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance BUNDLE_ID
> > org.vpri.EtoysActivity ACTIVITY_ID c03be0a816bee1440f701b7d3b504b0968cb3274
> >
> >
> > Seem the script that start squeak is ok, right ?
> >
>
>
> Looks like it :-(.  That implies theres a bug in the VM on ubuntu :-(.
>  Might it be something to do with the vm-sound-pulse plugin mis-parsing the
> command line?  What happens if you start it with no sound (omit
> -vm-sound-pulse) ?
>

After reading this thread, I was initially confused by the command line
options that are being passed to the VM:

  -encoding UTF-8
  -vm-display-x11
  -xshm
  -sugarBundleId org.vpri.EtoysActivity
  -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274
  -vm-sound-pulse

These are options that are parsed by the VM executable itself, as opposed
to being passed to the Etoys image and evaluated there.

I took a look at the VM sources, and see that the -sugarBundleId and
the -sugarActivityId parameters will be interpreted by the VM executable
if and only if the VM was compiled with Sugar support:

  #    if defined(SUGAR)
        else if (!strcmp(arg, "-sugarBundleId"))   sugarBundleId= argv[1];
        else if (!strcmp(arg, "-sugarActivityId")) sugarActivityId= argv[1];
  #    endif

I expect that if the Etoys image is run from a script that specifies those
two VM parameters, and if the VM was not compiled without Sugar support,
then the command line parameters are probably going to get out of whack.
The dictionary that got turned inside out is probably a side effect of this.

So my guess is that the script is trying to run a VM for Etoys in the
Sugar environment, but the VM that is being run by that script was not
compiled with Sugar support enabled.

Dave


Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

Gustavo Duarte
In reply to this post by dcorking
Hi David, 

You are right, squeakvm on Ubuntu is older than sueaqvm on Fedora 17, but on Ubuntu on the same machine (linux box) , i can run Scratch interacting well with Sugar. From Scratch I can save project on Journal.

PID TTY      STAT   TIME COMMAND
 2058 ?        S      0:07 /usr/lib/squeak/4.4.7-2357/squeakvm -vm-display-X11 -swapbtn -encoding UTF-8 -vm-sound-ALSA -sugarBundleId edu.mit.media.ScratchActivity -sugarActivityId 14b6c8252fd00670b2f668145b1b75ad4ccb205c ScratchXO.image

Any way i'm going to install squeakvm 4.10 version on my Ubuntu and see.

Thanks in advance.
Gustavo.



On Thu, Dec 5, 2013 at 9:00 PM, David Corking <[hidden email]> wrote:
I typed:

> It may be worth trying the current VM in Ubuntu.
>
> Apparently it is available in 'raring ringtail'

Sorry - that is not correct.

I meant that that the current VM is in Ubuntu 13.10 'saucy salamander'
(more recent)

http://packages.ubuntu.com/saucy/squeak-vm

Have fun! David




Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

Gustavo Duarte
In reply to this post by David T. Lewis
Dave,

I believe that squeakvm is compiled with Sugar support, because I can run Scratch and save projects on Journal, just in case, there is another way to know if squeakvm is compiled with Sugar support ?


I paste bellow another test I had done:

As Scratch is working well with the interaction with Sugar, I copied the same parameters of Scratch starting script, and executed this from a terminal as:

sudo /usr/lib/squeak/4.4.7-2357/squeakvm -vm-display-X11 -swapbtn -encoding UTF-8 -vm-sound-ALSA -sugarBundleId org.vpri.EtoysActivity -sugarActivityId 24c67ec800d1d71723f959b56a213accf140e7bc /usr/share/etoys/etoys.image SQUEAKLETS /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance/ BUNDLE_ID org.vpri.EtoysActivity ACTIVITY_ID 24c67ec800d1d71723f959b56a213accf140e7bc




The output debug log is:


=========== SqueakDebug.log START ==========
Error: No content to install
6 December 2013 10:05:27 am

VM: unix - a SmalltalkImage
Image: etoys5.0 [latest update: #2408]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir /usr/share/etoys/My Squeak
Trusted Dir /usr/share/etoys/secure
Untrusted Dir /usr/share/etoys/My Squeak

CodeLoader(Object)>>error:
Receiver: a CodeLoader
Arguments and temporary variables: 
aString:  'No content to install'
Receiver's instance variables: 
baseURL:  ''
sourceFiles:  #(a HTTPDownloadRequest)
segments:  nil
publicKey:  nil

CodeLoader>>installSourceFile:
Receiver: a CodeLoader
Arguments and temporary variables: 
aStream:  nil
contents:  nil
trusted:  nil
Receiver's instance variables: 
baseURL:  ''
sourceFiles:  #(a HTTPDownloadRequest)
segments:  nil
publicKey:  nil

[] in CodeLoader>>installSourceFiles {[:req | self installSourceFile: req contentStream]}
Arguments and temporary variables: 
req:  a HTTPDownloadRequest

Array(SequenceableCollection)>>do:
Receiver: #(a HTTPDownloadRequest)
Arguments and temporary variables: 
aBlock:  [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile: r...etc...
index:  1
indexLimiT:  1
Receiver's instance variables: 
#(a HTTPDownloadRequest)


--- The full stack ---
CodeLoader(Object)>>error:
CodeLoader>>installSourceFile:
[] in CodeLoader>>installSourceFiles {[:req | self installSourceFile: req contentStream]}
Array(SequenceableCollection)>>do:
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CodeLoader>>installSourceFiles
ProjectLauncher>>startUpAfterLogin
ProjectLauncher>>doEtoyLogin
ProjectLauncher>>startUp
[] in AutoStart class>>startUp: {[launcher startUp]}
WorldState>>runStepMethodsIn:
PasteUpMorph>>runStepMethods
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
PasteUpMorph>>doOneCycle
[] in Project class>>spawnNewProcess {[[World doOneCycle.  Processor yield.  false] whileFalse.  nil]}
[] in BlockContext>>newProcess {[self value.  Processor terminateActive]}
=========== SqueakDebug.log END  ==========



On Fri, Dec 6, 2013 at 12:17 AM, David T. Lewis <[hidden email]> wrote:
On Thu, Dec 05, 2013 at 02:36:42PM -0800, Eliot Miranda wrote:
> On Thu, Dec 5, 2013 at 2:01 PM, Gustavo Duarte
> <[hidden email]>wrote:
>
> > Eliot,
> >
> > Here the output of ps ww PID command.
> >
> > XO:
> >
> > PID TTY      STAT   TIME COMMAND
> >   976 ?        S      0:22 /usr/lib/squeak/4.10.2-2614/squeakvm -encoding
> > UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity
> > -sugarActivityId d25f8c2f9a19397ce914965abf04ed31b3f6b0ea -vm-sound-ALSA
> > /usr/share/etoys/etoys.image  BUNDLE_PATH
> > /home/olpc/Activities/Etoys.activity SQUEAKLETS
> > /home/olpc/.sugar/default/org.vpri.EtoysActivity/instance BUNDLE_ID
> > org.vpri.EtoysActivity ACTIVITY_ID d25f8c2f9a19397ce914965abf04ed31b3f6b0ea
> >
> >
> > CM:
> >
> > PID TTY      STAT   TIME COMMAND
> >  5912 ?        Rl     0:06 /usr/lib/squeak/4.4.7-2357/squeakvm -encoding
> > UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity
> > -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274 -vm-sound-pulse
> > /usr/share/etoys/etoys.image BUNDLE_PATH
> > /usr/share/sugar/activities/Etoys.activity SQUEAKLETS
> > /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance BUNDLE_ID
> > org.vpri.EtoysActivity ACTIVITY_ID c03be0a816bee1440f701b7d3b504b0968cb3274
> >
> >
> > Seem the script that start squeak is ok, right ?
> >
>
>
> Looks like it :-(.  That implies theres a bug in the VM on ubuntu :-(.
>  Might it be something to do with the vm-sound-pulse plugin mis-parsing the
> command line?  What happens if you start it with no sound (omit
> -vm-sound-pulse) ?
>

After reading this thread, I was initially confused by the command line
options that are being passed to the VM:

  -encoding UTF-8
  -vm-display-x11
  -xshm
  -sugarBundleId org.vpri.EtoysActivity
  -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274
  -vm-sound-pulse

These are options that are parsed by the VM executable itself, as opposed
to being passed to the Etoys image and evaluated there.

I took a look at the VM sources, and see that the -sugarBundleId and
the -sugarActivityId parameters will be interpreted by the VM executable
if and only if the VM was compiled with Sugar support:

  #    if defined(SUGAR)
        else if (!strcmp(arg, "-sugarBundleId"))   sugarBundleId= argv[1];
        else if (!strcmp(arg, "-sugarActivityId")) sugarActivityId= argv[1];
  #    endif

I expect that if the Etoys image is run from a script that specifies those
two VM parameters, and if the VM was not compiled without Sugar support,
then the command line parameters are probably going to get out of whack.
The dictionary that got turned inside out is probably a side effect of this.

So my guess is that the script is trying to run a VM for Etoys in the
Sugar environment, but the VM that is being run by that script was not
compiled with Sugar support enabled.

Dave





Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

Frank Shearar-3
On 6 December 2013 12:34, Gustavo Duarte <[hidden email]> wrote:

> Dave,
>
> I believe that squeakvm is compiled with Sugar support, because I can run
> Scratch and save projects on Journal, just in case, there is another way to
> know if squeakvm is compiled with Sugar support ?
>
>
> I paste bellow another test I had done:
>
> As Scratch is working well with the interaction with Sugar, I copied the
> same parameters of Scratch starting script, and executed this from a
> terminal as:
>
> sudo /usr/lib/squeak/4.4.7-2357/squeakvm -vm-display-X11 -swapbtn -encoding
> UTF-8 -vm-sound-ALSA -sugarBundleId org.vpri.EtoysActivity -sugarActivityId
> 24c67ec800d1d71723f959b56a213accf140e7bc /usr/share/etoys/etoys.image
> SQUEAKLETS /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance/
> BUNDLE_ID org.vpri.EtoysActivity ACTIVITY_ID
> 24c67ec800d1d71723f959b56a213accf140e7bc
>
>
>
>
> The output debug log is:
>
>
> =========== SqueakDebug.log START ==========
> Error: No content to install
> 6 December 2013 10:05:27 am
>
> VM: unix - a SmalltalkImage
> Image: etoys5.0 [latest update: #2408]
>
> SecurityManager state:
> Restricted: false
> FileAccess: true
> SocketAccess: true
> Working Dir /usr/share/etoys/My Squeak
> Trusted Dir /usr/share/etoys/secure
> Untrusted Dir /usr/share/etoys/My Squeak
>
> CodeLoader(Object)>>error:
> Receiver: a CodeLoader
> Arguments and temporary variables:
> aString:  'No content to install'
> Receiver's instance variables:
> baseURL:  ''
> sourceFiles:  #(a HTTPDownloadRequest)
> segments:  nil
> publicKey:  nil

I don't know if it's hugely useful info, but 'No content to install'
means the startup file couldn't be found. This often happens to me
because the startup file location is relative to the directory
containing the image, not the location where you run the command.

So if you're in /home/frank/squeak-ci/ and you say "$
target/cog.r2766/coglinux/bin/squeak target/TrunkImage.image
HudsonTools.st", "HudsonTools.st" is translated into
"/home/frank/squeak-ci/target/HudsonTools.st", not
"/home/frank/squeak-ci/HudsonTools.st".

frank

> CodeLoader>>installSourceFile:
> Receiver: a CodeLoader
> Arguments and temporary variables:
> aStream:  nil
> contents:  nil
> trusted:  nil
> Receiver's instance variables:
> baseURL:  ''
> sourceFiles:  #(a HTTPDownloadRequest)
> segments:  nil
> publicKey:  nil
>
> [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile: req
> contentStream]}
> Arguments and temporary variables:
> req:  a HTTPDownloadRequest
>
> Array(SequenceableCollection)>>do:
> Receiver: #(a HTTPDownloadRequest)
> Arguments and temporary variables:
> aBlock:  [] in CodeLoader>>installSourceFiles {[:req | self
> installSourceFile: r...etc...
> index:  1
> indexLimiT:  1
> Receiver's instance variables:
> #(a HTTPDownloadRequest)
>
>
> --- The full stack ---
> CodeLoader(Object)>>error:
> CodeLoader>>installSourceFile:
> [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile: req
> contentStream]}
> Array(SequenceableCollection)>>do:
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> CodeLoader>>installSourceFiles
> ProjectLauncher>>startUpAfterLogin
> ProjectLauncher>>doEtoyLogin
> ProjectLauncher>>startUp
> [] in AutoStart class>>startUp: {[launcher startUp]}
> WorldState>>runStepMethodsIn:
> PasteUpMorph>>runStepMethods
> WorldState>>doOneCycleNowFor:
> WorldState>>doOneCycleFor:
> PasteUpMorph>>doOneCycle
> [] in Project class>>spawnNewProcess {[[World doOneCycle.  Processor yield.
> false] whileFalse.  nil]}
> [] in BlockContext>>newProcess {[self value.  Processor terminateActive]}
> =========== SqueakDebug.log END  ==========
>
>
>
> On Fri, Dec 6, 2013 at 12:17 AM, David T. Lewis <[hidden email]> wrote:
>>
>> On Thu, Dec 05, 2013 at 02:36:42PM -0800, Eliot Miranda wrote:
>> > On Thu, Dec 5, 2013 at 2:01 PM, Gustavo Duarte
>> > <[hidden email]>wrote:
>> >
>> > > Eliot,
>> > >
>> > > Here the output of ps ww PID command.
>> > >
>> > > XO:
>> > >
>> > > PID TTY      STAT   TIME COMMAND
>> > >   976 ?        S      0:22 /usr/lib/squeak/4.10.2-2614/squeakvm
>> > > -encoding
>> > > UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity
>> > > -sugarActivityId d25f8c2f9a19397ce914965abf04ed31b3f6b0ea
>> > > -vm-sound-ALSA
>> > > /usr/share/etoys/etoys.image  BUNDLE_PATH
>> > > /home/olpc/Activities/Etoys.activity SQUEAKLETS
>> > > /home/olpc/.sugar/default/org.vpri.EtoysActivity/instance BUNDLE_ID
>> > > org.vpri.EtoysActivity ACTIVITY_ID
>> > > d25f8c2f9a19397ce914965abf04ed31b3f6b0ea
>> > >
>> > >
>> > > CM:
>> > >
>> > > PID TTY      STAT   TIME COMMAND
>> > >  5912 ?        Rl     0:06 /usr/lib/squeak/4.4.7-2357/squeakvm
>> > > -encoding
>> > > UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity
>> > > -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274
>> > > -vm-sound-pulse
>> > > /usr/share/etoys/etoys.image BUNDLE_PATH
>> > > /usr/share/sugar/activities/Etoys.activity SQUEAKLETS
>> > > /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance
>> > > BUNDLE_ID
>> > > org.vpri.EtoysActivity ACTIVITY_ID
>> > > c03be0a816bee1440f701b7d3b504b0968cb3274
>> > >
>> > >
>> > > Seem the script that start squeak is ok, right ?
>> > >
>> >
>> >
>> > Looks like it :-(.  That implies theres a bug in the VM on ubuntu :-(.
>> >  Might it be something to do with the vm-sound-pulse plugin mis-parsing
>> > the
>> > command line?  What happens if you start it with no sound (omit
>> > -vm-sound-pulse) ?
>> >
>>
>> After reading this thread, I was initially confused by the command line
>> options that are being passed to the VM:
>>
>>   -encoding UTF-8
>>   -vm-display-x11
>>   -xshm
>>   -sugarBundleId org.vpri.EtoysActivity
>>   -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274
>>   -vm-sound-pulse
>>
>> These are options that are parsed by the VM executable itself, as opposed
>> to being passed to the Etoys image and evaluated there.
>>
>> I took a look at the VM sources, and see that the -sugarBundleId and
>> the -sugarActivityId parameters will be interpreted by the VM executable
>> if and only if the VM was compiled with Sugar support:
>>
>>   #    if defined(SUGAR)
>>         else if (!strcmp(arg, "-sugarBundleId"))   sugarBundleId= argv[1];
>>         else if (!strcmp(arg, "-sugarActivityId")) sugarActivityId=
>> argv[1];
>>   #    endif
>>
>> I expect that if the Etoys image is run from a script that specifies those
>> two VM parameters, and if the VM was not compiled without Sugar support,
>> then the command line parameters are probably going to get out of whack.
>> The dictionary that got turned inside out is probably a side effect of
>> this.
>>
>> So my guess is that the script is trying to run a VM for Etoys in the
>> Sugar environment, but the VM that is being run by that script was not
>> compiled with Sugar support enabled.
>>
>> Dave
>>
>>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

Gustavo Duarte
Hi Frank,

Sound reasonable your comment, but in my case i don't have startup file, i guess, please see the parameters passed to squeakvm, no startup file is passed, right ? Or there is something I'm don't understanding 

Thanks.

Gustavo. 


On Fri, Dec 6, 2013 at 11:26 AM, Frank Shearar <[hidden email]> wrote:
On 6 December 2013 12:34, Gustavo Duarte <[hidden email]> wrote:
> Dave,
>
> I believe that squeakvm is compiled with Sugar support, because I can run
> Scratch and save projects on Journal, just in case, there is another way to
> know if squeakvm is compiled with Sugar support ?
>
>
> I paste bellow another test I had done:
>
> As Scratch is working well with the interaction with Sugar, I copied the
> same parameters of Scratch starting script, and executed this from a
> terminal as:
>
> sudo /usr/lib/squeak/4.4.7-2357/squeakvm -vm-display-X11 -swapbtn -encoding
> UTF-8 -vm-sound-ALSA -sugarBundleId org.vpri.EtoysActivity -sugarActivityId
> 24c67ec800d1d71723f959b56a213accf140e7bc /usr/share/etoys/etoys.image
> SQUEAKLETS /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance/
> BUNDLE_ID org.vpri.EtoysActivity ACTIVITY_ID
> 24c67ec800d1d71723f959b56a213accf140e7bc
>
>
>
>
> The output debug log is:
>
>
> =========== SqueakDebug.log START ==========
> Error: No content to install
> 6 December 2013 10:05:27 am
>
> VM: unix - a SmalltalkImage
> Image: etoys5.0 [latest update: #2408]
>
> SecurityManager state:
> Restricted: false
> FileAccess: true
> SocketAccess: true
> Working Dir /usr/share/etoys/My Squeak
> Trusted Dir /usr/share/etoys/secure
> Untrusted Dir /usr/share/etoys/My Squeak
>
> CodeLoader(Object)>>error:
> Receiver: a CodeLoader
> Arguments and temporary variables:
> aString:  'No content to install'
> Receiver's instance variables:
> baseURL:  ''
> sourceFiles:  #(a HTTPDownloadRequest)
> segments:  nil
> publicKey:  nil

I don't know if it's hugely useful info, but 'No content to install'
means the startup file couldn't be found. This often happens to me
because the startup file location is relative to the directory
containing the image, not the location where you run the command.

So if you're in /home/frank/squeak-ci/ and you say "$
target/cog.r2766/coglinux/bin/squeak target/TrunkImage.image
HudsonTools.st", "HudsonTools.st" is translated into
"/home/frank/squeak-ci/target/HudsonTools.st", not
"/home/frank/squeak-ci/HudsonTools.st".

frank

> CodeLoader>>installSourceFile:
> Receiver: a CodeLoader
> Arguments and temporary variables:
> aStream:  nil
> contents:  nil
> trusted:  nil
> Receiver's instance variables:
> baseURL:  ''
> sourceFiles:  #(a HTTPDownloadRequest)
> segments:  nil
> publicKey:  nil
>
> [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile: req
> contentStream]}
> Arguments and temporary variables:
> req:  a HTTPDownloadRequest
>
> Array(SequenceableCollection)>>do:
> Receiver: #(a HTTPDownloadRequest)
> Arguments and temporary variables:
> aBlock:  [] in CodeLoader>>installSourceFiles {[:req | self
> installSourceFile: r...etc...
> index:  1
> indexLimiT:  1
> Receiver's instance variables:
> #(a HTTPDownloadRequest)
>
>
> --- The full stack ---
> CodeLoader(Object)>>error:
> CodeLoader>>installSourceFile:
> [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile: req
> contentStream]}
> Array(SequenceableCollection)>>do:
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> CodeLoader>>installSourceFiles
> ProjectLauncher>>startUpAfterLogin
> ProjectLauncher>>doEtoyLogin
> ProjectLauncher>>startUp
> [] in AutoStart class>>startUp: {[launcher startUp]}
> WorldState>>runStepMethodsIn:
> PasteUpMorph>>runStepMethods
> WorldState>>doOneCycleNowFor:
> WorldState>>doOneCycleFor:
> PasteUpMorph>>doOneCycle
> [] in Project class>>spawnNewProcess {[[World doOneCycle.  Processor yield.
> false] whileFalse.  nil]}
> [] in BlockContext>>newProcess {[self value.  Processor terminateActive]}
> =========== SqueakDebug.log END  ==========
>
>
>
> On Fri, Dec 6, 2013 at 12:17 AM, David T. Lewis <[hidden email]> wrote:
>>
>> On Thu, Dec 05, 2013 at 02:36:42PM -0800, Eliot Miranda wrote:
>> > On Thu, Dec 5, 2013 at 2:01 PM, Gustavo Duarte
>> > <[hidden email]>wrote:
>> >
>> > > Eliot,
>> > >
>> > > Here the output of ps ww PID command.
>> > >
>> > > XO:
>> > >
>> > > PID TTY      STAT   TIME COMMAND
>> > >   976 ?        S      0:22 /usr/lib/squeak/4.10.2-2614/squeakvm
>> > > -encoding
>> > > UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity
>> > > -sugarActivityId d25f8c2f9a19397ce914965abf04ed31b3f6b0ea
>> > > -vm-sound-ALSA
>> > > /usr/share/etoys/etoys.image  BUNDLE_PATH
>> > > /home/olpc/Activities/Etoys.activity SQUEAKLETS
>> > > /home/olpc/.sugar/default/org.vpri.EtoysActivity/instance BUNDLE_ID
>> > > org.vpri.EtoysActivity ACTIVITY_ID
>> > > d25f8c2f9a19397ce914965abf04ed31b3f6b0ea
>> > >
>> > >
>> > > CM:
>> > >
>> > > PID TTY      STAT   TIME COMMAND
>> > >  5912 ?        Rl     0:06 /usr/lib/squeak/4.4.7-2357/squeakvm
>> > > -encoding
>> > > UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity
>> > > -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274
>> > > -vm-sound-pulse
>> > > /usr/share/etoys/etoys.image BUNDLE_PATH
>> > > /usr/share/sugar/activities/Etoys.activity SQUEAKLETS
>> > > /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance
>> > > BUNDLE_ID
>> > > org.vpri.EtoysActivity ACTIVITY_ID
>> > > c03be0a816bee1440f701b7d3b504b0968cb3274
>> > >
>> > >
>> > > Seem the script that start squeak is ok, right ?
>> > >
>> >
>> >
>> > Looks like it :-(.  That implies theres a bug in the VM on ubuntu :-(.
>> >  Might it be something to do with the vm-sound-pulse plugin mis-parsing
>> > the
>> > command line?  What happens if you start it with no sound (omit
>> > -vm-sound-pulse) ?
>> >
>>
>> After reading this thread, I was initially confused by the command line
>> options that are being passed to the VM:
>>
>>   -encoding UTF-8
>>   -vm-display-x11
>>   -xshm
>>   -sugarBundleId org.vpri.EtoysActivity
>>   -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274
>>   -vm-sound-pulse
>>
>> These are options that are parsed by the VM executable itself, as opposed
>> to being passed to the Etoys image and evaluated there.
>>
>> I took a look at the VM sources, and see that the -sugarBundleId and
>> the -sugarActivityId parameters will be interpreted by the VM executable
>> if and only if the VM was compiled with Sugar support:
>>
>>   #    if defined(SUGAR)
>>         else if (!strcmp(arg, "-sugarBundleId"))   sugarBundleId= argv[1];
>>         else if (!strcmp(arg, "-sugarActivityId")) sugarActivityId=
>> argv[1];
>>   #    endif
>>
>> I expect that if the Etoys image is run from a script that specifies those
>> two VM parameters, and if the VM was not compiled without Sugar support,
>> then the command line parameters are probably going to get out of whack.
>> The dictionary that got turned inside out is probably a side effect of
>> this.
>>
>> So my guess is that the script is trying to run a VM for Etoys in the
>> Sugar environment, but the VM that is being run by that script was not
>> compiled with Sugar support enabled.
>>
>> Dave
>>
>>
>
>
>
>




Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

David T. Lewis
In reply to this post by Gustavo Duarte
On Fri, Dec 06, 2013 at 10:34:16AM -0200, Gustavo Duarte wrote:
> Dave,
>
> I believe that squeakvm is compiled with Sugar support, because I can run
> Scratch and save projects on Journal, just in case, there is another way to
> know if squeakvm is compiled with Sugar support ?
>

If you run the VM executable directly with the -help option, it will print
a list of available command line options. If the VM was compiled with
Sugar support, the list of X11 options will include this:

  -sugarBundleId <id>   set window property _SUGAR_BUNDLE_ID to <id>
  -sugarActivityId <id> set window property _SUGAR_ACTIVITY_ID to <id>

If the VM does not have this, then it will not handle the command line
option parsing as expected.

As far as I can tell, the Sugar support in the VM is used only to set
some X11 window properties. I am not familiar with Sugar, so I do not
know why this is important, but I would expect that the basic functioning
of Etoys and Squeak would not be affected by this at all. So just for
purposes of testing, you might want to try running Etoys with the following
two parameters removed from the command line:

  -sugarBundleId org.vpri.EtoysActivity
  -sugarActivityId > 24c67ec800d1d71723f959b56a213accf140e7bc

I expect that if you run it this way, then Etoys should start up normally
and the "inverted dictionary" problem will be resolved. This will at
least confirm the problem, then we can figure out what to do to fix it.

Dave


>
> I paste bellow another test I had done:
>
> As Scratch is working well with the interaction with Sugar, I copied the
> same parameters of Scratch starting script, and executed this from a
> terminal as:
>
> sudo /usr/lib/squeak/4.4.7-2357/squeakvm -vm-display-X11 -swapbtn -encoding
> UTF-8 -vm-sound-ALSA -sugarBundleId org.vpri.EtoysActivity -sugarActivityId
> 24c67ec800d1d71723f959b56a213accf140e7bc /usr/share/etoys/etoys.image
> SQUEAKLETS
> /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance/ BUNDLE_ID
> org.vpri.EtoysActivity ACTIVITY_ID 24c67ec800d1d71723f959b56a213accf140e7bc
>
>
>
>
> The output debug log is:
>
>
> =========== SqueakDebug.log START ==========
> Error: No content to install
> 6 December 2013 10:05:27 am
>
> VM: unix - a SmalltalkImage
> Image: etoys5.0 [latest update: #2408]
>
> SecurityManager state:
> Restricted: false
> FileAccess: true
> SocketAccess: true
> Working Dir /usr/share/etoys/My Squeak
> Trusted Dir /usr/share/etoys/secure
> Untrusted Dir /usr/share/etoys/My Squeak
>
> CodeLoader(Object)>>error:
> Receiver: a CodeLoader
> Arguments and temporary variables:
> aString:  'No content to install'
> Receiver's instance variables:
> baseURL:  ''
> sourceFiles:  #(a HTTPDownloadRequest)
> segments:  nil
> publicKey:  nil
>
> CodeLoader>>installSourceFile:
> Receiver: a CodeLoader
> Arguments and temporary variables:
> aStream:  nil
> contents:  nil
> trusted:  nil
> Receiver's instance variables:
> baseURL:  ''
> sourceFiles:  #(a HTTPDownloadRequest)
> segments:  nil
> publicKey:  nil
>
> [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile: req
> contentStream]}
> Arguments and temporary variables:
> req:  a HTTPDownloadRequest
>
> Array(SequenceableCollection)>>do:
> Receiver: #(a HTTPDownloadRequest)
> Arguments and temporary variables:
> aBlock:  [] in CodeLoader>>installSourceFiles {[:req | self
> installSourceFile: r...etc...
> index:  1
> indexLimiT:  1
> Receiver's instance variables:
> #(a HTTPDownloadRequest)
>
>
> --- The full stack ---
> CodeLoader(Object)>>error:
> CodeLoader>>installSourceFile:
> [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile: req
> contentStream]}
> Array(SequenceableCollection)>>do:
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> CodeLoader>>installSourceFiles
> ProjectLauncher>>startUpAfterLogin
> ProjectLauncher>>doEtoyLogin
> ProjectLauncher>>startUp
> [] in AutoStart class>>startUp: {[launcher startUp]}
> WorldState>>runStepMethodsIn:
> PasteUpMorph>>runStepMethods
> WorldState>>doOneCycleNowFor:
> WorldState>>doOneCycleFor:
> PasteUpMorph>>doOneCycle
> [] in Project class>>spawnNewProcess {[[World doOneCycle.  Processor yield.
>  false] whileFalse.  nil]}
> [] in BlockContext>>newProcess {[self value.  Processor terminateActive]}
> =========== SqueakDebug.log END  ==========
>
>
>
> On Fri, Dec 6, 2013 at 12:17 AM, David T. Lewis <[hidden email]> wrote:
>
> > On Thu, Dec 05, 2013 at 02:36:42PM -0800, Eliot Miranda wrote:
> > > On Thu, Dec 5, 2013 at 2:01 PM, Gustavo Duarte
> > > <[hidden email]>wrote:
> > >
> > > > Eliot,
> > > >
> > > > Here the output of ps ww PID command.
> > > >
> > > > XO:
> > > >
> > > > PID TTY      STAT   TIME COMMAND
> > > >   976 ?        S      0:22 /usr/lib/squeak/4.10.2-2614/squeakvm
> > -encoding
> > > > UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity
> > > > -sugarActivityId d25f8c2f9a19397ce914965abf04ed31b3f6b0ea
> > -vm-sound-ALSA
> > > > /usr/share/etoys/etoys.image  BUNDLE_PATH
> > > > /home/olpc/Activities/Etoys.activity SQUEAKLETS
> > > > /home/olpc/.sugar/default/org.vpri.EtoysActivity/instance BUNDLE_ID
> > > > org.vpri.EtoysActivity ACTIVITY_ID
> > d25f8c2f9a19397ce914965abf04ed31b3f6b0ea
> > > >
> > > >
> > > > CM:
> > > >
> > > > PID TTY      STAT   TIME COMMAND
> > > >  5912 ?        Rl     0:06 /usr/lib/squeak/4.4.7-2357/squeakvm
> > -encoding
> > > > UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity
> > > > -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274
> > -vm-sound-pulse
> > > > /usr/share/etoys/etoys.image BUNDLE_PATH
> > > > /usr/share/sugar/activities/Etoys.activity SQUEAKLETS
> > > > /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance
> > BUNDLE_ID
> > > > org.vpri.EtoysActivity ACTIVITY_ID
> > c03be0a816bee1440f701b7d3b504b0968cb3274
> > > >
> > > >
> > > > Seem the script that start squeak is ok, right ?
> > > >
> > >
> > >
> > > Looks like it :-(.  That implies theres a bug in the VM on ubuntu :-(.
> > >  Might it be something to do with the vm-sound-pulse plugin mis-parsing
> > the
> > > command line?  What happens if you start it with no sound (omit
> > > -vm-sound-pulse) ?
> > >
> >
> > After reading this thread, I was initially confused by the command line
> > options that are being passed to the VM:
> >
> >   -encoding UTF-8
> >   -vm-display-x11
> >   -xshm
> >   -sugarBundleId org.vpri.EtoysActivity
> >   -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274
> >   -vm-sound-pulse
> >
> > These are options that are parsed by the VM executable itself, as opposed
> > to being passed to the Etoys image and evaluated there.
> >
> > I took a look at the VM sources, and see that the -sugarBundleId and
> > the -sugarActivityId parameters will be interpreted by the VM executable
> > if and only if the VM was compiled with Sugar support:
> >
> >   #    if defined(SUGAR)
> >         else if (!strcmp(arg, "-sugarBundleId"))   sugarBundleId= argv[1];
> >         else if (!strcmp(arg, "-sugarActivityId")) sugarActivityId=
> > argv[1];
> >   #    endif
> >
> > I expect that if the Etoys image is run from a script that specifies those
> > two VM parameters, and if the VM was not compiled without Sugar support,
> > then the command line parameters are probably going to get out of whack.
> > The dictionary that got turned inside out is probably a side effect of
> > this.
> >
> > So my guess is that the script is trying to run a VM for Etoys in the
> > Sugar environment, but the VM that is being run by that script was not
> > compiled with Sugar support enabled.
> >
> > Dave
> >
> >
> >

>


Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

Gustavo Duarte
Hi guys,

I had tried another approach, I installed "Etoys-To-Go 5.0.1.app" on my Ubuntu, and interaction with Sugar work, as you can see in the following screenshot (http://ubuntuone.com/1Ax7rU0ikfZHH1n0NClzKe) , i can open Journal, but another kind or error raised:


Any idea ?

=========== SqueakDebug.log START ==========
Error: attempt to index non-existent element in an ordered collection
6 December 2013 5:27:52 pm

VM: unix - a SmalltalkImage
Image: etoys5.0 [latest update: #2409]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir /home/gustavo/tmp/Etoys
Trusted Dir /home/gustavo/tmp/.etoys
Untrusted Dir /home/gustavo/tmp/Etoys

OrderedCollection(Object)>>error:
Receiver: an OrderedCollection()
Arguments and temporary variables: 
aString: 'attempt to index non-existent element in an ordered collection'
Receiver's instance variables: 
array: #(nil nil nil nil nil nil nil nil nil nil)
firstIndex: 3
lastIndex: 2

OrderedCollection>>errorNoSuchElement
Receiver: an OrderedCollection()
Arguments and temporary variables: 

Receiver's instance variables: 
array: #(nil nil nil nil nil nil nil nil nil nil)
firstIndex: 3
lastIndex: 2

OrderedCollection>>at:
Receiver: an OrderedCollection()
Arguments and temporary variables: 
anInteger: 1
Receiver's instance variables: 
array: #(nil nil nil nil nil nil nil nil nil nil)
firstIndex: 3
lastIndex: 2

OrderedCollection(SequenceableCollection)>>first
Receiver: an OrderedCollection()
Arguments and temporary variables: 

Receiver's instance variables: 
array: #(nil nil nil nil nil nil nil nil nil nil)
firstIndex: 3
lastIndex: 2


--- The full stack ---
OrderedCollection(Object)>>error:
OrderedCollection>>errorNoSuchElement
OrderedCollection>>at:
OrderedCollection(SequenceableCollection)>>first
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[] in SugarLauncher>>gconfPropertiesAt: {[:entry | props   at: (entry attributeAt: 'name')   put: entry elements firs...]}
XMLElement>>tagsNamed:do:
[] in XMLElement(XMLNode)>>tagsNamed:do: {[:each | each tagsNamed: aSymbol do: aOneArgumentBlock]}
[] in XMLElement(XMLNodeWithElements)>>elementsDo: {[:each | aBlock value: each]}
OrderedCollection>>do:
XMLElement(XMLNodeWithElements)>>elementsDo:
XMLElement(XMLNode)>>tagsNamed:do:
XMLElement>>tagsNamed:do:
[] in XMLDocument(XMLNode)>>tagsNamed:do: {[:each | each tagsNamed: aSymbol do: aOneArgumentBlock]}
[] in XMLDocument(XMLNodeWithElements)>>elementsDo: {[:each | aBlock value: each]}
OrderedCollection>>do:
XMLDocument(XMLNodeWithElements)>>elementsDo:
XMLDocument(XMLNode)>>tagsNamed:do:
[] in SugarLauncher>>gconfPropertiesAt: {[:f |  props := Dictionary new.  (XMLDOMParser parseDocumentFrom: f)   tagsN...]}
[] in FileStream class>>detectFile:do: {[anotherBlock value: file]}
BlockContext>>ensure:
FileStream class>>detectFile:do:
FileStream class>>readOnlyFileNamed:do:
[] in SugarLauncher>>gconfPropertiesAt: {[FileStream   readOnlyFileNamed: dir pathName , '/.gconf' , aString , '/%gco...]}
BlockContext>>on:do:
SugarLauncher>>gconfPropertiesAt:
[] in SugarLauncher>>ownerBuddy {[:ex | ^ SugarBuddyOwner   fromDictionary: (self gconfPropertiesAt: '/deskto...]}
BlockContext>>valueWithPossibleArgs:
[] in MethodContext(ContextPart)>>handleSignal: {[(self tempAt: 2)   valueWithPossibleArgs: {exception}]}
BlockContext>>ensure:
MethodContext(ContextPart)>>handleSignal:
DBusError(Exception)>>signal
DBusError(Exception)>>signal:
DBusError class(Exception class)>>signal:
DBus>>sendDBusMessage:timeout:
DBus>>sendDBusMessage:
SugarPresence(DBusProxy)>>dbusPerform:interface:withArguments:
SugarPresence(DBusProxy)>>dbusPerform:interface:
SugarPresence>>getOwner
[] in SugarLauncher>>ownerBuddy {[^ SugarBuddy fromDictionary: self presence getOwner getProperties]}
BlockContext>>on:do:
SugarLauncher>>ownerBuddy
[] in SugarLauncher>>startUp {[:activityId |  OLPCVirtualScreen setupIfNeeded.  World windowEventHandler: ...]}
Dictionary>>at:ifPresent:
SugarLauncher>>startUp
[] in AutoStart class>>startUp: {[launcher startUp]}
WorldState>>runStepMethodsIn:
PasteUpMorph>>runStepMethods
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
PasteUpMorph>>doOneCycle
[] in Project class>>spawnNewProcess {[[World doOneCycle.  Processor yield.  false] whileFalse.  nil]}
[] in BlockContext>>newProcess {[self value.  Processor terminateActive]}
=========== SqueakDebug.log END  ==========




On Fri, Dec 6, 2013 at 11:57 AM, David T. Lewis <[hidden email]> wrote:
On Fri, Dec 06, 2013 at 10:34:16AM -0200, Gustavo Duarte wrote:
> Dave,
>
> I believe that squeakvm is compiled with Sugar support, because I can run
> Scratch and save projects on Journal, just in case, there is another way to
> know if squeakvm is compiled with Sugar support ?
>

If you run the VM executable directly with the -help option, it will print
a list of available command line options. If the VM was compiled with
Sugar support, the list of X11 options will include this:

  -sugarBundleId <id>   set window property _SUGAR_BUNDLE_ID to <id>
  -sugarActivityId <id> set window property _SUGAR_ACTIVITY_ID to <id>

If the VM does not have this, then it will not handle the command line
option parsing as expected.

As far as I can tell, the Sugar support in the VM is used only to set
some X11 window properties. I am not familiar with Sugar, so I do not
know why this is important, but I would expect that the basic functioning
of Etoys and Squeak would not be affected by this at all. So just for
purposes of testing, you might want to try running Etoys with the following
two parameters removed from the command line:

  -sugarBundleId org.vpri.EtoysActivity
  -sugarActivityId > 24c67ec800d1d71723f959b56a213accf140e7bc

I expect that if you run it this way, then Etoys should start up normally
and the "inverted dictionary" problem will be resolved. This will at
least confirm the problem, then we can figure out what to do to fix it.

Dave


>
> I paste bellow another test I had done:
>
> As Scratch is working well with the interaction with Sugar, I copied the
> same parameters of Scratch starting script, and executed this from a
> terminal as:
>
> sudo /usr/lib/squeak/4.4.7-2357/squeakvm -vm-display-X11 -swapbtn -encoding
> UTF-8 -vm-sound-ALSA -sugarBundleId org.vpri.EtoysActivity -sugarActivityId
> 24c67ec800d1d71723f959b56a213accf140e7bc /usr/share/etoys/etoys.image
> SQUEAKLETS
> /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance/ BUNDLE_ID
> org.vpri.EtoysActivity ACTIVITY_ID 24c67ec800d1d71723f959b56a213accf140e7bc
>
>
>
>
> The output debug log is:
>
>
> =========== SqueakDebug.log START ==========
> Error: No content to install
> 6 December 2013 10:05:27 am
>
> VM: unix - a SmalltalkImage
> Image: etoys5.0 [latest update: #2408]
>
> SecurityManager state:
> Restricted: false
> FileAccess: true
> SocketAccess: true
> Working Dir /usr/share/etoys/My Squeak
> Trusted Dir /usr/share/etoys/secure
> Untrusted Dir /usr/share/etoys/My Squeak
>
> CodeLoader(Object)>>error:
> Receiver: a CodeLoader
> Arguments and temporary variables:
> aString:  'No content to install'
> Receiver's instance variables:
> baseURL:  ''
> sourceFiles:  #(a HTTPDownloadRequest)
> segments:  nil
> publicKey:  nil
>
> CodeLoader>>installSourceFile:
> Receiver: a CodeLoader
> Arguments and temporary variables:
> aStream:  nil
> contents:  nil
> trusted:  nil
> Receiver's instance variables:
> baseURL:  ''
> sourceFiles:  #(a HTTPDownloadRequest)
> segments:  nil
> publicKey:  nil
>
> [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile: req
> contentStream]}
> Arguments and temporary variables:
> req:  a HTTPDownloadRequest
>
> Array(SequenceableCollection)>>do:
> Receiver: #(a HTTPDownloadRequest)
> Arguments and temporary variables:
> aBlock:  [] in CodeLoader>>installSourceFiles {[:req | self
> installSourceFile: r...etc...
> index:  1
> indexLimiT:  1
> Receiver's instance variables:
> #(a HTTPDownloadRequest)
>
>
> --- The full stack ---
> CodeLoader(Object)>>error:
> CodeLoader>>installSourceFile:
> [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile: req
> contentStream]}
> Array(SequenceableCollection)>>do:
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> CodeLoader>>installSourceFiles
> ProjectLauncher>>startUpAfterLogin
> ProjectLauncher>>doEtoyLogin
> ProjectLauncher>>startUp
> [] in AutoStart class>>startUp: {[launcher startUp]}
> WorldState>>runStepMethodsIn:
> PasteUpMorph>>runStepMethods
> WorldState>>doOneCycleNowFor:
> WorldState>>doOneCycleFor:
> PasteUpMorph>>doOneCycle
> [] in Project class>>spawnNewProcess {[[World doOneCycle.  Processor yield.
>  false] whileFalse.  nil]}
> [] in BlockContext>>newProcess {[self value.  Processor terminateActive]}
> =========== SqueakDebug.log END  ==========
>
>
>
> On Fri, Dec 6, 2013 at 12:17 AM, David T. Lewis <[hidden email]> wrote:
>
> > On Thu, Dec 05, 2013 at 02:36:42PM -0800, Eliot Miranda wrote:
> > > On Thu, Dec 5, 2013 at 2:01 PM, Gustavo Duarte
> > > <[hidden email]>wrote:
> > >
> > > > Eliot,
> > > >
> > > > Here the output of ps ww PID command.
> > > >
> > > > XO:
> > > >
> > > > PID TTY      STAT   TIME COMMAND
> > > >   976 ?        S      0:22 /usr/lib/squeak/4.10.2-2614/squeakvm
> > -encoding
> > > > UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity
> > > > -sugarActivityId d25f8c2f9a19397ce914965abf04ed31b3f6b0ea
> > -vm-sound-ALSA
> > > > /usr/share/etoys/etoys.image  BUNDLE_PATH
> > > > /home/olpc/Activities/Etoys.activity SQUEAKLETS
> > > > /home/olpc/.sugar/default/org.vpri.EtoysActivity/instance BUNDLE_ID
> > > > org.vpri.EtoysActivity ACTIVITY_ID
> > d25f8c2f9a19397ce914965abf04ed31b3f6b0ea
> > > >
> > > >
> > > > CM:
> > > >
> > > > PID TTY      STAT   TIME COMMAND
> > > >  5912 ?        Rl     0:06 /usr/lib/squeak/4.4.7-2357/squeakvm
> > -encoding
> > > > UTF-8 -vm-display-x11 -xshm -sugarBundleId org.vpri.EtoysActivity
> > > > -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274
> > -vm-sound-pulse
> > > > /usr/share/etoys/etoys.image BUNDLE_PATH
> > > > /usr/share/sugar/activities/Etoys.activity SQUEAKLETS
> > > > /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance
> > BUNDLE_ID
> > > > org.vpri.EtoysActivity ACTIVITY_ID
> > c03be0a816bee1440f701b7d3b504b0968cb3274
> > > >
> > > >
> > > > Seem the script that start squeak is ok, right ?
> > > >
> > >
> > >
> > > Looks like it :-(.  That implies theres a bug in the VM on ubuntu :-(.
> > >  Might it be something to do with the vm-sound-pulse plugin mis-parsing
> > the
> > > command line?  What happens if you start it with no sound (omit
> > > -vm-sound-pulse) ?
> > >
> >
> > After reading this thread, I was initially confused by the command line
> > options that are being passed to the VM:
> >
> >   -encoding UTF-8
> >   -vm-display-x11
> >   -xshm
> >   -sugarBundleId org.vpri.EtoysActivity
> >   -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274
> >   -vm-sound-pulse
> >
> > These are options that are parsed by the VM executable itself, as opposed
> > to being passed to the Etoys image and evaluated there.
> >
> > I took a look at the VM sources, and see that the -sugarBundleId and
> > the -sugarActivityId parameters will be interpreted by the VM executable
> > if and only if the VM was compiled with Sugar support:
> >
> >   #    if defined(SUGAR)
> >         else if (!strcmp(arg, "-sugarBundleId"))   sugarBundleId= argv[1];
> >         else if (!strcmp(arg, "-sugarActivityId")) sugarActivityId=
> > argv[1];
> >   #    endif
> >
> > I expect that if the Etoys image is run from a script that specifies those
> > two VM parameters, and if the VM was not compiled without Sugar support,
> > then the command line parameters are probably going to get out of whack.
> > The dictionary that got turned inside out is probably a side effect of
> > this.
> >
> > So my guess is that the script is trying to run a VM for Etoys in the
> > Sugar environment, but the VM that is being run by that script was not
> > compiled with Sugar support enabled.
> >
> > Dave
> >
> >
> >

>





Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

David T. Lewis
> Hi guys,
>
> I had tried another approach, I installed "Etoys-To-Go 5.0.1.app" on my
> Ubuntu, and interaction with Sugar work, as you can see in the following
> screenshot (http://ubuntuone.com/1Ax7rU0ikfZHH1n0NClzKe) , i can open
> Journal, but another kind or error raised:
>
>
> Any idea ?
>

Etoys-To-Go is packaged with a VM that is compiled with Sugar support.
When you run the script to start Etoys in Etoys-To-Go, it uses that VM
rather than any other VM that you might have installed separately on your
Ubuntu system. That explains why the startup now works.

The error that you are seeing now is something else. There is some sort of
failure occuring during the image startup. Class SugarLauncher is trying
to do something in its startUp method (that is a method that is sent to
various registered classes as image start time). It looks like it is
trying to retrieve some image from dbus having to do with its "ownerBuddy"
(whatever that is, I don't know). It apparently expects to get some sort
of XML data from dbus, and it's not getting it for some reason.

I'm completely guessing, but this might be just something to do with
starting your Etoys-To-Go directly from the command line, when perhaps the
SugarLauncher was expecting that it was started in some other way. Sorry I
don't know any more about this, but look for some kind of problem related
to Etoys not being able to get this initial information from dbus.

Dave


> =========== SqueakDebug.log START ==========
> Error: attempt to index non-existent element in an ordered collection
> 6 December 2013 5:27:52 pm
>
> VM: unix - a SmalltalkImage
> Image: etoys5.0 [latest update: #2409]
>
> SecurityManager state:
> Restricted: false
> FileAccess: true
> SocketAccess: true
> Working Dir /home/gustavo/tmp/Etoys
> Trusted Dir /home/gustavo/tmp/.etoys
> Untrusted Dir /home/gustavo/tmp/Etoys
>
> OrderedCollection(Object)>>error:
> Receiver: an OrderedCollection()
> Arguments and temporary variables:
> aString: 'attempt to index non-existent element in an ordered collection'
> Receiver's instance variables:
> array: #(nil nil nil nil nil nil nil nil nil nil)
> firstIndex: 3
> lastIndex: 2
>
> OrderedCollection>>errorNoSuchElement
> Receiver: an OrderedCollection()
> Arguments and temporary variables:
>
> Receiver's instance variables:
> array: #(nil nil nil nil nil nil nil nil nil nil)
> firstIndex: 3
> lastIndex: 2
>
> OrderedCollection>>at:
> Receiver: an OrderedCollection()
> Arguments and temporary variables:
> anInteger: 1
> Receiver's instance variables:
> array: #(nil nil nil nil nil nil nil nil nil nil)
> firstIndex: 3
> lastIndex: 2
>
> OrderedCollection(SequenceableCollection)>>first
> Receiver: an OrderedCollection()
> Arguments and temporary variables:
>
> Receiver's instance variables:
> array: #(nil nil nil nil nil nil nil nil nil nil)
> firstIndex: 3
> lastIndex: 2
>
>
> --- The full stack ---
> OrderedCollection(Object)>>error:
> OrderedCollection>>errorNoSuchElement
> OrderedCollection>>at:
> OrderedCollection(SequenceableCollection)>>first
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> [] in SugarLauncher>>gconfPropertiesAt: {[:entry | props   at: (entry
> attributeAt: 'name')   put: entry elements firs...]}
> XMLElement>>tagsNamed:do:
> [] in XMLElement(XMLNode)>>tagsNamed:do: {[:each | each tagsNamed: aSymbol
> do: aOneArgumentBlock]}
> [] in XMLElement(XMLNodeWithElements)>>elementsDo: {[:each | aBlock value:
> each]}
> OrderedCollection>>do:
> XMLElement(XMLNodeWithElements)>>elementsDo:
> XMLElement(XMLNode)>>tagsNamed:do:
> XMLElement>>tagsNamed:do:
> [] in XMLDocument(XMLNode)>>tagsNamed:do: {[:each | each tagsNamed:
> aSymbol
> do: aOneArgumentBlock]}
> [] in XMLDocument(XMLNodeWithElements)>>elementsDo: {[:each | aBlock
> value:
> each]}
> OrderedCollection>>do:
> XMLDocument(XMLNodeWithElements)>>elementsDo:
> XMLDocument(XMLNode)>>tagsNamed:do:
> [] in SugarLauncher>>gconfPropertiesAt: {[:f |  props := Dictionary new.
>  (XMLDOMParser parseDocumentFrom: f)   tagsN...]}
> [] in FileStream class>>detectFile:do: {[anotherBlock value: file]}
> BlockContext>>ensure:
> FileStream class>>detectFile:do:
> FileStream class>>readOnlyFileNamed:do:
> [] in SugarLauncher>>gconfPropertiesAt: {[FileStream   readOnlyFileNamed:
> dir pathName , '/.gconf' , aString , '/%gco...]}
> BlockContext>>on:do:
> SugarLauncher>>gconfPropertiesAt:
> [] in SugarLauncher>>ownerBuddy {[:ex | ^ SugarBuddyOwner
> fromDictionary:
> (self gconfPropertiesAt: '/deskto...]}
> BlockContext>>valueWithPossibleArgs:
> [] in MethodContext(ContextPart)>>handleSignal: {[(self tempAt: 2)
> valueWithPossibleArgs: {exception}]}
> BlockContext>>ensure:
> MethodContext(ContextPart)>>handleSignal:
> DBusError(Exception)>>signal
> DBusError(Exception)>>signal:
> DBusError class(Exception class)>>signal:
> DBus>>sendDBusMessage:timeout:
> DBus>>sendDBusMessage:
> SugarPresence(DBusProxy)>>dbusPerform:interface:withArguments:
> SugarPresence(DBusProxy)>>dbusPerform:interface:
> SugarPresence>>getOwner
> [] in SugarLauncher>>ownerBuddy {[^ SugarBuddy fromDictionary: self
> presence getOwner getProperties]}
> BlockContext>>on:do:
> SugarLauncher>>ownerBuddy
> [] in SugarLauncher>>startUp {[:activityId |  OLPCVirtualScreen
> setupIfNeeded.  World windowEventHandler: ...]}
> Dictionary>>at:ifPresent:
> SugarLauncher>>startUp
> [] in AutoStart class>>startUp: {[launcher startUp]}
> WorldState>>runStepMethodsIn:
> PasteUpMorph>>runStepMethods
> WorldState>>doOneCycleNowFor:
> WorldState>>doOneCycleFor:
> PasteUpMorph>>doOneCycle
> [] in Project class>>spawnNewProcess {[[World doOneCycle.  Processor
> yield.
>  false] whileFalse.  nil]}
> [] in BlockContext>>newProcess {[self value.  Processor terminateActive]}
> =========== SqueakDebug.log END  ==========
>
>
>
>
> On Fri, Dec 6, 2013 at 11:57 AM, David T. Lewis <[hidden email]>
> wrote:
>
>> On Fri, Dec 06, 2013 at 10:34:16AM -0200, Gustavo Duarte wrote:
>> > Dave,
>> >
>> > I believe that squeakvm is compiled with Sugar support, because I can
>> run
>> > Scratch and save projects on Journal, just in case, there is another
>> way
>> to
>> > know if squeakvm is compiled with Sugar support ?
>> >
>>
>> If you run the VM executable directly with the -help option, it will
>> print
>> a list of available command line options. If the VM was compiled with
>> Sugar support, the list of X11 options will include this:
>>
>>   -sugarBundleId <id>   set window property _SUGAR_BUNDLE_ID to <id>
>>   -sugarActivityId <id> set window property _SUGAR_ACTIVITY_ID to <id>
>>
>> If the VM does not have this, then it will not handle the command line
>> option parsing as expected.
>>
>> As far as I can tell, the Sugar support in the VM is used only to set
>> some X11 window properties. I am not familiar with Sugar, so I do not
>> know why this is important, but I would expect that the basic
>> functioning
>> of Etoys and Squeak would not be affected by this at all. So just for
>> purposes of testing, you might want to try running Etoys with the
>> following
>> two parameters removed from the command line:
>>
>>   -sugarBundleId org.vpri.EtoysActivity
>>   -sugarActivityId > 24c67ec800d1d71723f959b56a213accf140e7bc
>>
>> I expect that if you run it this way, then Etoys should start up
>> normally
>> and the "inverted dictionary" problem will be resolved. This will at
>> least confirm the problem, then we can figure out what to do to fix it.
>>
>> Dave
>>
>>
>> >
>> > I paste bellow another test I had done:
>> >
>> > As Scratch is working well with the interaction with Sugar, I copied
>> the
>> > same parameters of Scratch starting script, and executed this from a
>> > terminal as:
>> >
>> > sudo /usr/lib/squeak/4.4.7-2357/squeakvm -vm-display-X11 -swapbtn
>> -encoding
>> > UTF-8 -vm-sound-ALSA -sugarBundleId org.vpri.EtoysActivity
>> -sugarActivityId
>> > 24c67ec800d1d71723f959b56a213accf140e7bc /usr/share/etoys/etoys.image
>> > SQUEAKLETS
>> > /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance/
>> BUNDLE_ID
>> > org.vpri.EtoysActivity ACTIVITY_ID
>> 24c67ec800d1d71723f959b56a213accf140e7bc
>> >
>> >
>> >
>> >
>> > The output debug log is:
>> >
>> >
>> > =========== SqueakDebug.log START ==========
>> > Error: No content to install
>> > 6 December 2013 10:05:27 am
>> >
>> > VM: unix - a SmalltalkImage
>> > Image: etoys5.0 [latest update: #2408]
>> >
>> > SecurityManager state:
>> > Restricted: false
>> > FileAccess: true
>> > SocketAccess: true
>> > Working Dir /usr/share/etoys/My Squeak
>> > Trusted Dir /usr/share/etoys/secure
>> > Untrusted Dir /usr/share/etoys/My Squeak
>> >
>> > CodeLoader(Object)>>error:
>> > Receiver: a CodeLoader
>> > Arguments and temporary variables:
>> > aString:  'No content to install'
>> > Receiver's instance variables:
>> > baseURL:  ''
>> > sourceFiles:  #(a HTTPDownloadRequest)
>> > segments:  nil
>> > publicKey:  nil
>> >
>> > CodeLoader>>installSourceFile:
>> > Receiver: a CodeLoader
>> > Arguments and temporary variables:
>> > aStream:  nil
>> > contents:  nil
>> > trusted:  nil
>> > Receiver's instance variables:
>> > baseURL:  ''
>> > sourceFiles:  #(a HTTPDownloadRequest)
>> > segments:  nil
>> > publicKey:  nil
>> >
>> > [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile:
>> req
>> > contentStream]}
>> > Arguments and temporary variables:
>> > req:  a HTTPDownloadRequest
>> >
>> > Array(SequenceableCollection)>>do:
>> > Receiver: #(a HTTPDownloadRequest)
>> > Arguments and temporary variables:
>> > aBlock:  [] in CodeLoader>>installSourceFiles {[:req | self
>> > installSourceFile: r...etc...
>> > index:  1
>> > indexLimiT:  1
>> > Receiver's instance variables:
>> > #(a HTTPDownloadRequest)
>> >
>> >
>> > --- The full stack ---
>> > CodeLoader(Object)>>error:
>> > CodeLoader>>installSourceFile:
>> > [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile:
>> req
>> > contentStream]}
>> > Array(SequenceableCollection)>>do:
>> >  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> > CodeLoader>>installSourceFiles
>> > ProjectLauncher>>startUpAfterLogin
>> > ProjectLauncher>>doEtoyLogin
>> > ProjectLauncher>>startUp
>> > [] in AutoStart class>>startUp: {[launcher startUp]}
>> > WorldState>>runStepMethodsIn:
>> > PasteUpMorph>>runStepMethods
>> > WorldState>>doOneCycleNowFor:
>> > WorldState>>doOneCycleFor:
>> > PasteUpMorph>>doOneCycle
>> > [] in Project class>>spawnNewProcess {[[World doOneCycle.  Processor
>> yield.
>> >  false] whileFalse.  nil]}
>> > [] in BlockContext>>newProcess {[self value.  Processor
>> terminateActive]}
>> > =========== SqueakDebug.log END  ==========
>> >
>> >
>> >
>> > On Fri, Dec 6, 2013 at 12:17 AM, David T. Lewis <[hidden email]>
>> wrote:
>> >
>> > > On Thu, Dec 05, 2013 at 02:36:42PM -0800, Eliot Miranda wrote:
>> > > > On Thu, Dec 5, 2013 at 2:01 PM, Gustavo Duarte
>> > > > <[hidden email]>wrote:
>> > > >
>> > > > > Eliot,
>> > > > >
>> > > > > Here the output of ps ww PID command.
>> > > > >
>> > > > > XO:
>> > > > >
>> > > > > PID TTY      STAT   TIME COMMAND
>> > > > >   976 ?        S      0:22 /usr/lib/squeak/4.10.2-2614/squeakvm
>> > > -encoding
>> > > > > UTF-8 -vm-display-x11 -xshm -sugarBundleId
>> org.vpri.EtoysActivity
>> > > > > -sugarActivityId d25f8c2f9a19397ce914965abf04ed31b3f6b0ea
>> > > -vm-sound-ALSA
>> > > > > /usr/share/etoys/etoys.image  BUNDLE_PATH
>> > > > > /home/olpc/Activities/Etoys.activity SQUEAKLETS
>> > > > > /home/olpc/.sugar/default/org.vpri.EtoysActivity/instance
>> BUNDLE_ID
>> > > > > org.vpri.EtoysActivity ACTIVITY_ID
>> > > d25f8c2f9a19397ce914965abf04ed31b3f6b0ea
>> > > > >
>> > > > >
>> > > > > CM:
>> > > > >
>> > > > > PID TTY      STAT   TIME COMMAND
>> > > > >  5912 ?        Rl     0:06 /usr/lib/squeak/4.4.7-2357/squeakvm
>> > > -encoding
>> > > > > UTF-8 -vm-display-x11 -xshm -sugarBundleId
>> org.vpri.EtoysActivity
>> > > > > -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274
>> > > -vm-sound-pulse
>> > > > > /usr/share/etoys/etoys.image BUNDLE_PATH
>> > > > > /usr/share/sugar/activities/Etoys.activity SQUEAKLETS
>> > > > > /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance
>> > > BUNDLE_ID
>> > > > > org.vpri.EtoysActivity ACTIVITY_ID
>> > > c03be0a816bee1440f701b7d3b504b0968cb3274
>> > > > >
>> > > > >
>> > > > > Seem the script that start squeak is ok, right ?
>> > > > >
>> > > >
>> > > >
>> > > > Looks like it :-(.  That implies theres a bug in the VM on ubuntu
>> :-(.
>> > > >  Might it be something to do with the vm-sound-pulse plugin
>> mis-parsing
>> > > the
>> > > > command line?  What happens if you start it with no sound (omit
>> > > > -vm-sound-pulse) ?
>> > > >
>> > >
>> > > After reading this thread, I was initially confused by the command
>> line
>> > > options that are being passed to the VM:
>> > >
>> > >   -encoding UTF-8
>> > >   -vm-display-x11
>> > >   -xshm
>> > >   -sugarBundleId org.vpri.EtoysActivity
>> > >   -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274
>> > >   -vm-sound-pulse
>> > >
>> > > These are options that are parsed by the VM executable itself, as
>> opposed
>> > > to being passed to the Etoys image and evaluated there.
>> > >
>> > > I took a look at the VM sources, and see that the -sugarBundleId and
>> > > the -sugarActivityId parameters will be interpreted by the VM
>> executable
>> > > if and only if the VM was compiled with Sugar support:
>> > >
>> > >   #    if defined(SUGAR)
>> > >         else if (!strcmp(arg, "-sugarBundleId"))   sugarBundleId=
>> argv[1];
>> > >         else if (!strcmp(arg, "-sugarActivityId")) sugarActivityId=
>> > > argv[1];
>> > >   #    endif
>> > >
>> > > I expect that if the Etoys image is run from a script that specifies
>> those
>> > > two VM parameters, and if the VM was not compiled without Sugar
>> support,
>> > > then the command line parameters are probably going to get out of
>> whack.
>> > > The dictionary that got turned inside out is probably a side effect
>> of
>> > > this.
>> > >
>> > > So my guess is that the script is trying to run a VM for Etoys in
>> the
>> > > Sugar environment, but the VM that is being run by that script was
>> not
>> > > compiled with Sugar support enabled.
>> > >
>> > > Dave
>> > >
>> > >
>> > >
>>
>> >
>>
>>
>>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: Interaction with Sugar on Ubuntu.

Bert Freudenberg
Wow, I've been so busy this week I missed this thread ... thanks everyone for chiming in :)

On 2013-12-06, at 22:28, David T. Lewis <[hidden email]> wrote:

>> Hi guys,
>>
>> I had tried another approach, I installed "Etoys-To-Go 5.0.1.app" on my
>> Ubuntu, and interaction with Sugar work, as you can see in the following
>> screenshot (http://ubuntuone.com/1Ax7rU0ikfZHH1n0NClzKe) , i can open
>> Journal, but another kind or error raised:
>>
>>
>> Any idea ?
>>
>
> Etoys-To-Go is packaged with a VM that is compiled with Sugar support.
> When you run the script to start Etoys in Etoys-To-Go, it uses that VM
> rather than any other VM that you might have installed separately on your
> Ubuntu system. That explains why the startup now works.
>
> The error that you are seeing now is something else. There is some sort of
> failure occuring during the image startup. Class SugarLauncher is trying
> to do something in its startUp method (that is a method that is sent to
> various registered classes as image start time). It looks like it is
> trying to retrieve some image from dbus having to do with its "ownerBuddy"
> (whatever that is, I don't know). It apparently expects to get some sort
> of XML data from dbus, and it's not getting it for some reason.

Almost. It's trying the "old way" of asking for the user name ("ownerBuddy") via DBus. This fails on newer Sugar versions, so in the error handler it then tries to use gconf to find the user name. It's reading .gconf/desktop/sugar/user/%gconf.xml and expects to find a "name" tag in it. Apparently that fails.

As for your startup problems, you appear to be missing an empty argument following the image argument. That is taken by Etoys as a "startup" document. After this empty argument there are additional arguments, like SQUEAKLETS etc.:

        ... /usr/share/etoys/etoys.image "" SQUEAKLETS ...

If you look at /usr/bin/etoys, it uses

        "$VM" -plugins "$BIN" $VMOPTIONS "$IMAGE" "$DOCUMENT" $IMOPTIONS

and "$DOCUMENT" is that startup document. It must be present, even if empty, if there are other image options following.

HTH,

- Bert -

> I'm completely guessing, but this might be just something to do with
> starting your Etoys-To-Go directly from the command line, when perhaps the
> SugarLauncher was expecting that it was started in some other way. Sorry I
> don't know any more about this, but look for some kind of problem related
> to Etoys not being able to get this initial information from dbus.
>
> Dave
>
>
>> =========== SqueakDebug.log START ==========
>> Error: attempt to index non-existent element in an ordered collection
>> 6 December 2013 5:27:52 pm
>>
>> VM: unix - a SmalltalkImage
>> Image: etoys5.0 [latest update: #2409]
>>
>> SecurityManager state:
>> Restricted: false
>> FileAccess: true
>> SocketAccess: true
>> Working Dir /home/gustavo/tmp/Etoys
>> Trusted Dir /home/gustavo/tmp/.etoys
>> Untrusted Dir /home/gustavo/tmp/Etoys
>>
>> OrderedCollection(Object)>>error:
>> Receiver: an OrderedCollection()
>> Arguments and temporary variables:
>> aString: 'attempt to index non-existent element in an ordered collection'
>> Receiver's instance variables:
>> array: #(nil nil nil nil nil nil nil nil nil nil)
>> firstIndex: 3
>> lastIndex: 2
>>
>> OrderedCollection>>errorNoSuchElement
>> Receiver: an OrderedCollection()
>> Arguments and temporary variables:
>>
>> Receiver's instance variables:
>> array: #(nil nil nil nil nil nil nil nil nil nil)
>> firstIndex: 3
>> lastIndex: 2
>>
>> OrderedCollection>>at:
>> Receiver: an OrderedCollection()
>> Arguments and temporary variables:
>> anInteger: 1
>> Receiver's instance variables:
>> array: #(nil nil nil nil nil nil nil nil nil nil)
>> firstIndex: 3
>> lastIndex: 2
>>
>> OrderedCollection(SequenceableCollection)>>first
>> Receiver: an OrderedCollection()
>> Arguments and temporary variables:
>>
>> Receiver's instance variables:
>> array: #(nil nil nil nil nil nil nil nil nil nil)
>> firstIndex: 3
>> lastIndex: 2
>>
>>
>> --- The full stack ---
>> OrderedCollection(Object)>>error:
>> OrderedCollection>>errorNoSuchElement
>> OrderedCollection>>at:
>> OrderedCollection(SequenceableCollection)>>first
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> [] in SugarLauncher>>gconfPropertiesAt: {[:entry | props   at: (entry
>> attributeAt: 'name')   put: entry elements firs...]}
>> XMLElement>>tagsNamed:do:
>> [] in XMLElement(XMLNode)>>tagsNamed:do: {[:each | each tagsNamed: aSymbol
>> do: aOneArgumentBlock]}
>> [] in XMLElement(XMLNodeWithElements)>>elementsDo: {[:each | aBlock value:
>> each]}
>> OrderedCollection>>do:
>> XMLElement(XMLNodeWithElements)>>elementsDo:
>> XMLElement(XMLNode)>>tagsNamed:do:
>> XMLElement>>tagsNamed:do:
>> [] in XMLDocument(XMLNode)>>tagsNamed:do: {[:each | each tagsNamed:
>> aSymbol
>> do: aOneArgumentBlock]}
>> [] in XMLDocument(XMLNodeWithElements)>>elementsDo: {[:each | aBlock
>> value:
>> each]}
>> OrderedCollection>>do:
>> XMLDocument(XMLNodeWithElements)>>elementsDo:
>> XMLDocument(XMLNode)>>tagsNamed:do:
>> [] in SugarLauncher>>gconfPropertiesAt: {[:f |  props := Dictionary new.
>> (XMLDOMParser parseDocumentFrom: f)   tagsN...]}
>> [] in FileStream class>>detectFile:do: {[anotherBlock value: file]}
>> BlockContext>>ensure:
>> FileStream class>>detectFile:do:
>> FileStream class>>readOnlyFileNamed:do:
>> [] in SugarLauncher>>gconfPropertiesAt: {[FileStream   readOnlyFileNamed:
>> dir pathName , '/.gconf' , aString , '/%gco...]}
>> BlockContext>>on:do:
>> SugarLauncher>>gconfPropertiesAt:
>> [] in SugarLauncher>>ownerBuddy {[:ex | ^ SugarBuddyOwner
>> fromDictionary:
>> (self gconfPropertiesAt: '/deskto...]}
>> BlockContext>>valueWithPossibleArgs:
>> [] in MethodContext(ContextPart)>>handleSignal: {[(self tempAt: 2)
>> valueWithPossibleArgs: {exception}]}
>> BlockContext>>ensure:
>> MethodContext(ContextPart)>>handleSignal:
>> DBusError(Exception)>>signal
>> DBusError(Exception)>>signal:
>> DBusError class(Exception class)>>signal:
>> DBus>>sendDBusMessage:timeout:
>> DBus>>sendDBusMessage:
>> SugarPresence(DBusProxy)>>dbusPerform:interface:withArguments:
>> SugarPresence(DBusProxy)>>dbusPerform:interface:
>> SugarPresence>>getOwner
>> [] in SugarLauncher>>ownerBuddy {[^ SugarBuddy fromDictionary: self
>> presence getOwner getProperties]}
>> BlockContext>>on:do:
>> SugarLauncher>>ownerBuddy
>> [] in SugarLauncher>>startUp {[:activityId |  OLPCVirtualScreen
>> setupIfNeeded.  World windowEventHandler: ...]}
>> Dictionary>>at:ifPresent:
>> SugarLauncher>>startUp
>> [] in AutoStart class>>startUp: {[launcher startUp]}
>> WorldState>>runStepMethodsIn:
>> PasteUpMorph>>runStepMethods
>> WorldState>>doOneCycleNowFor:
>> WorldState>>doOneCycleFor:
>> PasteUpMorph>>doOneCycle
>> [] in Project class>>spawnNewProcess {[[World doOneCycle.  Processor
>> yield.
>> false] whileFalse.  nil]}
>> [] in BlockContext>>newProcess {[self value.  Processor terminateActive]}
>> =========== SqueakDebug.log END  ==========
>>
>>
>>
>>
>> On Fri, Dec 6, 2013 at 11:57 AM, David T. Lewis <[hidden email]>
>> wrote:
>>
>>> On Fri, Dec 06, 2013 at 10:34:16AM -0200, Gustavo Duarte wrote:
>>>> Dave,
>>>>
>>>> I believe that squeakvm is compiled with Sugar support, because I can
>>> run
>>>> Scratch and save projects on Journal, just in case, there is another
>>> way
>>> to
>>>> know if squeakvm is compiled with Sugar support ?
>>>>
>>>
>>> If you run the VM executable directly with the -help option, it will
>>> print
>>> a list of available command line options. If the VM was compiled with
>>> Sugar support, the list of X11 options will include this:
>>>
>>>  -sugarBundleId <id>   set window property _SUGAR_BUNDLE_ID to <id>
>>>  -sugarActivityId <id> set window property _SUGAR_ACTIVITY_ID to <id>
>>>
>>> If the VM does not have this, then it will not handle the command line
>>> option parsing as expected.
>>>
>>> As far as I can tell, the Sugar support in the VM is used only to set
>>> some X11 window properties. I am not familiar with Sugar, so I do not
>>> know why this is important, but I would expect that the basic
>>> functioning
>>> of Etoys and Squeak would not be affected by this at all. So just for
>>> purposes of testing, you might want to try running Etoys with the
>>> following
>>> two parameters removed from the command line:
>>>
>>>  -sugarBundleId org.vpri.EtoysActivity
>>>  -sugarActivityId > 24c67ec800d1d71723f959b56a213accf140e7bc
>>>
>>> I expect that if you run it this way, then Etoys should start up
>>> normally
>>> and the "inverted dictionary" problem will be resolved. This will at
>>> least confirm the problem, then we can figure out what to do to fix it.
>>>
>>> Dave
>>>
>>>
>>>>
>>>> I paste bellow another test I had done:
>>>>
>>>> As Scratch is working well with the interaction with Sugar, I copied
>>> the
>>>> same parameters of Scratch starting script, and executed this from a
>>>> terminal as:
>>>>
>>>> sudo /usr/lib/squeak/4.4.7-2357/squeakvm -vm-display-X11 -swapbtn
>>> -encoding
>>>> UTF-8 -vm-sound-ALSA -sugarBundleId org.vpri.EtoysActivity
>>> -sugarActivityId
>>>> 24c67ec800d1d71723f959b56a213accf140e7bc /usr/share/etoys/etoys.image
>>>> SQUEAKLETS
>>>> /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance/
>>> BUNDLE_ID
>>>> org.vpri.EtoysActivity ACTIVITY_ID
>>> 24c67ec800d1d71723f959b56a213accf140e7bc
>>>>
>>>>
>>>>
>>>>
>>>> The output debug log is:
>>>>
>>>>
>>>> =========== SqueakDebug.log START ==========
>>>> Error: No content to install
>>>> 6 December 2013 10:05:27 am
>>>>
>>>> VM: unix - a SmalltalkImage
>>>> Image: etoys5.0 [latest update: #2408]
>>>>
>>>> SecurityManager state:
>>>> Restricted: false
>>>> FileAccess: true
>>>> SocketAccess: true
>>>> Working Dir /usr/share/etoys/My Squeak
>>>> Trusted Dir /usr/share/etoys/secure
>>>> Untrusted Dir /usr/share/etoys/My Squeak
>>>>
>>>> CodeLoader(Object)>>error:
>>>> Receiver: a CodeLoader
>>>> Arguments and temporary variables:
>>>> aString:  'No content to install'
>>>> Receiver's instance variables:
>>>> baseURL:  ''
>>>> sourceFiles:  #(a HTTPDownloadRequest)
>>>> segments:  nil
>>>> publicKey:  nil
>>>>
>>>> CodeLoader>>installSourceFile:
>>>> Receiver: a CodeLoader
>>>> Arguments and temporary variables:
>>>> aStream:  nil
>>>> contents:  nil
>>>> trusted:  nil
>>>> Receiver's instance variables:
>>>> baseURL:  ''
>>>> sourceFiles:  #(a HTTPDownloadRequest)
>>>> segments:  nil
>>>> publicKey:  nil
>>>>
>>>> [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile:
>>> req
>>>> contentStream]}
>>>> Arguments and temporary variables:
>>>> req:  a HTTPDownloadRequest
>>>>
>>>> Array(SequenceableCollection)>>do:
>>>> Receiver: #(a HTTPDownloadRequest)
>>>> Arguments and temporary variables:
>>>> aBlock:  [] in CodeLoader>>installSourceFiles {[:req | self
>>>> installSourceFile: r...etc...
>>>> index:  1
>>>> indexLimiT:  1
>>>> Receiver's instance variables:
>>>> #(a HTTPDownloadRequest)
>>>>
>>>>
>>>> --- The full stack ---
>>>> CodeLoader(Object)>>error:
>>>> CodeLoader>>installSourceFile:
>>>> [] in CodeLoader>>installSourceFiles {[:req | self installSourceFile:
>>> req
>>>> contentStream]}
>>>> Array(SequenceableCollection)>>do:
>>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>>> CodeLoader>>installSourceFiles
>>>> ProjectLauncher>>startUpAfterLogin
>>>> ProjectLauncher>>doEtoyLogin
>>>> ProjectLauncher>>startUp
>>>> [] in AutoStart class>>startUp: {[launcher startUp]}
>>>> WorldState>>runStepMethodsIn:
>>>> PasteUpMorph>>runStepMethods
>>>> WorldState>>doOneCycleNowFor:
>>>> WorldState>>doOneCycleFor:
>>>> PasteUpMorph>>doOneCycle
>>>> [] in Project class>>spawnNewProcess {[[World doOneCycle.  Processor
>>> yield.
>>>> false] whileFalse.  nil]}
>>>> [] in BlockContext>>newProcess {[self value.  Processor
>>> terminateActive]}
>>>> =========== SqueakDebug.log END  ==========
>>>>
>>>>
>>>>
>>>> On Fri, Dec 6, 2013 at 12:17 AM, David T. Lewis <[hidden email]>
>>> wrote:
>>>>
>>>>> On Thu, Dec 05, 2013 at 02:36:42PM -0800, Eliot Miranda wrote:
>>>>>> On Thu, Dec 5, 2013 at 2:01 PM, Gustavo Duarte
>>>>>> <[hidden email]>wrote:
>>>>>>
>>>>>>> Eliot,
>>>>>>>
>>>>>>> Here the output of ps ww PID command.
>>>>>>>
>>>>>>> XO:
>>>>>>>
>>>>>>> PID TTY      STAT   TIME COMMAND
>>>>>>>  976 ?        S      0:22 /usr/lib/squeak/4.10.2-2614/squeakvm
>>>>> -encoding
>>>>>>> UTF-8 -vm-display-x11 -xshm -sugarBundleId
>>> org.vpri.EtoysActivity
>>>>>>> -sugarActivityId d25f8c2f9a19397ce914965abf04ed31b3f6b0ea
>>>>> -vm-sound-ALSA
>>>>>>> /usr/share/etoys/etoys.image  BUNDLE_PATH
>>>>>>> /home/olpc/Activities/Etoys.activity SQUEAKLETS
>>>>>>> /home/olpc/.sugar/default/org.vpri.EtoysActivity/instance
>>> BUNDLE_ID
>>>>>>> org.vpri.EtoysActivity ACTIVITY_ID
>>>>> d25f8c2f9a19397ce914965abf04ed31b3f6b0ea
>>>>>>>
>>>>>>>
>>>>>>> CM:
>>>>>>>
>>>>>>> PID TTY      STAT   TIME COMMAND
>>>>>>> 5912 ?        Rl     0:06 /usr/lib/squeak/4.4.7-2357/squeakvm
>>>>> -encoding
>>>>>>> UTF-8 -vm-display-x11 -xshm -sugarBundleId
>>> org.vpri.EtoysActivity
>>>>>>> -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274
>>>>> -vm-sound-pulse
>>>>>>> /usr/share/etoys/etoys.image BUNDLE_PATH
>>>>>>> /usr/share/sugar/activities/Etoys.activity SQUEAKLETS
>>>>>>> /home/gustavo-cm1/.sugar/default/org.vpri.EtoysActivity/instance
>>>>> BUNDLE_ID
>>>>>>> org.vpri.EtoysActivity ACTIVITY_ID
>>>>> c03be0a816bee1440f701b7d3b504b0968cb3274
>>>>>>>
>>>>>>>
>>>>>>> Seem the script that start squeak is ok, right ?
>>>>>>>
>>>>>>
>>>>>>
>>>>>> Looks like it :-(.  That implies theres a bug in the VM on ubuntu
>>> :-(.
>>>>>> Might it be something to do with the vm-sound-pulse plugin
>>> mis-parsing
>>>>> the
>>>>>> command line?  What happens if you start it with no sound (omit
>>>>>> -vm-sound-pulse) ?
>>>>>>
>>>>>
>>>>> After reading this thread, I was initially confused by the command
>>> line
>>>>> options that are being passed to the VM:
>>>>>
>>>>>  -encoding UTF-8
>>>>>  -vm-display-x11
>>>>>  -xshm
>>>>>  -sugarBundleId org.vpri.EtoysActivity
>>>>>  -sugarActivityId c03be0a816bee1440f701b7d3b504b0968cb3274
>>>>>  -vm-sound-pulse
>>>>>
>>>>> These are options that are parsed by the VM executable itself, as
>>> opposed
>>>>> to being passed to the Etoys image and evaluated there.
>>>>>
>>>>> I took a look at the VM sources, and see that the -sugarBundleId and
>>>>> the -sugarActivityId parameters will be interpreted by the VM
>>> executable
>>>>> if and only if the VM was compiled with Sugar support:
>>>>>
>>>>>  #    if defined(SUGAR)
>>>>>        else if (!strcmp(arg, "-sugarBundleId"))   sugarBundleId=
>>> argv[1];
>>>>>        else if (!strcmp(arg, "-sugarActivityId")) sugarActivityId=
>>>>> argv[1];
>>>>>  #    endif
>>>>>
>>>>> I expect that if the Etoys image is run from a script that specifies
>>> those
>>>>> two VM parameters, and if the VM was not compiled without Sugar
>>> support,
>>>>> then the command line parameters are probably going to get out of
>>> whack.
>>>>> The dictionary that got turned inside out is probably a side effect
>>> of
>>>>> this.
>>>>>
>>>>> So my guess is that the script is trying to run a VM for Etoys in
>>> the
>>>>> Sugar environment, but the VM that is being run by that script was
>>> not
>>>>> compiled with Sugar support enabled.
>>>>>
>>>>> Dave
>>>>>
>>>>>
>>>>>
>>>
>>>>
>>>
>>>
>>>
>>
>>
>
>
>

- Bert -



12