[squeak-dev] OSProcess on Windows

Chris Muller asqueaker at gmail.com
Thu Jun 9 20:22:17 UTC 2011


Thanks for the replies.  I am, indeed, able to load OSProcess, but I
can't seem to get OSProcess command: to work.

I've have this app which has always worked in the past - it generates
'mybatchfile.bat' in the image directory, and then simply uses
OSProcess command: to execute it.

But there seems to be some problem with my configuration - I've pasted
my system information below.  Cog ships with Win32OSProcessPlugin.dll
(which unzipped to only 3564 bytes), but could it does not appear in
my "Loaded VM Modules", below.  Is that an indication of what might be
wrong?

Sorry I'm so dumb about this - very thanks for your help.

 - Chris

PS - I also tried with the old 3.10.4 Interpreter VM, but then
realized I would need to use a corresponding old version of
Wind32OSProcessPlugin.dll..


Image
-----
C:\Chris\development\Squeak\_testosprocess.image
Squeak4.2
latest update: #11451
Current Change Set: Unnamed1

Virtual Machine
---------------
C:\squeak\Croquet.exe
Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.56]
Win32 built on Apr 26 2011 18:23:49 Compiler: 3.4.4 (cygming special,
gdc 0.12, using dmd 0.125)
CoInterpreter VMMaker.oscog-eem.56 uuid:
fbf17bd2-ddbc-488f-b70d-3b9ba8906430 Apr 26 2011
StackToRegisterMappingCogit VMMaker-oscog.51 uuid:
d213bf61-5898-475b-8a5c-e4a9bdad2415 Apr 26 2011

Loaded VM Modules
-----------------
B2DPlugin VMMaker-oscog.40 (i)
BitBltPlugin VMMaker-oscog.40 (i)
FilePlugin VMMaker-oscog.40 (i)
FloatArrayPlugin VMMaker-oscog.40 (i)
LargeIntegers v1.5 VMMaker-oscog.40 (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)

Debug Logfile
-------------
C:\Chris\development\Squeak\SqueakDebug.log

MessageNotUnderstood: UndefinedObject>>nextPutAll:
9 June 2011 3:01:52.785 pm

