[squeak-dev] Cog file reading-while-writing problem on Mac OS
bert at freudenbergs.de
Wed Oct 19 16:15:38 UTC 2011
I had this several times now. During updating, a notifier would pop up suggesting the sources file was not found. Selecting the file in the popup would always fix it.
Similar symptom when I was generating code which involved reading the old source. This sometimes would return nil:
oldSource := (aClass >> selector) getSourceFromFile.
This fixed it:
n := 0.
[oldSource := (aClass >> selector) getSourceFromFile.
oldSource isNil] whileTrue: [(Delay forMilliseconds: 100) wait. (n := n + 1) > 10 ifTrue: [self halt]].
The halt was never triggered.
Just reading the file is no problem. It appears to only manifest with the interleaved reading and writing that's happening when logging stuff to the changes file while also accessing old method sources.
In the updating scenario, #readOnlyCopy would return nil. The getSourceFromFile problem sounds similar.
I have seen this on Lion, others on Snow Leopard. Any idea?
Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.128] Croquet Cog 4.0.0
Mac OS X built on Sep 28 2011 13:20:56 Compiler: 4.2.1 (Apple Inc. build 5666) (dot 3)
platform sources revision r2496 http://www.squeakvm.org/svn/squeak/branches/Cog
CoInterpreter VMMaker.oscog-eem.128 uuid: 314823f6-cd6c-468f-9183-843b558f630b Sep 28 2011
StackToRegisterMappingCogit VMMaker.oscog-eem.128 uuid: 314823f6-cd6c-468f-9183-843b558f630b Sep 28 2011
Loaded VM Modules
B2DPlugin VMMaker.oscog-eem.69 (i)
BitBltPlugin VMMaker.oscog-eem.115 (i)
DropPlugin VMMaker-oscog.40 (i)
FilePlugin VMMaker.oscog-eem.97 (i)
FloatArrayPlugin VMMaker-oscog.40 (e)
GeziraBindings bf.18 15 June 2011 (e)
InternetConfigPlugin VMMaker-oscog.40 (i)
LargeIntegers v1.5 VMMaker.oscog-eem.72 (i)
LocalePlugin VMMaker-oscog.40 (i)
Matrix2x3Plugin VMMaker-oscog.40 (i)
MiscPrimitivePlugin VMMaker-oscog.40 (i)
SecurityPlugin VMMaker-oscog.40 (i)
SocketPlugin VMMaker-oscog.40 (i)
SoundGenerationPlugin VMMaker.oscog-eem.97 (i)
SoundPlugin VMMaker-oscog.54 (i)
UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.31 (e)
ZipPlugin VMMaker-oscog.40 (i)
- Bert -
More information about the Squeak-dev