473,503 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Identifying threads in VS .NET 2003

5 New Member
Hi all,

I'm converting a Linux program to a Windows program using Visual Studio .NET 2003. The code was written using pthread.

I have a "First-chance exception at 0x100084c8 in project.exe: 0xC0000005: Access violation reading location 0x000001dc" error that is causing my program to crash, and all but one thread "has exited with code 0 (0x0)." The one thread (0xfe4) exited with code -1073741819 (0xc0000005). I read that if threads exited with code 0, then everything is fine. I'm guessing the one thread that did not caused the error, especially since the same code 0xC0000005 showed up.

As there are groups of threads doing different tasks, I wish to track down the thread that did not exit correctly, so as to debug the program. Is there a way to identify which thread it is, like using the (0xfe4) value?

Thank you.

Regards,
Rayne
Dec 9 '09 #1
2 1662
RRick
463 Recognized Expert Contributor
Have you tried the debugger with this? I assume VS 2003 knows how to deal with multiple threads and can stop on errors.

Access violations are caused by bad pointers, typically a null pointer. Since the address is low, the location 0x000001dc might be an offset into a structure or class. If its not too difficult, I would check the class pointer values in your code.
Dec 9 '09 #2
Banfa
9,065 Recognized Expert Moderator Expert
A first chance exception is normally given when you debug the program. It goes something a little like this
  1. Exception Raised
  2. Exception passed to debugger for first chance exception, user has a chance to interact if they wish or can just continue.
  3. If they continue the exception is passed to the program, the program may handle the exception.
  4. If the program does not handle the exception the exception gets passed back to the debugger again for a second chance exception.

The point is that if your program is handling the exception first chance exceptions may well not be a serious issue.

However when you get an exception and the debugger pauses execution you should simply be able to display the threads dialgue box to see which thread is running and a quick double click on it should take you to the code that is running. If it is a system call and no code is available then the call stack dialog will enable you to step back up the call stack until you get to the code of your program.
Dec 10 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2114
by: Huzefa | last post by:
I am working on a amll project in Java that includes many classes. Each of the classes has a Logger object. I have associated a FileHandler with each of these Logger objects. The file is the same...
5
2601
by: Sunny | last post by:
Hi, I have to implement client/server application. The client have to instaniate an remoting object via http and pass some auth info. If the auth is OK, the client should invoke a method (or...
10
8541
by: Cool Guy | last post by:
Consider: void Start() { if (!TryToDoSomething()) ShowErrorMessage(); }
6
4959
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
14
3237
by: Lior Amar | last post by:
Quick question about threads and delegates. I have the following scenario Thread A (CLASSA) spawns Thread B (CLASSB) and passes it a DelegateA to a callback Thread B Invokes a DelegateB...
4
16329
by: MSDousti | last post by:
Hi I have written a VB .NET app, which uses several threads. I thought that when the user closes the main window (when MainForm.closed event occures, and I call application.exit) all running...
5
1405
by: Mr | last post by:
Hi We have a application with Framework 1.1 and Vs .NET 2003. the application has a service with pooling; like a File system Watcher, but works. the system works fine in the development...
4
1781
by: David Cablalero | last post by:
I have a windows service which every night checks a SQL Server database for some data and business rules. The application can access different DBs with the same structure, to tell the service which...
2
2902
by: Bobby | last post by:
Hi I'm trying to export some data from an Access table to Sage Line 50 using VBA. It works fine, except that very occasionally one of the fields contains a carriage return. If I step through my...
0
7328
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...
1
6988
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
7456
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5011
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...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1510
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
379
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.