<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks for the explanation Nicolas.  I thought maybe it was something
like that, and should have said I didn't necessarily consider it a bug,
but its good to get that confirmation.<br>
<br>
Eliot wrote:<br>
&gt; What's the image, the OS and the VM version?<br>
<br>
The referenced zip [1]  has image and VM packaged together.<br>
<br>
* Image = Pharo3.0 Latest update: #30846 Unnamed<br>
<br>
* VM = NBCoInterpreter NativeBoost-CogPlugin-GuillermoPolito.19 uuid:
acc98e51-2fba-4841-a965-2975997bba66 Dec  7 2013<br>
NBCogit NativeBoost-CogPlugin-GuillermoPolito.19 uuid:
acc98e51-2fba-4841-a965-2975997bba66 Dec  7 2013<br>
<a class="moz-txt-link-freetext" href="https://github.com/pharo-project/pharo-vm.git">https://github.com/pharo-project/pharo-vm.git</a> Commit:
71adca113a9aff2876288927e5c1c86bf7ac13e2 Date: 2013-12-07 05:00:47
-0800 By: Philippe Back <a class="moz-txt-link-rfc2396E" href="mailto:philippeback@gmail.com">&lt;philippeback@gmail.com&gt;</a> Jenkins build
#14776<br>
<br>
* OS = Windows 7 Home Premium 64-bit SP1<br>
<br>
[1] <a class="moz-txt-link-freetext" href="http://files.pharo.org/platform/Pharo3.0-win.zip">http://files.pharo.org/platform/Pharo3.0-win.zip</a><br>
<br>
cheers -ben<br>
<br>
Nicolas Cellier wrote:
<blockquote
 cite="mid:CAKnRiT4gwWJR4P0D+5sd9geddDpz+fGe_XQ8GqSHfSneA_0ftw@mail.gmail.com"
 type="cite">
  <pre wrap=""> </pre>
  <hr size="4" width="90%"><br>
  <div dir="ltr"><br>
  <div class="gmail_extra"><br>
  <br>
  <div class="gmail_quote">2014-05-05 19:53 GMT+02:00 Nicolas Cellier <span
 dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>&gt;</span>:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div dir="ltr"><br>
    <div class="gmail_extra"><br>
    <br>
    <div class="gmail_quote">2014-05-05 19:27 GMT+02:00 Ben Coman <span
 dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:btc@openinworld.com" target="_blank">btc@openinworld.com</a>&gt;</span>:<br>
    <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br>
      <div bgcolor="#ffffff" text="#000000">Just reporting, while
looking into a query on [pharo-users] (which is
attached for initial context only and can probably be deleted from any
replies) I managed to crash the VM by evaluating the following in
Workspace:<br>
      <br>
a := SequenceableCollection new.<br>
a add: 1.<br>
a , SequenceableCollection new.<br>
      <br>
Now the interesting thing is that while the system becomes immediately
sluggish, Pharo.exe crashes about 20 seconds later. <br>
      <br>
This is with Pharo 3.0 Release (30846)
      <a moz-do-not-send="true"
 href="http://files.pharo.org/platform/Pharo3.0-win.zip" target="_blank">http://files.pharo.org/platform/Pharo3.0-win.zip</a>
(dated 2014-04-30)<br>
on Windows Home Premium 64-bit SP1.<br>
      <br>
cheers -ben<br>
      <br>
      </div>
    </blockquote>
    <div><br>
    </div>
    <div>SequenceableCollection is supposed to be abstract.<br>
    </div>
    <div>above code causes an infinite loop because size is implemented
in terms of do: and do: sends size.<br>
    </div>
    </div>
    </div>
    </div>
  </blockquote>
  <div><br>
  </div>
  <div>Note that the VM terminates with an out of memory, but it seems
that the infinite loop is triggered while logging the debugger call
stack in a file, and this logging seems to be performed in background
now, thus the sluggish behavior.<br>
  <br>
  </div>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div dir="ltr">
    <div class="gmail_extra">
    <div class="gmail_quote">
    <div> <br>
    </div>
    <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
      <div bgcolor="#ffffff" text="#000000">Ben Coman wrote:
      <blockquote type="cite"> <br>
Thanks. That info made it much easier to try.  Sorry I didn't end up
with an answer for you, but I confirm there is some issue here, or
something new I can learn when other chip in. <br>
        <br>
