Hi Fuel kept throwing strange errors at me the last couple of days. I now found that IdentitySet>>size is not correct for some instances in the image and canât be fixed with #rehash (checked with newest image on newest PharoVM). I noticed that #rehash only replaces âarray' while âtallyâ stays untouched (but âtallyâ holds the wrong sizeâ¦). Notice that all those instances seem to be related to tests (their elements are all Metaclass objects of test classes). Hereâs how to get the (16) corrupted instances: IdentitySet allInstances select: [ :e | e size ~= (e collect: #yourself) size ] Why this causes problems for Fuel: During serialization the IdentitySet size is stored and later its objects. During that step, #do: will evaluate the block less often than it should, based on size (e.g. size is 3, but âarrayâ only holds 2 objects). During materialization all the offsets after an IdentitySet object in the stream are off because of this. FogBugz issue: https://pharo.fogbugz.com/f/cases/13026/IdentitySet-size-reports-wrong-size Cheers, Max
On 02.03.2014, at 20:12, Andres Valloud <avalloud@smalltalk.comcastbiz.net> wrote:
So it seems the problem is with Fuel rather than IdentitySet, no?
No. Asking an IdentitySet for its size is not reliable. That has nothing to do with Fuel. #size is especially important in hashed collections where the size is stored in a variable and thus allows fast access the size without the need to visit every element in the collection for its computation.
On 3/2/14 10:47 , Max Leske wrote:
During serialization the IdentitySet size is stored and later its objects. During that step, #do:
So, just out of curiosity, how does the IdentitySet get "damaged"? On 3/2/14 11:28 , Max Leske wrote:
On 02.03.2014, at 20:12, Andres Valloud <avalloud@smalltalk.comcastbiz.net> wrote:
So it seems the problem is with Fuel rather than IdentitySet, no?
No. Asking an IdentitySet for its size is not reliable. That has nothing to do with Fuel. #size is especially important in hashed collections where the size is stored in a variable and thus allows fast access the size without the need to visit every element in the collection for its computation.
On 3/2/14 10:47 , Max Leske wrote:
During serialization the IdentitySet size is stored and later its objects. During that step, #do:
On 02.03.2014, at 22:55, Andres Valloud <avalloud@smalltalk.comcastbiz.net> wrote:
So, just out of curiosity, how does the IdentitySet get "damagedâ?
Thatâs what Iâd like to know too :) Nicolai posted an update to the issue which should shed some light on the problem. But at the moment I have no clue. Iâm hoping that somebody has worked with those tests and knows something.
On 3/2/14 11:28 , Max Leske wrote:
On 02.03.2014, at 20:12, Andres Valloud <avalloud@smalltalk.comcastbiz.net> wrote:
So it seems the problem is with Fuel rather than IdentitySet, no?
No. Asking an IdentitySet for its size is not reliable. That has nothing to do with Fuel. #size is especially important in hashed collections where the size is stored in a variable and thus allows fast access the size without the need to visit every element in the collection for its computation.
On 3/2/14 10:47 , Max Leske wrote:
During serialization the IdentitySet size is stored and later its objects. During that step, #do:
participants (2)
-
Andres Valloud -
Max Leske