| 08-24-2008, 03:40 AM | #1 |
Code:
FATAL ERROR! Program: c:\program files\warcraft iii\war3.exe Exception: 0xC0000005 (ACCESS_VIOLATION) at 001B:6F77978B The instruction at '0x6F77978B' referenced memory at '0x10E90000'. The memory could not be 'read'. Anyone know what the cause is? It crashes only 1 player. And no I did not: - have an infinite loop - move/create unit outside bounds - use lightning at all It also happens randomly, so I don't really know where to start...It doesn't always occur either. Edit: If I had an array variable with an invalid number and I used that variable for a custom function, would that crash? i.e. JASS:call UnitSpawn(First_Unit[GetPlayerId(Round2[2])], x1, y1) |
| 08-24-2008, 04:31 AM | #2 |
maybe an uninitialized variable is being used? uninitialized n:local integer n set n=n+1 |
| 08-24-2008, 05:08 AM | #3 |
No, it's not that. That only causes a thread crash. |
| 08-24-2008, 06:29 AM | #4 |
There is only one potential problem - invalid player argument. GetPlayerId(Round2[2]) |
| 08-24-2008, 07:43 AM | #5 |
You are using a timer stack, I hope ? |
| 08-24-2008, 03:17 PM | #6 | |
Quote:
Oh btw, the crash always happens to only 1 player. |
| 08-25-2008, 06:18 PM | #7 |
yes, CSSafety is a timer stack. Also, with regard to the fact that it only crashed for one player, can that player be specified in any way, like it is the host or a certain player that made a certain action in the game etc.? |
| 08-25-2008, 09:14 PM | #8 |
Corrupted model maybe? |
| 08-26-2008, 11:28 PM | #9 |
No custom models are being used. And the crash is random, it doesn't always happen to the same person. I think it might be a -1 getting in Player(integer) and causing the crash, but i'm not sure. |
| 08-26-2008, 11:44 PM | #10 |
Player(-1) is a good way to crash WC3, confirmed with a lot of pain. |
| 08-27-2008, 12:02 AM | #11 |
Add function PlayerEx() to your code... function PlayerEx takes integer A returns player if A > 15 or A < 0 then return Player(0) endif return Player(A) endfunction |
| 08-27-2008, 04:49 AM | #12 |
change diod's code to call a TriggerSleepAction and a BJDebugMsg incase the id was faulty, so you can actually view all the information you want before the game closes/continues with the wrong player. |
