473,760 Members | 10,633 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

0xC0000005 Access Violation Help?

Hi,

I am writing a windows socket program and it contains some threading in it
as well. I connect the client to the server and they talk fine until i spawn
a thread that takes care of the client while my server tried to accept
another connection.

while the functon that is being run by the thread is executing, the server
is also getting ready to accept a new connection and it executes the "accept"
command. Now at this point the function being executed by the thread gives me
this violation at the first "send" command in that is present in that
function.

Does anyone have an idea why this might be happening? could it be because of
the thread or is it something else?

Any help is appreciated

thank you
Apr 10 '06 #1
1 2555
I am writing a windows socket program and it contains some threading in it
as well. I connect the client to the server and they talk fine until i spawn
a thread that takes care of the client while my server tried to accept
another connection.

while the functon that is being run by the thread is executing, the server
is also getting ready to accept a new connection and it executes the "accept"
command. Now at this point the function being executed by the thread gives me
this violation at the first "send" command in that is present in that
function.

Does anyone have an idea why this might be happening? could it be because of
the thread or is it something else?


The thread-based design should not cause such problems by itself.
Try to determine what address is being accessed when the exception is raised,
and why is it invalid. The buffer (and its size) passed to send() should probably
be the first suspects.

Regards,
Oleg
[VC++ MVP http://www.debuginfo.com/]

Apr 11 '06 #2

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

Similar topics

4
24180
by: batista | last post by:
Hi, I am getting the following exception First-chance exception in TestMansoor.exe: 0xC0000005: Access Violation When i run the following code 1 int main(void) 2 {
3
7115
by: Fred | last post by:
I receive this message under certain conditions: 1. "Unmanaged Code Debugging" is checked in Property Pages. 2. Certain routines are "stressed." The error does not appear unless loops are repeated many times. I'm using Net Framework 1.1. I found a confirmed bug in Online Technical Support (Article ID : 811193), but the workaround applies only to C++. What is the significance of this error? More importantly, can I/should I do
2
9431
by: bhreddy | last post by:
Hi All, Can someone help me out how can I resolve the error "0xC0000005: Access violation reading location 0x513112f4"? Steps I followed... 1. I ran the application at DOS prompt 2. After some time my application got crashed and windows popped up a window asking for debug, send error report. 3. Clicking on Debug opens my workspace in .Net IDE.
1
12915
by: John Todd | last post by:
Hi, all. I've been working on a .NET project written in C# for the past three months. Yesterday, all of a sudden, I get The application failed to initialize properly (0xc0000005) error when i try to execute the .exe I built from my project. I'm sure I did not do any .NET framework install/uninstall/updates at all, neither did I delete any .dll files in any directory. Does anyone know what this error means? The only weird thing that I...
0
7128
by: vve | last post by:
I'm discovering a strange behaviour in an C# project using ZedGraph (https://sourceforge.net/projects/zedgraph/). After adding a signal to it, it seems that the clr goes mad for some reason. I don't get a nice exception in the debugger - instead I get a message in the output window "The program 'XXX.exe: Managed' has exited with code -1073741819 (0xc0000005)." and the application silently exits. I ran the compiled program with windbg...
5
5983
by: Tomas Vera | last post by:
Hello All, I have an app that is running throughout my company with one exception. Recently, one employee started throwing exception 0xC0000005 on startup. Specifically, it's crashing out during the load process. In testing I compiled a simple "Hello World" app in C#. Even that app fails to load.
1
2373
by: ritvik | last post by:
hi all can anyone please help me with this error.code was working properly earlier giving appropritae results before addign the functions : assign_ordersize(); user_data.printodsize(); this is my code : #include <iostream.h> #include <stdlib.h> #include <time.h> //using namespace std;
2
4292
by: =?Utf-8?B?c29jYXRvYQ==?= | last post by:
Hi, I have a DLL in VC6, when a specific function is called it will spawns a few threads and then return. The threads stay running and inside one of these threads an event is created using the win32 CreateEvent() call: Code Snippet static HANDLE hReadyEvent;
39
4288
by: Martin | last post by:
I have an intranet-only site running in Windows XPPro, IIS 5.1, PHP 5.2.5. I have not used or changed this site for several months - the last time I worked with it, all was well. When I tried it just now, I am getting the subject error message (specifically: PHP has encountered an access violation at 00F76E21). The error is NOT occurring on every page request (but it is on most of them) and, when I get the error, simply pressing <F5to...
0
9521
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10107
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9945
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9900
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8768
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7324
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6599
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
3442
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2733
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.