Should WeakArray species = WeakArray? [was Who is creating short-lived Symbol?]

nicolas cellier ncellier at ifrance.com
Sat Dec 15 11:14:55 UTC 2007


WeakSetInspector bug has nothing to do with short-lived Symbols.
Short-lived Symbols are created in NewSymbols, which avoid coetly rehash 
of SymbolTable. So creating short-lived Symbol is not a problem.

Problem is that WeakSetInspector collect: a WeakArray...
Since WeakArray species = WeakArray, slot indices are put in a WeakArray 
which leads to vanishing fieldList.
See http://bugs.squeak.org/view.php?id=6812

That raise the question: should WeakArray species = WeakArray?
Some guru advice required please.

Nicolas

nicolas cellier a écrit :
> I traced creation of Symbol with
>     Transcript cr; show: aStringOrSymbol storeString.
> in Symbol class>>#intern:
> and got:
> 
> 'weakSetInspectorWindowColor'
> 'setInspectorWindowColor'
> 'inspectorWindowColor'
> 'weakSetInspectorWindowColor'
> 'setInspectorWindowColor'
> 'inspectorWindowColor'
> 
> Seems like the WeakSetInspector is killing itself...
> 
> Nicolas
> 
> nicolas cellier a écrit :
>> A propos, auto-updating inspector are not always working that well...
>> Try to inspect a WeakSet like:
>>
>>     (Symbol classPool at: #SymbolTable) inspect.
>>
>> Scroll a little, the inspector flashes once or more and you end up 
>> with a debugger saying 'Error: subscript is out of bounds: 687'.
>> Well that is for sure a bug.
>>
>> I'am pretty sure some Symbol are created on the fly then reclaimed, 
>> and cause this error. But that makes me wonder why?
>> Is it really a good idea to create short lived Symbols?
>> Or is it another bug?
>> There are too many senders of asSymbol for me to understand...
>> Anyone has a clue?
>>
>> Nicolas
>>
>> Herbert König a écrit :
>>>
>>> A> Playing around with a few things, I missed the option to "dive into"
>>> A> an element from an Inspector and then "pop" back out to the 
>>> previously
>>> A> inspected object(s), so I modified the Inspector class to add those
>>>
>>> Try the explorer instead of the inspector. Be careful, it doesn't auto
>>> update while the inspector does.
>>>
>>> A> options. Is something like that useful enough to submit the code
>>> A> somewhere for others to load? Or am I re-inventing the wheel and
>>> A> someone's already done that?
>>>
>>> You can decide after trying the explorer (anyOldObject explore).
>>>
>>> I myself am on 3.8 so take everything I said with a grain of salt.
>>>
>>> Cheers
>>>
>>> Herbert                            mailto:herbertkoenig at gmx.net
>>>
>>>
>>>
>>
>>
>>
> 
> 
> 




More information about the Squeak-dev mailing list