Here is what I tried.<br>
        <br>
* Installed XMLParser (monty.58) from Configuration Browser in Pharo 3.<br>
        <br>
* Ran your code. Got the same error.<br>
        <br>
* From the call stack I observed that
XMLOrderedCollection(SequenceableCollection)&gt;&gt;copyReplaceFrom:to:with:<br>
has the line "newSequenceableCollection := self species new: newSize."
such that it seems your error might be reduced to the question of why
the following two snippets fail:<br>
    d := OrderedCollection new: 1.<br>
    d at: 1 put: 1.<br>
        <br>
    e := OrderedCollection new: 3.<br>
    e at: 2 put: 1.<br>
        <br>
However I'm sorry that is beyond my knowledge, and I'm hoping someone
else can chip in so I can learn something.<br>
        <br>
Pushing on, I noticed that XMLOrderedList has an instance variable
/collection/ which holds the OrderedCollection.<br>
        <br>
Now I wonder (without great experience and hoping to learn something)
if it smells funny that XMLOrderedList inherits all of
SequencableCollection methods that can not operate on /collection/. <br>
        <br>
I noticed that XMLOrderedList was using an
inherited SequenceableCollection&gt;&gt;copyReplaceFrom:to:with <br>
while OrderedCollection overrode that method with its own. So taking
inspiration XMLOrderedList&gt;&gt;copyFrom:to: to override
SequencableCollection&gt;&gt;copyReplaceFrom:to:with: to work with
/collection/<br>
seems to solve your problem:<br>
    XMLOrderedList&gt;&gt;copyReplaceFrom: start to: stop with:
replacementCollection <br>
        ^ self newWithCollection:<br>
            (collection copyReplaceFrom: start to: stop with:
replacementCollection )<br>
        <br>
        <br>
Along the way I noticed a few (possible) bugs that seems not related to
your problem:<br>
        <br>
* When stepping through XMLOrderedList&gt;&gt;setCollection:<br>
there is a red-box-of-death for the instance variables, which can be
solved by defining the following.<br>
    XMLOrderedList&gt;&gt;size<br>
        ^ collection ifNil: [ 0 ] ifNotNil: [ collection size]<br>
        <br>
* In the debugger the /collection/ instance variable is not shown!
(e.g. line XMLOrderedList&gt;&gt;at:put:). <br>
Can someone confirm this should show?<br>
        <br>
HTH<br>
cheers -ben<br>
        <br>
Thushar G R wrote:
        <blockquote type="cite">
          <div dir="ltr"><span
 style="font-family: arial,sans-serif; font-size: 13px;">XMLOrderedList</span> belongs
to package XML-Parser-Nodes.<br>
          <div><span
 style="font-family: arial,sans-serif; font-size: 13px;"><br>
          </span></div>
          <div><span
 style="font-family: arial,sans-serif; font-size: 13px;">a
:= XMLOrderedList new.</span></div>
          <span style="font-family: arial,sans-serif; font-size: 13px;">a
add:'1'.</span><br
 style="font-family: arial,sans-serif; font-size: 13px;">
          <span style="font-family: arial,sans-serif; font-size: 13px;">a
,
XMLOrderedList new.</span>
          <div><span
 style="font-family: arial,sans-serif; font-size: 13px;"><br>
          </span></div>
          <div><span
 style="font-family: arial,sans-serif; font-size: 13px;">Here
select all and Do it. On line 3 (</span><span
 style="font-family: arial,sans-serif; font-size: 13px;">a ,
XMLOrderedList new.</span><span
 style="font-family: arial,sans-serif; font-size: 13px;">)  i am
