473,402 Members | 2,064 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,402 software developers and data experts.

ThreadAbortException: Thread was aborted exception???

I've got a WebServices application that uses Crystal Reports to produce and
then export Invoices to PDF format. Without getting into too many details,
it's just a big loop statement that goes out to SQL using a SqlDataAdapter,
brings back a dataset which is pushed into the Crystal Report, and the
report is exported - nothing fancy.

Everything works great in that on my development machine, I can run through
2,000 reports without hitting any snags. But when we deploy and try to run
the WebService on a production machine, it throws out a
ThreadAbortExceptions at random times. The exception does not get raised at
one particular line of code or at any predicable interval within the loop -
it's very random, although it's almost always thrown once within the first
15 reports, and then the remaining 1,875 or so run without raising the
exception again.

The only significant difference that I can point to between my development
machine and the production machine is that the production machine is a
dual-processor Xeon, while my dev machine is a lowly single processor -
could that have anything to do with it? Please know too that my code does
nothing with threads - I just run one long process in the existing thread.
It seems that the Exception is either being thrown from the Crystal Engine,
or from the SqlClient library as it retrieves the data - and actually I've
seen evidence that it's throwing from both.

In any case, if anybody has any ideas on this, please let me know.

Thanks,

Chris
Nov 17 '05 #1
1 1866
Are you redirecting or transfering from one page to another? That gets
executed on another thread. Thread Abort exceptions 'cant be caught'. You
can catch them but the CLR immediately rethrows it.

You've violated a rule of thumbs here. If you are developing for a dual
processor, you absolutely must test on a dual processor to catch concurrency
and synchronization issues.

If this is not possible (and it often is not due to company beaurocracy),
you need to remote attach the debugger to the server process. MSDN tells you
how to do this. Then set your exceptions (off of the debug menu) to break
into the debugger on CLR exceptions.

Fire the application up. When the thread exception occurs it will stop at
the offending line. If it is coming from a module that you don't have soure
code for, you are out of luck.

hth
"Christopher D. Wiederspan" <wi********@netquote.com> wrote in message
news:#0**************@TK2MSFTNGP11.phx.gbl...
I've got a WebServices application that uses Crystal Reports to produce and then export Invoices to PDF format. Without getting into too many details,
it's just a big loop statement that goes out to SQL using a SqlDataAdapter, brings back a dataset which is pushed into the Crystal Report, and the
report is exported - nothing fancy.

Everything works great in that on my development machine, I can run through 2,000 reports without hitting any snags. But when we deploy and try to run
the WebService on a production machine, it throws out a
ThreadAbortExceptions at random times. The exception does not get raised at one particular line of code or at any predicable interval within the loop - it's very random, although it's almost always thrown once within the first
15 reports, and then the remaining 1,875 or so run without raising the
exception again.

The only significant difference that I can point to between my development
machine and the production machine is that the production machine is a
dual-processor Xeon, while my dev machine is a lowly single processor -
could that have anything to do with it? Please know too that my code does
nothing with threads - I just run one long process in the existing thread.
It seems that the Exception is either being thrown from the Crystal Engine, or from the SqlClient library as it retrieves the data - and actually I've
seen evidence that it's throwing from both.

In any case, if anybody has any ideas on this, please let me know.

Thanks,

Chris

Nov 17 '05 #2

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

Similar topics

0
by: Mark Phillips | last post by:
Hello, I am having a problem in which a file can get stuck open when a thread that is attempting to write to it gets aborted (ThreadAbortedException occurs). The log file gets stuck open until...
6
by: Mitch | last post by:
My background thread is being terminated when my application exixts. However, it does not receive a ThreadAbortException so I am unable to cleanly diconnect from a remote object (which makes the...
4
by: Vivek | last post by:
Hi, I have a question regarding ThreadAbortException. Why is the thread abort exception rethrown at the end of a catch clause? Why is ThreadAbortException's behavior designed to be this way? ...
0
by: Chee | last post by:
Hi all Please forgive me if this has been asked before. I am getting a ThreadAbortException in "Unknown Module" when i try to load a page from VS.NET. One problem is it does not happen all the...
3
by: Steve - DND | last post by:
I just implemented a page that performs a Response.Redirect(url, true). As such, I wrapped it in a try catch, and explicitly caught a ThreadAbortException. However, the thread abort exception was...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.