preStartUp ordering problem (8.6.3)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

preStartUp ordering problem (8.6.3)

Hans-Martin Mosner-3
Hello,
I am currently unable to build a working XD image with 8.6.3 due to a preStartUp ordering problem.
OSStructures need to have their definitions regenerated during CorePI class>>#preStartUp, and they use the variables such as IsWinNT and isSunOS do decide which definition to initialize (see OSAddrInfo class>>#regenerateDefinition for an example).
In an XD image, by the time these methods are called, the variables are still nil, because they will be initialized in XPlatformExtensions class>>#preStartUp which comes later in the sequence.
To me it looks like this would make building working XD images basically impossible - is there some fix for this?
Of course I can implement a dirty hack by calling "XPlatformExtensions preStartUp" from CorePI class>>#preStartUp but I'd prefer an official solution :-)

Cheers,
Hans-Martin

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: preStartUp ordering problem (8.6.3)

Hans-Martin Mosner-3
(actually, I mixed up preStartUp with the initializeAfterLoad that is being called from xdImageInitialize, but basically the problem is the same)

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: preStartUp ordering problem (8.6.3)

Seth Berman
Hello Hans-Martin,

We are aware of this issue...it's exactly as you say...a preStartUp ordering problem.
The fix is to avoid the PlatformGlobals and use prim calls instead to get the same info when at preStartUp

Try using the following definitions instead
OSAddrInfo class>>regenerateDefinition
System osType = 'Linux'
ifFalse: [
self
members: #(#aiFlags #aiFamily #aiSocktype #aiProtocol #aiAddrlen #aiCanonname #aiAddr #aiNext)
types: #(#int32 #int32 #int32 #int32 #usize #pointer #pointer #pointer) ]
ifTrue: [
self
members: #(#aiFlags #aiFamily #aiSocktype #aiProtocol #aiAddrlen #aiAddr #aiCanonname #aiNext)
types: #(#int32 #int32 #int32 #int32 #usize #pointer #pointer #pointer) ]


OSSocketAddrInet6 class>>regenerateDefinition
     (System is64BitVM and: [ (System osType = 'WIN32_NT') not ])
ifTrue: [
self 
members: #(#family #port #flowinfo #addr #scopeId)
types: #(#int16 #uint16 #uint64 #'uint8[16]' #uint64) ]
ifFalse: [ 
self 
members: #(#family #port #flowinfo #addr #scopeId)
types: #(#int16 #uint16 #uint32 #'uint8[16]' #uint32) ]



On Thursday, September 28, 2017 at 9:18:20 AM UTC-4, Hans-Martin Mosner wrote:
(actually, I mixed up preStartUp with the initializeAfterLoad that is being called from xdImageInitialize, but basically the problem is the same)

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.