VM: Win32 - Smalltalk
Image: Squeak4.2 [latest update: #11451]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir C:\Chris\development\Squeak
Trusted Dir C:\Chris\development\Squeak\cmm
Untrusted Dir C:\Documents and Settings\cmm\My Documents\My Squeak

UndefinedObject(Object)>>doesNotUnderstand: #nextPutAll:
	Receiver: nil
	Arguments and temporary variables:
		aMessage: 	nextPutAll: 'cannot execute dir'
		exception: 	MessageNotUnderstood: UndefinedObject>>nextPutAll:
		resumeValue: 	nil
	Receiver's instance variables:
nil
ExternalWindowsOSProcess>>value
	Receiver: a ExternalWindowsOSProcess with pid nil handle nil on 'dir'
(notYetRunning)
	Arguments and temporary variables:
		procInfo: 	nil
		mainThread: 	nil
	Receiver's instance variables:
		pid: 	nil
		runState: 	#notYetRunning
		initialStdIn: 	nil
		initialStdOut: 	nil
		initialStdErr: 	nil
		ppid: 	nil
		exitStatus: 	nil
		handle: 	nil
		threads: 	nil
		commandLine: 	'dir'
		pwd: 	nil

ExternalWindowsOSProcess class>>command:
	Receiver: ExternalWindowsOSProcess
	Arguments and temporary variables:
		aCommandString: 	'dir'
	Receiver's instance variables:
		superclass: 	ExternalOSProcess
		methodDict: 	a MethodDictionary(#=->(ExternalWindowsOSProcess>>#= "a
CompiledMet...etc...
		format: 	152
		instanceVariables: 	#('ppid' 'exitStatus' 'handle' 'threads'
'commandLine' 'pwd'...etc...
		organization: 	('comparing' = hash)
('initialize - release' closeHandles)
('acce...etc...
		subclasses: 	nil
		name: 	#ExternalWindowsOSProcess
		classPool: 	nil
		sharedPools: 	nil
		environment: 	Smalltalk globals "a SystemDictionary with lots of globals"
		category: 	#'OSProcess-Win32'

WindowsProcess>>command:
	Receiver: a WindowsProcess with pid nil
	Arguments and temporary variables:
		aCommandString: 	'dir'
	Receiver's instance variables:
		pid: 	nil
		sessionID: 	#[180 0 0 0]
		stdIn: 	nil
		stdOut: 	nil
		stdErr: 	nil
		processAccessor: 	a WindowsOSProcessAccessor
		allMyChildren: 	an OrderedCollection()
		accessProtect: 	a Semaphore()
		processHandle: 	nil
		environment: 	nil
		mainThread: 	a WindowsThread (nil, running)
		threads: 	an OrderedCollection()

OSProcess class>>command:
	Receiver: OSProcess
	Arguments and temporary variables:
		aCommandString: 	'dir'
	Receiver's instance variables:
		superclass: 	Object
		methodDict: 	a MethodDictionary(#initialize->(OSProcess>>#initialize
"a Compiled...etc...
		format: 	132
		instanceVariables: 	#('pid')
		organization: 	('initialize - release' initialize)
('testing' isExternalProcess)...etc...
		subclasses: 	{ExternalOSProcess . ThisOSProcess}
		name: 	#OSProcess
		classPool: 	a Dictionary(#UseIOHandle->false )
		sharedPools: 	nil
		environment: 	Smalltalk globals "a SystemDictionary with lots of globals"
		category: 	#'OSProcess-Base'

UndefinedObject>>DoIt
	Receiver: nil
	Arguments and temporary variables:

	Receiver's instance variables:
nil
Compiler>>evaluate:in:to:notifying:ifFail:logged:
	Receiver: a Compiler
	Arguments and temporary variables:
		textOrStream: 	a ReadWriteStream '- Did senders slow down?

OSProcess command: '...etc...
		aContext: 	nil
		receiver: 	nil
		aRequestor: 	a SmalltalkEditor
		failBlock: 	[closure] in [] in
SmalltalkEditor(TextEditor)>>evaluateSelectionAnd...etc...
		logFlag: 	true
		methodNode: 	DoIt
	^ OSProcess command: 'dir'
		method: 	(UndefinedObject>>#DoIt "a CompiledMethod(1178)")
		value: 	nil
		toLog: 	nil
		itsSelection: 	nil
		itsSelectionString: 	nil
	Receiver's instance variables:
		sourceStream: 	a ReadWriteStream '- Did senders slow down?

OSProcess command: '...etc...
		requestor: 	a SmalltalkEditor
		class: 	UndefinedObject
		category: 	nil
		context: 	nil
		parser: 	a Parser

[] in SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo:
	Receiver: a SmalltalkEditor
	Arguments and temporary variables:
<<error during printing>
	Receiver's instance variables:
		sensor: 	a KeyboardBuffer
		morph: 	a TextMorphForEditView(3005)
		selectionShowing: 	false
		model: 	a Workspace
		paragraph: 	a MultiNewParagraph
		pointBlock: 	a CharacterBlock with index 51 and rectangle 158 at 32
corner: 158 at 48
...etc...
		markBlock: 	a CharacterBlock with index 27 and character $O and
rectangle 0 at 32 c...etc...
		beginTypeInBlock: 	nil
		emphasisHere: 	#()
		otherInterval: 	(27 to: 50)
		lastParenLocation: 	nil
		oldInterval: 	(27 to: 50)
		styler: 	nil

BlockClosure>>on:do:
	Receiver: [closure] in SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo:
	Arguments and temporary variables:
		exception: 	OutOfScopeNotification
		handlerAction: 	[closure] in
SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo...etc...
		handlerActive: 	true
	Receiver's instance variables:
		outerContext: 	SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo:
		startpc: 	97
		numArgs: 	0

SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo:
	Receiver: a SmalltalkEditor
	Arguments and temporary variables:
		aBlock: 	[closure] in SmalltalkEditor(TextEditor)>>printIt
		result: 	nil
		rcvr: 	nil
		ctxt: 	nil
	Receiver's instance variables:
		sensor: 	a KeyboardBuffer
		morph: 	a TextMorphForEditView(3005)
		selectionShowing: 	false
		model: 	a Workspace
		paragraph: 	a MultiNewParagraph
		pointBlock: 	a CharacterBlock with index 51 and rectangle 158 at 32
corner: 158 at 48
...etc...
		markBlock: 	a CharacterBlock with index 27 and character $O and
rectangle 0 at 32 c...etc...
		beginTypeInBlock: 	nil
		emphasisHere: 	#()
		otherInterval: 	(27 to: 50)
		lastParenLocation: 	nil
		oldInterval: 	(27 to: 50)
		styler: 	nil

SmalltalkEditor(TextEditor)>>printIt
	Receiver: a SmalltalkEditor
	Arguments and temporary variables:

	Receiver's instance variables:
		sensor: 	a KeyboardBuffer
		morph: 	a TextMorphForEditView(3005)
		selectionShowing: 	false
		model: 	a Workspace
		paragraph: 	a MultiNewParagraph
		pointBlock: 	a CharacterBlock with index 51 and rectangle 158 at 32
corner: 158 at 48
...etc...
		markBlock: 	a CharacterBlock with index 27 and character $O and
rectangle 0 at 32 c...etc...
		beginTypeInBlock: 	nil
		emphasisHere: 	#()
		otherInterval: 	(27 to: 50)
		lastParenLocation: 	nil
		oldInterval: 	(27 to: 50)
		styler: 	nil

SmalltalkEditor(TextEditor)>>printIt:
	Receiver: a SmalltalkEditor
	Arguments and temporary variables:
		characterStream: 	a WriteStream ''
	Receiver's instance variables:
		sensor: 	a KeyboardBuffer
		morph: 	a TextMorphForEditView(3005)
		selectionShowing: 	false
		model: 	a Workspace
		paragraph: 	a MultiNewParagraph
		pointBlock: 	a CharacterBlock with index 51 and rectangle 158 at 32
corner: 158 at 48
...etc...
		markBlock: 	a CharacterBlock with index 27 and character $O and
rectangle 0 at 32 c...etc...
		beginTypeInBlock: 	nil
		emphasisHere: 	#()
		otherInterval: 	(27 to: 50)
		lastParenLocation: 	nil
		oldInterval: 	(27 to: 50)
		styler: 	nil

SmalltalkEditor(TextEditor)>>dispatchOnCharacter:with:
	Receiver: a SmalltalkEditor
	Arguments and temporary variables:
		char: 	$p
		typeAheadStream: 	a WriteStream ''
		honorCommandKeys: 	true
		openers: 	nil
		closers: 	nil
		result: 	nil
	Receiver's instance variables:
		sensor: 	a KeyboardBuffer
		morph: 	a TextMorphForEditView(3005)
		selectionShowing: 	false
		model: 	a Workspace
		paragraph: 	a MultiNewParagraph
		pointBlock: 	a CharacterBlock with index 51 and rectangle 158 at 32
corner: 158 at 48
...etc...
		markBlock: 	a CharacterBlock with index 27 and character $O and
rectangle 0 at 32 c...etc...
		beginTypeInBlock: 	nil
		emphasisHere: 	#()
		otherInterval: 	(27 to: 50)
		lastParenLocation: 	nil
		oldInterval: 	(27 to: 50)
		styler: 	nil

SmalltalkEditor(TextEditor)>>readKeyboard
	Receiver: a SmalltalkEditor
	Arguments and temporary variables:
		typeAhead: 	a WriteStream ''
		char: 	$p
	Receiver's instance variables:
		sensor: 	a KeyboardBuffer
		morph: 	a TextMorphForEditView(3005)
		selectionShowing: 	false
		model: 	a Workspace
		paragraph: 	a MultiNewParagraph
		pointBlock: 	a CharacterBlock with index 51 and rectangle 158 at 32
corner: 158 at 48
...etc...
		markBlock: 	a CharacterBlock with index 27 and character $O and
rectangle 0 at 32 c...etc...
		beginTypeInBlock: 	nil
		emphasisHere: 	#()
		otherInterval: 	(27 to: 50)
		lastParenLocation: 	nil
		oldInterval: 	(27 to: 50)
		styler: 	nil

[] in [] in TextMorphForEditView(TextMorph)>>keyStroke:
	Receiver: a TextMorphForEditView(3005)
	Arguments and temporary variables:
<<error during printing>
	Receiver's instance variables:
		bounds: 	0 at 0 corner: 429 at 50
		owner: 	a TransformMorph(1998)
		submorphs: 	#()
		fullBounds: 	0 at 0 corner: 429 at 50
		color: 	Color black
		extension: 	a MorphExtension (3074) [other:  (blinkStart -> 5689)]
		borderWidth: 	0
		borderColor: 	Color black
		textStyle: 	a TextStyle Bitmap DejaVu Sans 9
		text: 	a Text for '- Did senders slow down?

OSProcess command: ''dir'''
		wrapFlag: 	true
		paragraph: 	a MultiNewParagraph
		editor: 	a SmalltalkEditor
		container: 	nil
		predecessor: 	nil
		successor: 	nil
		backgroundColor: 	nil
		margins: 	nil
		editHistory: 	nil
		editView: 	a PluggableTextMorphPlus(1841)
		acceptOnCR: 	false

TextMorphForEditView(TextMorph)>>handleInteraction:fromEvent:
	Receiver: a TextMorphForEditView(3005)
	Arguments and temporary variables:
		interactionBlock: 	[closure] in [] in
TextMorphForEditView(TextMorph)>>keyStroke...etc...
		evt: 	[keystroke '<Cmd-p>']
		oldEditor: 	a SmalltalkEditor
		oldParagraph: 	a MultiNewParagraph
		oldText: 	a Text for '- Did senders slow down?

OSProcess command: ''dir'''
	Receiver's instance variables:
		bounds: 	0 at 0 corner: 429 at 50
		owner: 	a TransformMorph(1998)
		submorphs: 	#()
		fullBounds: 	0 at 0 corner: 429 at 50
		color: 	Color black
		extension: 	a MorphExtension (3074) [other:  (blinkStart -> 5689)]
		borderWidth: 	0
		borderColor: 	Color black
		textStyle: 	a TextStyle Bitmap DejaVu Sans 9
		text: 	a Text for '- Did senders slow down?

OSProcess command: ''dir'''
		wrapFlag: 	true
		paragraph: 	a MultiNewParagraph
		editor: 	a SmalltalkEditor
		container: 	nil
		predecessor: 	nil
		successor: 	nil
		backgroundColor: 	nil
		margins: 	nil
		editHistory: 	nil
		editView: 	a PluggableTextMorphPlus(1841)
		acceptOnCR: 	false

TextMorphForEditView>>handleInteraction:fromEvent:
	Receiver: a TextMorphForEditView(3005)
	Arguments and temporary variables:
		interActionBlock: 	[closure] in [] in
TextMorphForEditView(TextMorph)>>keyStroke...etc...
		evt: 	[keystroke '<Cmd-p>']
	Receiver's instance variables:
		bounds: 	0 at 0 corner: 429 at 50
		owner: 	a TransformMorph(1998)
		submorphs: 	#()
		fullBounds: 	0 at 0 corner: 429 at 50
		color: 	Color black
		extension: 	a MorphExtension (3074) [other:  (blinkStart -> 5689)]
		borderWidth: 	0
		borderColor: 	Color black
		textStyle: 	a TextStyle Bitmap DejaVu Sans 9
		text: 	a Text for '- Did senders slow down?

OSProcess command: ''dir'''
		wrapFlag: 	true
		paragraph: 	a MultiNewParagraph
		editor: 	a SmalltalkEditor
		container: 	nil
		predecessor: 	nil
		successor: 	nil
		backgroundColor: 	nil
		margins: 	nil
		editHistory: 	nil
		editView: 	a PluggableTextMorphPlus(1841)
		acceptOnCR: 	false

[] in TextMorphForEditView(TextMorph)>>keyStroke:
	Receiver: a TextMorphForEditView(3005)
	Arguments and temporary variables:
		evt: 	[keystroke '<Cmd-p>']
		action: 	nil
	Receiver's instance variables:
		bounds: 	0 at 0 corner: 429 at 50
		owner: 	a TransformMorph(1998)
		submorphs: 	#()
		fullBounds: 	0 at 0 corner: 429 at 50
		color: 	Color black
		extension: 	a MorphExtension (3074) [other:  (blinkStart -> 5689)]
		borderWidth: 	0
		borderColor: 	Color black
		textStyle: 	a TextStyle Bitmap DejaVu Sans 9
		text: 	a Text for '- Did senders slow down?

OSProcess command: ''dir'''
		wrapFlag: 	true
		paragraph: 	a MultiNewParagraph
		editor: 	a SmalltalkEditor
		container: 	nil
		predecessor: 	nil
		successor: 	nil
		backgroundColor: 	nil
		margins: 	nil
		editHistory: 	nil
		editView: 	a PluggableTextMorphPlus(1841)
		acceptOnCR: 	false

StandardToolSet class>>codeCompletionAround:textMorph:keyStroke:
	Receiver: StandardToolSet
	Arguments and temporary variables:
		aBlock: 	[closure] in TextMorphForEditView(TextMorph)>>keyStroke:
		aTextMorph: 	a TextMorphForEditView(3005)
		evt: 	[keystroke '<Cmd-p>']
	Receiver's instance variables:
		superclass: 	Object
		methodDict: 	a MethodDictionary()
		format: 	2
		instanceVariables: 	nil
		organization: 	('as yet unclassified')

		subclasses: 	nil
		name: 	#StandardToolSet
		classPool: 	nil
		sharedPools: 	nil
		environment: 	Smalltalk globals "a SystemDictionary with lots of globals"
		category: 	#'Tools-Base'


--- The full stack ---
UndefinedObject(Object)>>doesNotUnderstand: #nextPutAll:
ExternalWindowsOSProcess>>value
ExternalWindowsOSProcess class>>command:
WindowsProcess>>command:
OSProcess class>>command:
UndefinedObject>>DoIt
Compiler>>evaluate:in:to:notifying:ifFail:logged:
[] in SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo:
BlockClosure>>on:do:
SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo:
SmalltalkEditor(TextEditor)>>printIt
SmalltalkEditor(TextEditor)>>printIt:
SmalltalkEditor(TextEditor)>>dispatchOnCharacter:with:
SmalltalkEditor(TextEditor)>>readKeyboard
[] in [] in TextMorphForEditView(TextMorph)>>keyStroke:
TextMorphForEditView(TextMorph)>>handleInteraction:fromEvent:
TextMorphForEditView>>handleInteraction:fromEvent:
[] in TextMorphForEditView(TextMorph)>>keyStroke:
StandardToolSet class>>codeCompletionAround:textMorph:keyStroke:
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ToolSet class>>codeCompletionAround:textMorph:keyStroke:
TextMorphForEditView(TextMorph)>>keyStroke:
TextMorphForEditView>>keyStroke:
TextMorphForEditView(TextMorph)>>handleKeystroke:
KeyboardEvent>>sentTo:
TextMorphForEditView(Morph)>>handleEvent:
TextMorphForEditView(Morph)>>handleFocusEvent:
[] in HandMorph>>sendFocusEvent:to:clear:
[] in PasteUpMorph>>becomeActiveDuring:
BlockClosure>>on:do:
PasteUpMorph>>becomeActiveDuring:
HandMorph>>sendFocusEvent:to:clear:
HandMorph>>sendEvent:focus:clear:
HandMorph>>sendKeyboardEvent:
HandMorph>>handleEvent:
HandMorph>>processEvents
[] in WorldState>>doOneCycleNowFor:
Array(SequenceableCollection)>>do:
WorldState>>handsDo:
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
PasteUpMorph>>doOneCycle
[] in Project class>>spawnNewProcess
[] in BlockClosure>>newProcess




On Thu, Jun 9, 2011 at 8:14 AM, David T. Lewis <lewis at mail.msen.com> wrote:
> On Wed, Jun 08, 2011 at 06:05:27PM -0500, Chris Muller wrote:
>> After a long time working solely in Linux, I seem to be confused about
>> how to configure an image on Windows with OSProcess.  I'm running a
>> recent Cog VM (2382, April 26 2011) and have Win32OSProcessPlugin.dll
>> is in my VM directory, but I don't have any of the Plugin classes in
>> my image.
>>
>> When I try to load OSProcessPlugin from SqueakMap, it halts saying it
>> wants InterpreterPlugin to be able to install OSProcessPlugin and
>> subclasses..
>>
>> What is the proper way to install OSProcess on Windows?
>
> Hi Chris,
>
> Just load OSProcess and CommandShell from SqueakMap. The plugins are
> separate packages that you can load if you are building your own VM,
> in which case you would load VMMaker first, which contains the
> InterpreterPlugin class.
>
> Dave
>
>
>



More information about the Squeak-dev mailing list