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