BUG REPORT: Soap + Squeak/.NET Bridge crashes the Squeak VM.

Valdas Bucinskas valdas.bucinskas at ipsistemos.lt
Fri Sep 16 07:28:39 UTC 2005


Hello everybody,

Today I have run into a strange bug that crashes Squeak VM. Here are the
steps that I followed.

1. installed Squeak/.NET Bridge R7 and SoapCore 0.7a packages.
2. Compiled the DLL as described in Squeak/.NET Bridge tutorial. It can be
found here: http://minnow.cc.gatech.edu/squeak/3773
3. The file IWshRuntimeLibrary.dll must be in the same directory as Squeak
image file.
4. Created a class:
Object subclass: #DotNetUserTest
	instanceVariableNames: ''
	classVariableNames: 'Dn'
	poolDictionaries: ''
	category: 'DotNetBridge-User-Functions'

istance >> empty

class >> (3 methods)

dn
	Dn isNil
		ifTrue: ["This should be created only once."
DotNet Assembly loadFrom: 'IWshRuntimeLibrary.dll'.
			Dn := DotNet WshShellClass new].
	^ Dn
==================================
dn: anObject
Dn := anObject
==================================
getSqueakDirectory
"without that I get 'Primitive failed error' the first time I run it when
image is just loaded"
[DotNetUserTest dn isFault] on: Error do:[DotNetUserTest dn: nil].
".NET call"
	^ self dn CurrentDirectory.

5. Workspace >>

SoapServerSetup startAll.	"Start Soap"

serv := SoapService implementor: DotNetUserTest selector:
#getSqueakDirectory.
serv signature: (SoapServiceSignature name: 'Test' paramNames: #()).
SoapServiceHandler default add: serv.	"Now we r ready to call .NET via Soap"

"Initialize the call"
callDotNetViaSoap := (SoapCallEntry tcpHost: 'localhost' port: 8823)
newCall.
callDotNetViaSoap transport: #http.
callDotNetViaSoap targetObjectURI: ''.
callDotNetViaSoap methodName: 'Test'.

"!!! (I RECOMMEND SAVING THE IMAGE HERE) !!!"

200 timesRepeat: [callDotNetViaSoap invokeAndReturn].  "VM crash here"

6.
The interesting part is that if I call Soap connection 200 times
(change the method to:
getSqueakDirectory
	^ 1
) ,
all is OK. If I call .NET 200 times
(change the workspace call to:
	200 timesRepeat: [DotNetUserTest getSqueakDirectory] "runs OK"
), it's OK too. But if I call .NET via Soap connection 200 times, a Squeak
VM crash happens. See the attached crash.dmp file for more details.


Best regards,
Valdas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crash.dmp
Type: application/octet-stream
Size: 3052 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050916/b6ee7be7/crash.obj


More information about the Squeak-dev mailing list