Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006952 [Squeak Packages] FFI major always 02-26-08 08:00 04-08-10 14:32
Reporter tween View Status public  
Assigned To andreas
Priority normal Resolution open  
Status assigned  
Summary 0006952: FFI fails to load in sq3.10-7159dev08.02.1
Description ExternalStructure class implements doneCompiling, and doneCompiling is sent during the MC1.5 loading process.
(specifically - it is sent from ClassBuilder>>name:inEnvironment:subclassOf:type:instanceVariableNames:classVariableNames:poolDictionaries:category:unsafe: )

ExternalStructure class>>doneCompiling then calls ExternalType class>>noticeModificationOf: , which then accesses its StructTypes class var.
But ExternalType hasn't been sent #initialize yet, so its StructTypes class var is nil.

I presume that the MC1.0 loader loads/initializes things in a different order, which is why the problem doesn't occur in a standard 3.10 image.

To workaround the problem, and get FFI loaded, I hacked ClassBuilder>>name:inEnvironment:subclassOf:type:instanceVariableNames:classVariableNames:poolDictionaries:category:unsafe: so that errors occuring during doneCompiling are ignored. (hacked method attached).
FFI then loads ok from Universes, and seems to function correctly.
Additional Information error :

VM: Mac OS - a SmalltalkImage
Image: Squeak3.10beta [latest update: 0007159]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir /mySqueakStuff/Sqkb/Sqkb3.10/sq3.10-7159dev08.02.1
Trusted Dir /foobar/tooBar/forSqueak/bogus
Untrusted Dir /Users/kbrownMPro/Library/Preferences/Squeak/Internet/My Squeak

UndefinedObject(Object)>>doesNotUnderstand: #at:ifAbsent:
Receiver: nil
Arguments and temporary variables:
aMessage: at: #ExternalStructure ifAbsent: [] in ExternalType class>>noticeModi...etc...
Receiver's instance variables:
nil

[] in ExternalType class>>noticeModificationOf: {[:cls | type := StructTypes at: cls name ifAbsent: []. type ifNo...]}
Arguments and temporary variables:
aClass: ExternalStructure
type: nil
cls: ExternalStructure

