473,396 Members | 1,724 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,396 software developers and data experts.

errors in threads

cs
Is it my idea or threads can just die when there is an error and the
exception wont show anywhere, not even when debugging on visual studio?
I have a thread that kept dieying with what I think was a null pointer
exception but I never knew it was dieying , visual studio wouldnt break at
that point or anything.
Nov 15 '05 #1
4 1127
Hi cs,

It should stop in IDE.
For being sure that threads yields exception, put your thread code in
try/catch block and set a breakpoint into catch block.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"cs" <[rem]casolorz[rem]@hot[rem]mail.com> wrote in message
news:uk**************@TK2MSFTNGP11.phx.gbl...
Is it my idea or threads can just die when there is an error and the
exception wont show anywhere, not even when debugging on visual studio?
I have a thread that kept dieying with what I think was a null pointer
exception but I never knew it was dieying , visual studio wouldnt break at
that point or anything.

Nov 15 '05 #2
cs,

You are right, VS might very well not pick it up, if it is not
monitoring the current thread of execution. Welcome to the wonderful world
of multi-threaded programming. =)

If you think there might be an issue on another thread, you can always
break at a point in that thread's execution path, and check to see what is
going on.

Also, as a general rule, you might want to propogate that error
somewhere, like in a log or something like that. This will help you with
your debug efforts.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"cs" <[rem]casolorz[rem]@hot[rem]mail.com> wrote in message
news:uk**************@TK2MSFTNGP11.phx.gbl...
Is it my idea or threads can just die when there is an error and the
exception wont show anywhere, not even when debugging on visual studio?
I have a thread that kept dieying with what I think was a null pointer
exception but I never knew it was dieying , visual studio wouldnt break at
that point or anything.

Nov 15 '05 #3
Hi Nicholas,

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:eW**************@TK2MSFTNGP09.phx.gbl...
cs,

You are right, VS might very well not pick it up, if it is not
monitoring the current thread of execution. Welcome to the wonderful world of multi-threaded programming. =)


What do you mean by monitoring?
I suppose if the app being debugged spawns a managed thread and thread
throws an error it should be picked by IDE.
In which case vs.net won't pick up exceptions?

--
Miha Markic - DXSquad/RightHand .NET consulting & software development
miha at rthand com
Nov 15 '05 #4
cs

"Miha Markic" <miha at rthand com> wrote in message
news:OG**************@TK2MSFTNGP09.phx.gbl...
Hi Nicholas,

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:eW**************@TK2MSFTNGP09.phx.gbl...
cs,

You are right, VS might very well not pick it up, if it is not
monitoring the current thread of execution. Welcome to the wonderful

world
of multi-threaded programming. =)


What do you mean by monitoring?
I suppose if the app being debugged spawns a managed thread and thread
throws an error it should be picked by IDE.
In which case vs.net won't pick up exceptions?

--
Miha Markic - DXSquad/RightHand .NET consulting & software development
miha at rthand com


I am unable to duplicate my error on a small example I can post but this
was what I had.
A thread that was talking to a serial port, the API I used to talk to the
serial port is probably threaded as well although I am not certain of it.
Whenver the serial API would receive something from the serial port it would
call an event, which my thread had registered a delegate for that event, on
my event handdler method I would generate another event to whatever program
had created my thread. If that event didnt have any delegates registered yet
then when calling my event it should have thrown a null pointer exception,
but instead the program would act normal like if nothing has happened
however my thread was dead and obviously no more input from the serial
connection worked.
Nov 15 '05 #5

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

Similar topics

0
by: Jacek Trzmiel | last post by:
Hi, I have a problem with using urllib2 with threading module under Cygwin. $ cygcheck -cd cygwin python Cygwin Package Information Package Version cygwin 1.5.5-1...
2
by: Sean | last post by:
I have an application developed in VB.NET. We have automation testing taking place on two separate machines. On one machine the automation suite completes 100% of the time. The other machine is a...
6
by: Shabam | last post by:
A web application of mine developed using C# + MS SQL runs fine normally. However when I stress test it with a load testing software (using about 60 simultaneous users) some instances start...
2
by: Brad Wood | last post by:
<environment> Consuming a web service from a VS2005 beta 2 test harness on WinXP. Web service built with VS2003 running on my machine with IIS 5X set to use ASP.NET 1.1 </environment> I have...
2
by: gavino | last post by:
REHDAT LINUX 4S PHP 4.3.9 LEGACY APP I MOVED NOW EATS MEMORY CAN ANYONE TAE A LOOK ? I FIXED ONE PARTIALLY BY CHANGING TO here are my apache settings: 1 page laoding for a few seconds eat like...
7
by: iKiLL | last post by:
Hi all I am still pretty new to .Net and C#. I have come from a VB6 Background.
6
by: Mantorok | last post by:
Hi all I have a console application that runs every night via a scheduled task, there is a try-catch block in my Main class, whenever an error is caught it is written to a log file and then...
1
by: Prashant | last post by:
mahesh.. check the correct version of jre and download it from net(it will be abt 10mb). 1st search for documentation for installing Oracle(with version) on linux(version)..so that in document it...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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,...

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.