Application quits unexpectedly

  • Thread starter Thread starter Andrew Teece
  • Start date Start date
A

Andrew Teece

HELP - My application exists.... all on its own... at the end of a function
call!!!

The code snipit below runs... the finally block runs. But when it reaches
End Sub, it exists! - And the proceedure that calls this one, has code left
to run, but it never gets to a breakpoint on the next line.
Any ideas what to look for? Is it because i am calling an external assembly?

The calling code is run on a seperate thread, that is marked as background,
but that shouldnt make a difference should it?



Private Sub CreateOutput(ByVal Packet As Packet, ByVal ChannelInstance As
ChannelInstance, Optional ByVal PacketField As PacketField = Nothing)
Dim asmOutputChannel As System.Reflection.Assembly
Dim typOutputChannel As Type
Dim objOutputChannel As iOutputChannel

Try
asmOutputChannel =
System.Reflection.Assembly.LoadFrom(CType(ChannelInstance.ChannelTemplate,
ChannelTemplate).FileName)

typOutputChannel =
asmOutputChannel.GetType(CType(ChannelInstance.ChannelTemplate,
ChannelTemplate).ProgID, True, True)

objOutputChannel = Activator.CreateInstance(typOutputChannel)

objOutputChannel.SendOutput(Packet, ChannelInstance)
Catch ex As DataAccessLayer.RecordAlreadyChanged
'Pass this error up the stack, without a parent exception
Throw ex
Catch ex As Exception
Throw New AllocationsEngineException("Unable to create output", ex)
Finally
asmOutputChannel = Nothing
typOutputChannel = Nothing
objOutputChannel = Nothing
End Try
End Sub
 
try adding a handler to Applicatoin.ThreadException and see if its being
thrown there.

-CJ'
 
I already have an event handler here... nothing is thrown.

Thanks for the idea though
 
It is a call to a .Net assembly i have written in VB.Net, so fully managed
(it only calls system.web.mail).

However, the calling code is run within a COM+ transaction. The assembly i
dynamically load does not referance EnterpriseServices in any way, and i
have since noticed that COM+ throws a 4822 error..

A condition has occurred that indicates this COM+ application is in an
unstable state or is not functioning correctly. Assertion Failure: !m_punk

Server Application ID: {31DC9D6D-C0E1-4386-BF94-7E1A6964CE2B}

Server Application Instance ID:

{997DF313-3BFB-4031-AFB9-2A3B76660DD5}

Server Application Name: eNate BPOBridge

The serious nature of this error has caused the process to terminate.

COM+ Services Internals Information:

File: d:\nt_qxp\com\com1x\src\comsvcs\jit\jit.cpp, Line: 858

Comsvcs.dll file version: ENU 2001.12.4414.53 shp

For more information, see Help and Support Center at

Doug said:
It could be your call is not thread safe. Is this a call to unmanaged
code?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top