ExternalStructure class(Behavior)>>withAllSubclassesDo:
Receiver: ExternalStructure
Arguments and temporary variables:
aBlock: [] in ExternalType class>>noticeModificationOf: {[:cls | type := Struc...etc...
Receiver's instance variables:
superclass: ExternalObject
methodDict: a MethodDictionary(#free->a CompiledMethod (1328) #longPrintOn:->a ...etc...
format: 132
instanceVariables: nil
organization: ('as yet unclassified')

subclasses: {ExternalData}
name: #ExternalStructure
classPool: nil
sharedPools: an OrderedCollection(FFIConstants)
environment: a SystemDictionary(lots of globals)
category: #'FFI-Kernel'
traitComposition: {}
localSelectors: nil
compiledSpec: nil

ExternalType class>>noticeModificationOf:
Receiver: ExternalType
Arguments and temporary variables:
aClass: ExternalStructure
type: nil
cls: ExternalStructure
Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary(#asNonPointerType->a CompiledMethod (3691) #asPo...etc...
format: 136
instanceVariables: #('compiledSpec' 'referentClass' 'referencedType')
organization: ('as yet unclassified')

subclasses: nil
name: #ExternalType
classPool: a Dictionary(#AtomicSelectors->nil #AtomicTypeNames->nil #AtomicType...etc...
sharedPools: an OrderedCollection(FFIConstants)
environment: a SystemDictionary(lots of globals)
category: #'FFI-Kernel'
traitComposition: {}
localSelectors: nil


--- The full stack ---
UndefinedObject(Object)>>doesNotUnderstand: #at:ifAbsent:
[] in ExternalType class>>noticeModificationOf: {[:cls | type := StructTypes at: cls name ifAbsent: []. type ifNo...]}
ExternalStructure class(Behavior)>>withAllSubclassesDo:
ExternalType class>>noticeModificationOf:
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ExternalStructure class>>doneCompiling
[] in ClassBuilder>>name:inEnvironment:subclassOf:type:instanceVariableNames:classVariableNames:poolDictionaries:category:unsafe: {[unsafe ifFalse: [(self validateSuperclass: newSuper forSubclass: oldClass...]}
BlockContext>>ensure:
ClassBuilder>>name:inEnvironment:subclassOf:type:instanceVariableNames:classVariableNames:poolDictionaries:category:unsafe:
ClassBuilder>>name:inEnvironment:subclassOf:type:instanceVariableNames:classVariableNames:poolDictionaries:category:
MCClassDefinition>>createUnionClassWith:
MCClassDefinition>>postinstall
[] in MCPackageLoader1b>>basicLoad {[:ea | ea postinstall]}
OrderedCollection>>do:
MCPackageLoader1b>>basicLoad
[] in MCPackageLoader1b>>protectedLoad {[self basicLoad]}
BlockContext>>on:do:
[] in MCPackageLoader1b>>protectedLoad {[[self basicLoad] on: InMidstOfFileinNotification do: [:n | n resume: tr...]}
BlockContext>>ensure:
[] in MCPackageLoader1b>>protectedLoad {[[[self basicLoad] on: InMidstOfFileinNotification do: [:n | n resume: t...]}
BlockContext>>on:do:
MCPackageLoader1b>>protectedLoad
[] in MCPackageLoader1b>>loadWithNameLike: {[self protectedLoad]}
[] in MCPackageLoader1b>>useChangeSetNamed:during: {[aBlock value]}
BlockContext>>ensure:
MCPackageLoader1b>>useChangeSetNamed:during:
MCPackageLoader1b>>useNewChangeSetNamedLike:during:
MCPackageLoader1b>>loadWithNameLike:
MCVersionLoader>>loadWithNameLike:
MCVersionLoader>>load
MCVersionLoader class>>loadVersion:
MCVersion>>load
[] in UndefinedObject>>DoIt {[:t2 :t3 | t1 value: t2 * 2 - 1. reader := repo versionReaderForFileNamed:...]}
Array(SequenceableCollection)>>keysAndValuesDo:
[] in UndefinedObject>>DoIt {[:t1 | #('FFI-Kernel-ar.8.mcz' 'FFI-Tests-ar.2.mcz' 'FFI-Examples-ar.1.mcz' ...]}
...etc...

Attached Files  ClassBuilder-nameinEnvironmentsubclassOftypeinstanceVariableNamesclassVariableNamespoolDictionariescategoryunsafe.st [^] (3,957 bytes) 02-26-08 08:00

- Relationships

SYSTEM WARNING: Creating default object from empty value

related to 0006953closed Keith_Hodges Squeak package preambles and postscripts are not being run by MC1.5 loader in sq3.10-7159dev08.02.1 
has duplicate 0006970closed tween Squeak Packages FreeType plus 0.5 - non initialized StructTypes ? 
has duplicate 0007006assigned andreas Squeak Packages Fix loading FFI with MC 1.5. 

- Notes
(0011872 - 210 - 210 - 210 - 210 - 210 - 210)
KenCausey
02-26-08 18:40

Andrew: please always choose a category when you submit an issue. Of course if you can't find a category then leave it as Any and I will decide what I think it should be and create a new category if necessary.
 
(0011874 - 65 - 65 - 65 - 65 - 65 - 65)
andreas
02-26-08 18:51

Does someone know what exactly changed in MC to cause this issue?
 
(0011875 - 127 - 127 - 127 - 270 - 270 - 270)
KenCausey
02-26-08 19:34

Andreas: Check the related issue 0006953 which Andrew mentioned in his issue. I just added that relationship after your request.
 
(0011876 - 14 - 14 - 14 - 14 - 14 - 14)
KenCausey
02-26-08 19:34

s/issue/email/
 
(0012265 - 62 - 62 - 62 - 62 - 62 - 62)
Keith_Hodges
06-07-08 01:38

Should be fixed in latest MC1.5 thanks to an idea from Andreas
 

- Issue History
Date Modified Username Field Change
02-26-08 08:00 tween New Issue
02-26-08 08:00 tween Status new => assigned
02-26-08 08:00 tween Assigned To  => KenCausey
02-26-08 08:00 tween File Added: ClassBuilder-nameinEnvironmentsubclassOftypeinstanceVariableNamesclassVariableNamespoolDictionariescategoryunsafe.st
02-26-08 18:39 KenCausey Assigned To KenCausey => andreas
02-26-08 18:39 KenCausey Category Any => FFI
02-26-08 18:40 KenCausey Note Added: 0011872
02-26-08 18:51 andreas Note Added: 0011874
02-26-08 19:33 KenCausey Relationship added related to 0006953
02-26-08 19:34 KenCausey Note Added: 0011875
02-26-08 19:34 KenCausey Note Added: 0011876
03-02-08 17:59 tween Relationship added has duplicate 0006970
06-06-08 21:08 matthewf Issue Monitored: matthewf
06-06-08 23:51 matthewf Relationship added duplicate of 0007005
06-06-08 23:52 matthewf Relationship deleted duplicate of 0007005
06-06-08 23:52 matthewf Relationship added related to 0007006
06-06-08 23:53 matthewf Relationship replaced duplicate of 0007006
06-07-08 00:00 matthewf Relationship replaced has duplicate 0007006
06-07-08 01:37 Keith_Hodges Assigned To andreas => Keith_Hodges
06-07-08 01:38 Keith_Hodges Note Added: 0012265
10-26-08 02:06 Keith_Hodges Status assigned => feedback
10-03-09 19:34 Keith_Hodges Status feedback => assigned
10-03-09 19:34 Keith_Hodges Assigned To Keith_Hodges => andreas
04-08-10 14:32 laza Project Squeak => Squeak Packages


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
87 total queries executed.
50 unique queries executed.
Powered by Mantis Bugtracker