I've written some tests and have the following to report: serializing / materializing Environments is not a problem at all. Even serializing / materializing a shallow copy of "Smalltalk globals" works. The only thing that doesn't work is the materialization of that specific instance of Environment that is returned by "Smalltalk globals". The only difference between that instance and a shallow copy of it is the set of references TO each instance, right? But that shouldn't make any difference to Fuel (AFAIK).
Mariano, Martin? Any ideas?
I attached the tests.
On 14.02.2013, at 16:30, Max Leske maxleske@gmail.com wrote:
On 14.02.2013, at 16:15, Frank Shearar frank.shearar@gmail.com wrote:
On 14 February 2013 10:30, Martin Dias tinchodias@gmail.com wrote:
Hi Just looking at the test that is failing (#testSmalltalkGlobals) and the error (a DoIt method can't be materialized), it makes me wonder why a method is being serialized in this method. There is the problem, I guess.
To reproduce what the test is serializing you can inspect:
| anObject aStream | anObject := Smalltalk globals. aStream := (MultiByteBinaryOrTextStream on: '') binary.
(FLSerializer newDefault serialize: anObject on: aStream) objects.
I get this in Pharo:
an Array(a SystemDictionary(lots of globals) true false nil)
What does `Smalltalk globals` return in Pharo? Does it directly match what #objects returns?
A SystemDictionary (IdentityDictionary) that matches symbols to classes or globals. (That's in 1.4)
What do you get?
Maybe it has to be with the environment? I have no idea of that.
It might. I get an Array with a whole pile of stuff. I _don't_ have a SystemDirectory with a bunch of stuff; I see symbols, associations, classes, ...
So it might be that these two tests no longer make sense in Squeak 4.5? `Smalltalk globals` is an Environment in Squeak 4.5. Do things need custom serialisers/deserialisers?
I think they still make sense. The Smalltalk global still does contain classes and globals but grouped better (correct?). Usually, there's no need for custom serialization if an object inherits from Object (and that seems to be the case with Environment AFAICT). In any case, it should be possible without problems to serialize Enviroments, so the best thing would be to first write a test that asserts serializability / materializability of Environemnt and then go from there. I'll write one later this afternoon.
Max
frank
Best regards, Martin
On Wed, Feb 13, 2013 at 10:56 AM, Frank Shearar frank.shearar@gmail.com wrote:
On 13 February 2013 08:45, Max Leske maxleske@gmail.com wrote:
(I'm reposting this without the screen shots because the message was bounced for being to big…)
Frank,
I took a 4.4 image, pointed it to trunk and updated. Running the tests (CogVM) I do get the same two failures but with slightly different entries on the top of the stack. These entries vary depenging on which other tests are run simultaneously. However, they all seem to have in common, that they fail during #rehash. The point of failure is probably more or less random. I attached screen shots of the stack traces.
Stepping through the debugger, it looks like the problem might acutally occurr during serialization. If you look at the third screen shot you'll see that the instance variable "array" of the IdentityDictionary does not contain any associations and the array you see is actually the value of the association (see StandardScriptingSystem>>addCustomEventFor:name:help:targetMorphClass:).
I'll try to find out more.
Thanks for looking into this, Max. If you want to precisely (modulo operating system) reproduce the setup causing the issue you can run "./run-test.sh Fuel" once you've checked out https://github.com/frankshearar/squeak-ci/. You might need to comment out the `WorldState addDeferredUIMessage: [ SmalltalkImage current snapshot: false andQuit: true ].` line.
frank
Cheers, Max
On 12.02.2013, at 17:09, Frank Shearar frank.shearar@gmail.com wrote:
On 8 January 2013 07:21, Max Leske maxleske@gmail.com wrote:
On 07.01.2013, at 12:09, Frank Shearar frank.shearar@gmail.com wrote:
On 7 January 2013 10:42, Max Leske maxleske@gmail.com wrote:
Could somone please update the SqueakMap release with the following:
Installer ss3 project: 'Fuel'; install: 'ConfigurationOfFuel-MarianoMartinezPeck.179'. (Smalltalk at: #ConfigurationOfFuel) load.
I tried to do it myself but I get a connection timeout (i did create a SqueakMap account for that a few minutes ago).
Done. The 1.8.1 version now uses the above installation.
Thanks Frank.
I added a CI job that loads Fuel into a Trunk image and, in a post Environments-fbs.13 world, we have Fuel almost perfectly working in 4.5. "Almost" means two test failures: http://build.squeak.org/job/ExternalPackage-Fuel/6/#showFailuresLink
Judging by the error message, they're failing for the same reason.
Any ideas?
#1: Error Message
Materialization error. Method UndefinedObject>>#DoIt not found. Stacktrace
[] in FLGlobalCompiledMethodCluster>>materializeInstanceWith: MethodDictionary>>at:ifAbsent: UndefinedObject class(Behavior)>>compiledMethodAt:ifAbsent: FLGlobalCompiledMethodCluster>>materializeInstanceWith: FLGlobalCompiledMethodCluster(FLIteratingCluster)>>materializeInstancesStepWith: FLMaterialization>>clusterInstancesStep [] in FLMaterialization>>instancesStep SmallInteger(Integer)>>timesRepeat: FLMaterialization>>instancesStep FLMaterialization>>run [] in FLMaterializer>>setDefaultMaterialization FLMaterializer>>materializeFrom: [] in FLBasicSerializationTest(FLSerializationTest)>>materialization FLMultiByteStreamStrategy>>readStreamDo: FLBasicSerializationTest(FLSerializationTest)>>materialization FLBasicSerializationTest(FLSerializationTest)>>materialized FLBasicSerializationTest(FLSerializationTest)>>resultOfSerializeAndMaterialize: FLBasicSerializationTest(FLSerializationTest)>>assertSerializationIdentityOf: FLBasicSerializationTest>>testSmalltalkGlobals FLBasicSerializationTest(TestCase)>>performTest
#2: Error Message
Materialization error. Method UndefinedObject>>#DoIt not found. Stacktrace
[] in FLGlobalCompiledMethodCluster>>materializeInstanceWith: MethodDictionary>>at:ifAbsent: UndefinedObject class(Behavior)>>compiledMethodAt:ifAbsent: FLGlobalCompiledMethodCluster>>materializeInstanceWith: FLGlobalCompiledMethodCluster(FLIteratingCluster)>>materializeInstancesStepWith: FLMaterialization>>clusterInstancesStep [] in FLMaterialization>>instancesStep SmallInteger(Integer)>>timesRepeat: FLMaterialization>>instancesStep FLMaterialization>>run [] in FLMaterializer>>setDefaultMaterialization FLMaterializer>>materializeFrom: FLMaterializer class>>materializeFromByteArray: FLInMemoryBasicSerializationTest>>materialized FLInMemoryBasicSerializationTest(FLSerializationTest)>>resultOfSerializeAndMaterialize: FLInMemoryBasicSerializationTest(FLSerializationTest)>>assertSerializationIdentityOf: FLInMemoryBasicSerializationTest(FLBasicSerializationTest)>>testSmalltalkGlobals FLInMemoryBasicSerializationTest(TestCase)>>performTest
frank