Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug ? / COM+ Error
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Bug ? / COM+ Error
Miscellaneous
Thread ID:
00728387
Message ID:
00728387
Views:
57
If i call a COM+ component twice and the first call called setcomplete(), the second call will succeed but the application crashes when the instance is destroyed.

Can anybody explain? Is this a bug ?

- Put the following code into a new project called TestC5
- Build as a MTDLL
- Add To a new or existent COM+ Application

PS. I am running Win2K server SP3, i compilled with VFP7 SP1 and also tried with VFP8 and getting the same result.
Define Class TestC5 As Session OLEPUBLIC 

	Function Test1()
		
		This.EndTransaction()
		Return "Test1"

	EndFunc
	
	Function Test2
		Return "Test2"
	EndFunc
	
	Protected Function EndTransaction()

		Local loCom, loContext, loContextState

		loCom = CREATEOBJECT( "MTXAS.APPSERVER.1" )
		loContext = loCom.GetObjectContext()

		loContext.SetComplete()
		
		Store NULL TO loCom, loContext

	EndFunc

EndDefine
Then run the following:
ox = CreateObject("TestC5.TestC5")
? ox.Test1() && Test 1
? ox.Test2() && Test 2
ox=Null && Kaboom !!!
The error i get in the application event log is the following:
COM+ Internal Error. Please contact Microsoft Product Support Services to report this error. Assertion Failure: 
!m_fActivated
Server Application ID: {F6BBDE6A-DCA5-4654-8266-0DCCF336F2E7}
Server Application Name: TestC5
The serious nature of this error has caused the process to terminate.
COM+ Services Internals Information:
File: .\jit.cpp, Line: 78
Next
Reply
Map
View

Click here to load this message in the networking platform