• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

What causes Access Violations?

Status
Not open for further replies.
Level 4
Joined
Jun 10, 2007
Messages
46
So there's several maps I've made by this point, and in each one, they have a tendency to crash after a certain amount of time, with Access Violation code 0xC0000005 by accessing memory at 0x0000000C.

SO what I want to know is, what types of things are prone to causing these sorts of errors, and how would I correct them?

I'm using mostly GUI in my maps, with Custom-Script-inserted JASS for leak clean-up (which I have done meticulously, BTW) and have only imported a few texture files to add terrain types.

EDIT: According to my programming professors, the fact that the memory is trying to access location 12 in memory (Which is very clearly outside the allowed range of memory allocation/reference on unix systems with an OS) is significant. So if there's certain pitfalls regarding memory leaks/clean up that people might not be aware of, that might be good to reference.
 
Crashes usually happen when the code is wrong or it creates an excessive amount of objects -almost- simultaneously (either with a loop or a really low periodic event, e.g. 0.01). Actually, there are many reasons why the game would crash, so, you might want to show us your triggers or even upload the map itself (in case the triggers' count is high).
 
Level 4
Joined
Jun 10, 2007
Messages
46
Crashes usually happen when the code is wrong or it creates an excessive amount of objects -almost- simultaneously (either with a loop or a really low periodic event, e.g. 0.01). Actually, there are many reasons why the game would crash, so, you might want to show us your triggers or even upload the map itself (in case the triggers' count is high).

I would, but I feel unconvinced that the average reader here would sift through my code just to make suggestions as to why it might be crashing, given that there really aren't any obvious clues highlighting the problem. My loops are fine, and objects are *rarely* spawned en-masse. Even when they are, they usually don't cause crashes.

Anyways, I'm trying to find more generalized solutions. For instance:
(- My triggers occasionally distribute research to other players. Could this be a bug? -)
(- Loop errors cause different effects depending on their etymology. I've found that infinite loop structures will actually stop after a certain number of runs (1000-2000-ish) before resuming the game as normal. Recursion loops (trig A calls trig B which then calls A, or itself infinitely) cause the game to end instantly with no error message. -)

What I'm trying to engineer here is a centralized database of "Things that cause crashes.

Also, for the record, when I get my specific errors, it is always memory location 0x6f479bd1 (1866963921 in decimal) accessing memory location 0x0000000c (12 in decimal). Do you feel this is relevant?
 
Status
Not open for further replies.
Top