bug in delay?
mdc at keko.com.ar
mdc at keko.com.ar
Tue Jan 6 16:56:36 UTC 2004
Hi John
> Yes, and the AccessProtect critical: [
> part is should prevent the sorted collection referred to by
> SuspendedDelays from being altered as the add: is being run on the
> object.
>
> So, either:
> a) the critical: is failing to work?
> b) AccessProtect is getting excessive semaphore signals from
> somewhere, somehow?
> c) SuspendedDelays is being altered outside of a AccessProtect
> critical: block.?
>
> My casual look this morning doesn't appear to show case (c) being true.
> I've not considered cases (a) or (b), and I could have missed
> an issue with (c)
>
> However could it be image change related? Doing a Semaphore
> allInstances do: [:s | s signal] could have interesting side effects...
>
> Then again some other eyes should look and see if they can see the
> wrong assumption that has been made?
I 'don't know , ;)
my first look (c) cases don't occur.
is it posible that SortedCollection doesn't work in some conditions ?
My app usses Delay heavily the follow snip is used many times.
[ ( Delay forMilliseconds: 20 ) wait.
self doSomeThing ] repeat.
when the error occurs the stack trace tries to insert one instance , Delay
in schedule and the current procces is added: sentence ( see
Delay>>schedule)
>> SuspendedDelay add: ActiveDelay}. <<
SuspendedDelay is correct receiver is SortedCollection instance and looks ok,the
add: colaboration i sortedCollection look this
add: newObject
^ super insert: newObject before: ( self indexForInserting: newObject)
SortedCollection uses one Array ( internal colaborator) and
OrderedCollection>> insert: anObject before: spot
.
.
.
array replaceFrom: ... fail
take a look at log stack trace .
Error: subscript is out of bounds: 21
5 January 2004 9:01:05 am
VM: Win32 - Squeak3.6 of '6 October 2003' [latest update: #5424]
Image: Squeak3.6 [latest update: #5424]
Array(Object)>>error:
Receiver: #(nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
a Delay nil nil)
Arguments and temporary variables:
aString: 'subscript is out of bounds: 21'
Receiver's instance variables:
#(nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil a Delay
nil nil)
Array(Object)>>errorSubscriptBounds:
Receiver: #(nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
a Delay nil nil)
Arguments and temporary variables:
index: 21
Receiver's instance variables:
#(nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil a Delay
nil nil)
Array(Object)>>at:
Receiver: #(nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
a Delay nil nil)
Arguments and temporary variables:
index: 21
Receiver's instance variables:
#(nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil a Delay
nil nil)
Array(SequenceableCollection)>>replaceFrom:to:with:startingAt:
Receiver: #(nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
a Delay nil nil)
Arguments and temporary variables:
start: 19
stop: 22
replacement: #(nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
nil ...etc...
repStart: 20
index: 20
repOff: 1
Receiver's instance variables:
#(nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil a Delay
nil nil)
--- The full stack ---
Array(Object)>>error:
Array(Object)>>errorSubscriptBounds:
Array(Object)>>at:
Array(SequenceableCollection)>>replaceFrom:to:with:startingAt:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Array>>replaceFrom:to:with:startingAt:
SortedCollection(OrderedCollection)>>insert:before:
is it useful?
Best regards
Marcelo Diaz Cortez
-------------------------------------------------
¿Todavía no navegás con Keko?
Hacé click aquí: http://www.keko.com.ar
More information about the Squeak-dev
mailing list
|