Exception: Access violation (0xc0000005) ?

Exception: Access violation (0xc0000005) ?

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Exception: Access violation (0xc0000005) ?

Post by TradeMark »

Why does spring try to read memory where its not allowed to read?

So thats the reason of my thousands crashes? It tries to read the very first memory addresses, and that is which causes crash?

Cant it just pop up window with error like in other games? Why spring needs to be closed? Just make it continue game when it makes such errors?
Remove those damn exit()'s?

?^20
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

int* a = 0;
a[1]=2;

That would cause an access violation. So would setting a to 5 or 992. 0 is used because its the same as the macro null and is used in most programs/languages anyway. That and there might already be an array at address 992.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

Null pointers are used to instacrash (on purpose) on certain types of errors, iirc.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Exception: Access violation (0xc0000005) ?

Post by KDR_11k »

TradeMark wrote:Why does spring try to read memory where its not allowed to read?
Bugs. Be happy only Spring crashes, before we had memory protection that could crash the whole PC.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Exception: Access violation (0xc0000005) ?

Post by TradeMark »

KDR_11k wrote:Bugs. Be happy only Spring crashes, before we had memory protection that could crash the whole PC.
Well, my PC shuts down sometimes when i play Spring. (and no, not a heat problem).

So im not happy.

Just remove that "memory protection" ... i think thats the cause of my crashes...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

So you'd rather that spring executed the code at address 0 and messed up your entire PC with disastrous consequences rather than simple generate an access violation exception?

Theres a good chance if you didnt have that protection and it happened it would crash anyway or it would continue but with very unusual behaviour that damaged your computer irrepairably with you having to reinstall windows or buy a new motherboard.

Memory access protection cant be turned off, its a part of the operating system. It prevents a program accessing resources or executing code that doesnt belong to it. It is not something you want to remove.

Where are the stacktraces? Are you trying to run tasclient with a MSVC++/custom build of spring? Have you tried using a debugger? No replays? You havent even told us your system specs.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Exception: Access violation (0xc0000005) ?

Post by Pxtl »

TradeMark wrote:
KDR_11k wrote:Bugs. Be happy only Spring crashes, before we had memory protection that could crash the whole PC.
Well, my PC shuts down sometimes when i play Spring. (and no, not a heat problem).

So im not happy.

Just remove that "memory protection" ... i think thats the cause of my crashes...
Wow. Up until now, I thought that Trademark was a well-meaning but wierd gamer with a penchance for SpeedMetal-derived maps. Now I've decided he's a freaking loon.

The lack of knowledge of programming that you just displayed shows that you are the very last person on the face of the earth that should be making suggestions about how someone should solve a coding bug.

I mean, like, behind Paris Hilton.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Post by TradeMark »

AF wrote:Where are the stacktraces? Are you trying to run tasclient with a MSVC++/custom build of spring? Have you tried using a debugger? No replays? You havent even told us your system specs.
I was told to not report stacktraces anymore, because they were useless.
Pxtl wrote:Wow. Up until now, I thought that Trademark was a well-meaning but wierd gamer with a penchance for SpeedMetal-derived maps. Now I've decided he's a freaking loon.

The lack of knowledge of programming that you just displayed shows that you are the very last person on the face of the earth that should be making suggestions about how someone should solve a coding bug.

I mean, like, behind Paris Hilton.
I was just joking...
Post Reply

Return to “Help & Bugs”