expected to get a copy of 'a' , but instead it throws an error </span><font
 face="arial, sans-serif">SubscriptOutOfBounds. </font></div>
          <div><font face="arial, sans-serif"><br>
          </font></div>
          <div><font face="arial, sans-serif"><br>
          </font></div>
          <div><font face="arial, sans-serif"><br>
          </font></div>
          <div><font face="arial, sans-serif"><br>
          </font></div>
          <div><font face="arial, sans-serif">
          <div>OrderedCollection(Object)&gt;&gt;errorSubscriptBounds:</div>
          <div>OrderedCollection&gt;&gt;ensureBoundsFrom:to:</div>
          <div>OrderedCollection&gt;&gt;at:put:</div>
          <div>OrderedCollection(SequenceableCollection)&gt;&gt;replaceFrom:to:with:startingAt:</div>
          <div>XMLOrderedList&gt;&gt;replaceFrom:to:with:startingAt:</div>
          <div>XMLOrderedList(SequenceableCollection)&gt;&gt;copyReplaceFrom:to:with:</div>
          <div>XMLOrderedList(SequenceableCollection)&gt;&gt;,</div>
          <div>UndefinedObject&gt;&gt;DoIt</div>
          <div>OpalCompiler&gt;&gt;evaluate</div>
          <div>SmalltalkEditor&gt;&gt;evaluateSelectionAndDo:</div>
          <div>PluggableTextMorph&gt;&gt;inspectIt in Block: [
textMorph
editor
evaluateSelectionAndDo: [ :resu...etc...</div>
          <div>PluggableTextMorph&gt;&gt;handleEdit: in Block: [ result
:=
editBlock value ]</div>
          <div>TextMorphForEditView(TextMorph)&gt;&gt;handleEdit:</div>
          <div>PluggableTextMorph&gt;&gt;handleEdit:</div>
          <div>PluggableTextMorph&gt;&gt;inspectIt</div>
          <div>SmalltalkEditor
class&gt;&gt;buildSmalltalkEditorKeymappingsOn:
in Block: [ :morph | morph inspectIt ]</div>
          <div>BlockClosure&gt;&gt;cull:</div>
          <div>BlockClosure&gt;&gt;cull:cull:</div>
          <div>BlockClosure&gt;&gt;cull:cull:cull:</div>
          <div>KMCategoryBinding&gt;&gt;completeMatch:buffer:</div>
          <div>KMKeymap&gt;&gt;notifyCompleteMatchTo:buffer: in Block:
[ :l |
l
completeMatch: self buffer: aBuffer ]</div>
          <div>Array(SequenceableCollection)&gt;&gt;do:</div>
          <div>KMKeymap&gt;&gt;notifyCompleteMatchTo:buffer:</div>
          <div>KMKeymap&gt;&gt;onMatchWith:notify:andDo:</div>
          <div>KMCategory&gt;&gt;onMatchWith:notify:andDo: in Block: [
:entry
|
entry onMatchWith: anEventBuffer notify...etc...</div>
          <div>Set&gt;&gt;do:</div>
          <div>KMCategory&gt;&gt;onMatchWith:notify:andDo:</div>
          <div>KMCategoryBinding&gt;&gt;verifyMatchWith:notifying:thenDoing:</div>
          <div>KMDispatcher&gt;&gt;dispatch: in Block: [ :aTarget | ...</div>
          <div>OrderedCollection&gt;&gt;do:</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>Plese refer to the above stack.</div>
          <div><br>
          </div>
          <div>Thanks in advance.</div>
          <div><br>
          </div>
          <div>thushar</div>
          </font></div>
          </div>
          <div class="gmail_extra"><br>
          <br>
          <div class="gmail_quote">On Mon, May 5, 2014 at 6:28 PM, Ben
Coman <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:btc@openinworld.com" target="_blank">btc@openinworld.com</a>&gt;</span>
wrote:<br>
          <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
            <div>
            <div>Thushar G R wrote:<br>
            <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
              <br>
I am getting an error while doing this.<br>
              <br>
a := XMLOrderedList new.<br>
a add:'1'.<br>
a , XMLOrderedList new.<br>
              <br>
Thanks,<br>
              <br>
Thushar<br>
            </blockquote>
            </div>
            </div>
I could give you "an answer" ;) - but it would be what you wanted.  It
would help if you told what the error was, where it occurs (which of
the three lines), and what you expect each line is doing (especially
the third line).<br>
            <br>
Also I don't see XMLOrderedList in the default Pharo image, so it would
help if you describe where you got that from and how you installed it.<br>
            <br>
cheers -ben<br>
            <br>
          </blockquote>
          </div>
          <br>
          </div>
        </blockquote>
        <br>
      </blockquote>
      <br>
      </div>
      <br>
    </blockquote>
    </div>
    <br>
    </div>
    </div>
  </blockquote>
  </div>
  <br>
  </div>
  </div>
</blockquote>
<br>
</body>
</html>