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

Access violation read error

1
Hi!
I am currently writing a tiny webserver that i can attach to all my applications to give them web functionality. I first started of making all the socket and helper classes to handle the requests, so i only had a socket output or some 100 bytes or so, just a small text saying that the server was running, sent to the browser in html. I later added the ability to open any file in the working directory of the compiled exe, but encountered a small problem. I can only seem to open files that are less than 10mb big. I have heard that c++ natively supports some 2gb or so, so this is a serious issue in the script. I have looked everywhere, and cant find the issue. Everything compiles fine in Visual Studio 2005, but when i run the exe, it just crashes when i try to access any file larger than 10mb in my browser. If i run the exe from visual studio, i get a "Unhandled exception at 0x00401a10 in webserver.exe: 0xC0000005: Access violation reading location 0x01894562." when opening the file, and get this from the deassembler: "00401A10 mov cl,byte ptr [eax]"

I have attached the whole project below, if anyone wishes to check it out and see whats wrong.

:: link removed per Posting Guidelines ::
Jul 23 '07 #1
1 2244
Banfa
9,065 Expert Mod 8TB
"Unhandled exception at 0x00401a10 in webserver.exe: 0xC0000005: Access violation reading location 0x01894562."

Your program has attempted to access memory that is not allocated to it, if you are running it in the VS2005 debugger then it should be stopping on the code line that causes this problem. From that line examining what variables it is using you should be able to start getting an idea of where the problem is.

It is likely that 1 of your pointer variables will have a bad value.

If the linbe it stops on is assembly then open the call stack window and trace up the call stack until you get to the original function call made by your program.
Jul 23 '07 #2

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

Similar topics

1
by: SCS | last post by:
System: Windows 2003 Server PHP 5 Final IIS 6 Problem: Every time I run a PHP page I get "PHP has encountered an Access Violation at 017473CD" at the bottom of the page... But even worse,...
0
by: Steven Reddie | last post by:
In article <slrnbnj19j.av.juergen@monocerus.manannan.org>, Juergen Heinzl wrote: >In article <f93791bd.0309282133.650da850@posting.google.com>, Steven Reddie wrote: >> I understand that access...
0
by: Microsoft News | last post by:
I'm getting the following error when I shut down my C# .NET v1.1 application: 0xC0000005: Access violation reading location 0x73bc0000 This error didn't occur until I added a...
0
by: techie | last post by:
I have created an event sink in my ATL COM project. The event sink receives events from a C# component. There is no problem with receiving events but when my COM object is released I get an...
7
by: Me | last post by:
Am new to vb dotnet and although I like what I've seen sofar, I am experiencing pblms with system access violation "attempt to read write protected memory". This error happens when I open a...
4
by: =?Utf-8?B?dGhlamFzdml2?= | last post by:
Dear All, Here is my code: void main() { char *p="Hello"; *p='M'; //This is where the error occurs cout<<p<<endl; }
6
by: hadad.yaniv | last post by:
Hello, i am new to c++, i hav a vector of typed object: vector<Man*People; When i do a second pushback, even for the same object the program crash say: "An Access Violation (Segmentation...
0
by: Paavo Helde | last post by:
Shawn <sfncook@gmail.comwrote in news:6410e273-318e-44a0-9735-b922366ca1ab@w1g2000prd.googlegroups.com: I bet you have some multithreading access error. Ensure that your threads do not read or...
2
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...
39
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...
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...
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
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: 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
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
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,...

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.