473,385 Members | 1,661 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Application quits unexpectedly

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(ChannelI nstance.ChannelTemplate,
ChannelTemplate).FileName)

typOutputChannel =
asmOutputChannel.GetType(CType(ChannelInstance.Cha nnelTemplate,
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
Nov 20 '05 #1
3 2443
try adding a handler to Applicatoin.ThreadException and see if its being
thrown there.

-CJ'
"Andrew Teece" <an**********@enate.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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(ChannelI nstance.ChannelTemplate,
ChannelTemplate).FileName)

typOutputChannel =
asmOutputChannel.GetType(CType(ChannelInstance.Cha nnelTemplate,
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

Nov 20 '05 #2
I already have an event handler here... nothing is thrown.

Thanks for the idea though

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:eW**************@tk2msftngp13.phx.gbl...
try adding a handler to Applicatoin.ThreadException and see if its being
thrown there.

-CJ'
"Andrew Teece" <an**********@enate.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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(ChannelI nstance.ChannelTemplate, ChannelTemplate).FileName)

typOutputChannel =
asmOutputChannel.GetType(CType(ChannelInstance.Cha nnelTemplate,
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


Nov 20 '05 #3
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" <an*******@discussions.microsoft.com> wrote in message
news:11**********************************@microsof t.com...
It could be your call is not thread safe. Is this a call to unmanaged

code?
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Niel | last post by:
Hello friends, I am not sure if i am posting to the correct group but if anyone has an idea about this and the possible solution or the link to that solution then please let me know We have out...
9
by: Danifrog | last post by:
I have a form with a subform and a few buttons that open various reports, tables and forms. Sometimes when I open it in any view or try and save it, the application quits. It does this quickly...
2
by: Erik Lindeblom | last post by:
I can suddenly no longer browse any of my ASP.net web services. The browser returns: Server Application Unavailable and tells me to look at the Application Event Log for more details. I have...
20
by: J-T | last post by:
We are working on an asp.net application which is a 3-tier application.I was aksed to create a component which monitors a folder and gets the file and pass them to a class library in our business...
7
by: Ralf Gedrat | last post by:
Hello! I have some Vb.Net applications, which are terminated at indefinite times without message. If I call in the program regulated system.GC.Collect, then the program is terminated here...
3
by: Juande | last post by:
Hello, I've a working application made with Visual Studio .Net 2003 and SQL Server 2000 SP3, this application runs on several pc stations with Windows XP SP2 installed. When an user is using...
1
by: Paul Wasowicz | last post by:
Configuration: Windows 2000 Server SP4 ..Net Framework 1.1 SP1 Microsoft Site Server 3.0 Problem: the following error messages start showing up in the EVENT LOG on the server every once in a...
22
by: Jordan S. | last post by:
SQL Server will be used as the back-end database to a non trivial client application. In question is the choice of client application: I need to be able to speak intelligently about when one...
1
by: Cramer | last post by:
I'm running XP Pro/SP2 + patches and updates, with Visual Studio Professional 2008 (and no prior installation of Visual Studio ever installed). When attempting to open an ASP.NET Web application...
4
by: =?Utf-8?B?Sm9uIEphY29icw==?= | last post by:
In VB I am doing an animation via Application.Idle. My idle routine is: Private Sub Form1_Idle(ByVal sender As System.Object, ByVal e As System.EventArgs) Draw() Application.RaiseIdle(e) End...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.