| 04-05-2009, 12:17 AM | #1 |
My map is experiencing random crashes. I've noticed that the crashes always occur when enemy units die. The method of killing seems to be irrelevant as the crash is possible whether they die to auto attacks or spells. The crashes are fairly rare, but very problematic. They to either seem to occur early on in the game or not at all. The Message: "This application has encountered a critical error: FATAL ERROR! Program: c:\program files\warcraft iii\War3.exe Exception: 0xC0000005 (ACCESS_VIOLATION) at 001B:6F3FDE10 The instruction at '0x6F3FDE10' referenced memory at '0x00000030'. The memory could not be 'read'. Press OK to terminate the application." Not that I think it matters, but the dying units are all computer controlled enemies. There are about 10 different types, all of which seem capable of causing the crash. They are all based off of either Spirit Pigs or Quillboar Hunters with modified models, abilities, range, collision, etc. No custom models are being used. Any ideas? |
| 04-05-2009, 12:46 AM | #2 |
You say that no new models are being used, but what did you mean by 'modified models' then? Regardless, trial and error: let's see if it is not caused by one of the special abilities you are using. Disable all of the special abilities used by your units and run your map to determine if or not the bug continues. If it disappears, then you've found out where the problem lies. If it turns out that the problem is in one of the abilities you are using, start be reintroducing them into your map one at a time until you discover those which might be causing this error that you encounter. Hope it helps. |
| 04-05-2009, 01:14 AM | #3 |
No custom models are being used, as in nothing has been imported. By modified I meant that I took a unit based off the spirit pig (copy pasted the spirit pig) and set the model to makura pooldweller instead of spirit pig, for example, and did the same from quillboar hunter to a water elemental. Etc., etc. I don't believe it's ability related since the crash occurs on death and not when a unit tries to cast something. The abilities of the 10 units which possibly cause the crash aren't abilities specifically related to death either. Abilities among these 10 units include altered versions of critical strike, crushing wave, banish, war stomp, roar, and a self-targeting permanent immolation. The only one that seems even remotely possible of causing an issue is the self targeting permanent immolation, but I'm only using that because I thought negative health regen values might be causing the crashes. So I removed all the negative regen and replaced it with self-targeting immolation. Besides, the crash occurs on units without the self-targeting immolation as often as it seems to on the units with it. Though there may be some trial and error involved here I don't think it's with the abilities. |
| 04-05-2009, 06:25 AM | #4 | |
There is this. Quote:
What triggers do have running when a unit dies? |
| 04-05-2009, 03:55 PM | #5 |
War3err might help on debugging this error ... when you havent got a 1.21 -version of warcraft you cant use it however ...you might ask someone who got one to test your map for you and tell you the outcome... |
| 04-05-2009, 04:58 PM | #6 |
you are not using orb ffects (including pillage) together with attack ground, right? Common mistake I did more than once. |
| 04-05-2009, 09:31 PM | #7 |
I have a few triggers that activate when a unit dies. This first adds to a kill count on a leaderboard... Player Hero Kills Update Events Unit - A unit Dies Conditions And - All (Conditions) are true Conditions ((Owner of (Killing unit)) controller) Equal to User (((Owner of (Dying unit)) controller) Equal to Computer) or (((Owner of (Dying unit)) controller) Equal to Hostile) Actions Set Kill_Count[(Player number of (Owner of (Killing unit)))] = (Kill_Count[(Player number of (Owner of (Killing unit)))] + 1) Multiboard - Set the text for (Last created multiboard) item in column 4, row Multiboard_Spots[(Player number of (Owner of (Killing unit)))] to (String(Kill_Count[(Player number of (Owner of (Killing unit)))])) I have a couple like the one below, which add gold to a player for killing computer controlled units (though the crashes existed before the gold trigger was added so it's probably not related to this)... One Gold Kills Events Unit - A unit Dies Conditions Or - Any (Conditions) are true Conditions (Unit-type of (Dying unit)) Equal to Hungry Pig (Farm) (Unit-type of (Dying unit)) Equal to Farmhand (Farm) (Unit-type of (Dying unit)) Equal to Shore Crawler (Beach) (Unit-type of (Dying unit)) Equal to Tide Elemental (Beach) Or - Any (Conditions) are true Conditions (Owner of (Dying unit)) Equal to Neutral Hostile (Owner of (Dying unit)) Equal to Player 10 (Light Blue) (Owner of (Dying unit)) Equal to Player 11 (Dark Green) (Owner of (Dying unit)) Equal to Player 12 (Brown) Actions Player - Add 1 to (Owner of (Killing unit)) Current gold There's a few like the one below, which cause spawned units to have a chance to drop a few different items on death... Tide Elemental Items Events Unit - A unit Dies Conditions ((Owner of (Dying unit)) Equal to Neutral Hostile) or (((Owner of (Dying unit)) Equal to Player 10 (Light Blue)) or ((Owner of (Dying unit)) Equal to Player 12 (Brown))) (Unit-type of (Triggering unit)) Equal to Tide Elemental (Freshly Encounter) Actions Set RandomNumber = (Random integer number between 1 and 100) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions RandomNumber Equal to 1 Then - Actions Item - Create Tome of Agility at (Position of (Triggering unit)) Else - Actions Do nothing If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions RandomNumber Equal to 2 Then - Actions Item - Create Tome of Intelligence at (Position of (Triggering unit)) Else - Actions Do nothing If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions RandomNumber Equal to 3 Then - Actions Item - Create Tome of Strength at (Position of (Triggering unit)) Else - Actions Do nothing If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions RandomNumber Equal to 40 Then - Actions Item - Create Rune of Bloodlust at (Position of (Triggering unit)) Else - Actions Do nothing If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions RandomNumber Equal to 41 Then - Actions Item - Create Rune of Bloodlust at (Position of (Triggering unit)) Else - Actions Do nothing If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions RandomNumber Equal to 89 Then - Actions Item - Create Rune of Restoration at (Position of (Triggering unit)) Else - Actions Do nothing If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions RandomNumber Greater than or equal to 91 Then - Actions Item - Create Rune of Mana at (Position of (Triggering unit)) Else - Actions Do nothing And then I have this trigger, which causes eggs to hatch if they die on their own rather than get killed by a player. This prawn egg unit has been known to crash the game on death, but it's not this unit exclusively which crashes the game and it's only crashed when the unit dies to a player and not on its own... Prawn Egg Dies Events Unit - A unit Dies Conditions (Unit-type of (Dying unit)) Equal to Prawn Egg (Beach) (Owner of (Killing unit)) Not equal to Player 1 (Red) (Owner of (Killing unit)) Not equal to Player 2 (Blue) (Owner of (Killing unit)) Not equal to Player 3 (Teal) (Owner of (Killing unit)) Not equal to Player 4 (Purple) Actions Set RandomNumber = (Random integer number between 1 and 4) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions RandomNumber Equal to 1 Then - Actions Set Temp_Point = (Position of (Dying unit)) Special Effect - Create a special effect at Temp_Point using Objects\Spawnmodels\Naga\NagaBlood\NagaBloodWindserpent.mdl Unit - Create 1 Hungry Prawn (Beach) for Player 10 (Light Blue) at Temp_Point facing Default building facing degrees Custom script: call RemoveLocation (udg_Temp_Point) Wait 2.00 seconds Special Effect - Destroy (Last created special effect) Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions RandomNumber Equal to 2 Then - Actions Set Temp_Point = (Position of (Dying unit)) Special Effect - Create a special effect at Temp_Point using Objects\Spawnmodels\Naga\NagaBlood\NagaBloodWindserpent.mdl Unit - Create 2 Hungry Prawn (Beach) for Player 10 (Light Blue) at Temp_Point facing Default building facing degrees Custom script: call RemoveLocation (udg_Temp_Point) Wait 2.00 seconds Special Effect - Destroy (Last created special effect) Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions RandomNumber Equal to 3 Then - Actions Set Temp_Point = (Position of (Dying unit)) Special Effect - Create a special effect at Temp_Point using Objects\Spawnmodels\Naga\NagaBlood\NagaBloodWindserpent.mdl Unit - Create 3 Hungry Prawn (Beach) for Player 10 (Light Blue) at Temp_Point facing Default building facing degrees Custom script: call RemoveLocation (udg_Temp_Point) Wait 2.00 seconds Special Effect - Destroy (Last created special effect) Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions RandomNumber Equal to 4 Then - Actions Set Temp_Point = (Position of (Dying unit)) Special Effect - Create a special effect at Temp_Point using Objects\Spawnmodels\Naga\NagaBlood\NagaBloodWindserpent.mdl Unit - Create 4 Hungry Prawn (Beach) for Player 10 (Light Blue) at Temp_Point facing Default building facing degrees Custom script: call RemoveLocation (udg_Temp_Point) Wait 2.00 seconds Special Effect - Destroy (Last created special effect) Else - Actions I have a few other triggers set to the "a unit dies" event, but the conditions are set specifically for Heroes so they shouldn't be related. Seeing as how the fatal error only happens some of the time and only when a unit is killed by a player I wonder if it could be related to the model art or death animations? Has anyone heard of fatal errors occuring for that reason? |
| 04-05-2009, 09:44 PM | #8 |
I'm not sure what you mean by orb effects. I'm definitely not using pillage in any way and I know that the error occurs both when units die to auto attacks and to a variety of different spells. The Hero doing the killing isn't consistently the same one and I don't believe there's a consistency with the Hero having a certain ability either. |
| 04-06-2009, 08:22 AM | #9 |
I've encountered a problem with "random" crashes in my game as well, though they were usually not associated with death. The problem was that I was using a custom Flamestrike with certain fields set to 0. This caused problems when the custom Flamestrike interacted with a normal Flamestrike. I realize you stated that your abilities seem fine, but I'd like to mention the above in case you are using any abilities with attributes set to 0. The only issue I have with the triggers you posted earlier is using the 2 second Wait inbetween the creation and destruction of special effects. If you are not using local variables in your triggers (which I assume Temp_Point is not since you add a udg_ before it on some lines), it is possible for your trigger to experience some concurrency problems due to sharing Temp_Point and losing control of what the actual last created special effect is. I'm not sure if that's what's causing your game to crash but it looks suspicious to me nonetheless. If you want a substitute for that you can try the following: JASS:call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Naga\\NagaBlood\\NagaBloodWindserpent.mdl", GetUnitX(GetDyingUnit()), GetUnitY(GetDyingUnit()))) This should generate the effect you want (and the entire animation of the 'NagaBloodWindserpent' should play out just fine even though it is being immediately removed). Just remember to remove the Create/Destroy Special Effect and the Wait lines if you do want to use the above code, and add it in place of the custom script line you already have. |
| 04-07-2009, 12:22 AM | #10 |
Ah, interesting. Thanks for that. Are there any particular fields and/or attributes of spells which you know created issues when set to 0? -I have several mods of Hero attribute bonus. One, for example, boosts only intelligence and thus has the strength and agility bonus fields all set to 0. -For one item's dummy spell I have the 'damage' and 'area of effect' values set at 0. Another item's dummy spell has the 'chance to critical strike' and 'damage multiplier' fields set to 0. These items are being held by player controlled Heroes when the crashes occur, but they are not being actively used (clicked on). -Aside from the above mentioned alterations and a few mana costs set at 0; those are my only altered spell values set at 0. I have removed some requirements and adjusted targets allowed in some cases, however. |
| 04-07-2009, 02:03 AM | #11 |
Hmm, not sure if any of those would normally cause any issues then. What happened was that I set the damage intervals to 0 seconds for my custom flamestrike, which gets interpreted by the game engine as infinite. |
| 04-07-2009, 11:25 AM | #12 |
Crashes can occur when you use Chaos to morph a hero into a non-hero. It causes badness whenever it has to deal with experience gaining situations (such as killing units). |
| 04-07-2009, 12:02 PM | #13 |
Also situations when you morph units into another must be of the same type. For example if your initial unit is a hero and ur morphed unit is a creep then that will cause a crash, vice versa for another one. |
