Game Crashes When Certain Unit Dies

fr0ggE

New Member
Reaction score
1
I have an "Escort the Caravan" style Quest at the beginning of my map. There is a "Caravan Leader" who is involved in several triggers.

When the Caravan Leader dies, the game usually crashes between 5 seconds and a minute later. I figure that somewhere some trigger is running and asking him to do something, and because he is dead, the game crashes.

I tried destroying all the triggers that could do that when he dies, but the game still crashes.

I tried creating another "Caravan Leader" out of the way somewhere, and rebinding the variable, so that when random triggers run and ask him to do something he still can. It still crashes.

Here are some excerpts from the "Crash Report", which I don't know how to parse.

------------------
Exception Type: EXC_CRASH (SIGILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0

Thread 0 Crashed:
0 libSystem.B.dylib 0x937b2286 mach_msg_trap + 10
1 libSystem.B.dylib 0x937b9a7c mach_msg + 72
2 ...ple.CoreServices.CarbonCore 0x91a1c0f9 YieldToThread + 478
3 com.blizzard.WarcraftIII 0x00010de9 0x1000 + 65001
4 com.blizzard.WarcraftIII 0x000041c8 0x1000 + 12744
5 com.blizzard.WarcraftIII 0x000031a6 0x1000 + 8614
6 com.blizzard.WarcraftIII 0x0000bdcb 0x1000 + 44491
7 com.apple.HIToolbox 0x9237311d DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1181
8 com.apple.HIToolbox 0x9237255b SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 405
9 com.apple.HIToolbox 0x923723c0 SendEventToEventTargetWithOptions + 58
10 com.apple.HIToolbox 0x923a0d34 ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 356
11 com.apple.HIToolbox 0x923734d6 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2134
12 com.apple.HIToolbox 0x9237255b SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 405
13 com.apple.HIToolbox 0x9238eeac SendEventToEventTarget + 52
14 com.apple.HIToolbox 0x923fba4c ToolboxEventDispatcher + 86
15 com.apple.HIToolbox 0x923f82a2 RunApplicationEventLoop + 222
16 com.blizzard.WarcraftIII 0x0000bee6 0x1000 + 44774
17 com.blizzard.WarcraftIII 0x00003a8b 0x1000 + 10891
18 com.blizzard.WarcraftIII 0x0000643a 0x1000 + 21562
19 com.blizzard.WarcraftIII 0x0000278a 0x1000 + 6026
20 com.blizzard.WarcraftIII 0x000026a5 0x1000 + 5797

....and later

Thread 0 crashed with X86 Thread State (32-bit):
eax: 0x10004005 ebx: 0x91a1bf26 ecx: 0xbfffefec edx: 0x937b2286
edi: 0x00000000 esi: 0x00000000 ebp: 0xbffff028 esp: 0xbfffefec
ss: 0x0000001f efl: 0x00000206 eip: 0x937b2286 cs: 0x00000007
ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037
cr2: 0xffe2a7b4

----------------------------

Thanks in advance for any suggestions!
 

fr0ggE

New Member
Reaction score
1
I did remake the unit.

It's possible the crash is from something else. I just noticed that every time he dies, the game crashes, but if you protect him the whole way there will usually (not always) be no crashes.

Is it possible to tell from the Error Report which trigger is causing the crash?
 

fr0ggE

New Member
Reaction score
1
What is the best method for figuring out what is causing your crashes?

Thanks for the help.
 

fr0ggE

New Member
Reaction score
1
I do have such a trigger.

I've also added a new condition to many of the triggers using him "Caravan_Leader_Alive = True" which gets set false when he dies.

Trigger:
  • Caravan Leader Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Dying unit) Equal to Caravan_Leader
    • Actions
      • Set Caravan_Leader_Alive = False
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off Caravan Close Enough <gen>
      • Trigger - Turn off Caravan Movement <gen>
      • Trigger - Turn off Ambush is Defeated <gen>
      • Trigger - Turn off Replace or Ice Prison on Leader <gen>
      • Trigger - Turn off Replace Ice Prison Timer Expires <gen>
      • Trigger - Turn off Life of Caravan Leader gets too low <gen>
      • Quest - Mark Quest_EscortCaravan as Failed
      • Quest - Display to (All players) the Quest Update message: Escort the Caravan ...
      • Unit - Create 1 Caravan Leader for Neutral Passive at (Center of Hero Select <gen>) facing Default building facing degrees
      • Set Caravan_Leader = (Last created unit)
      • Set LeadWagon = Artane
      • Wait 1.00 seconds
      • Unit - Order FollowWagon to Follow LeadWagon
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (FigurineOfPower_CaravanLeader is alive) Equal to True
        • Then - Actions
          • Unit - Kill FigurineOfPower_CaravanLeader
        • Else - Actions
 

fr0ggE

New Member
Reaction score
1
Would it help if I posted all my triggers relating to this unit? (There are 16 of them, but a few are definitely not the problem)

Thanks.
 

13lade619

is now a game developer :)
Reaction score
398
hmm... this seems to be useful.. maybe?

Code:
7 com.apple.HIToolbox 0x9237311d DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1181
8 com.apple.HIToolbox 0x9237255b SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 405
9 com.apple.HIToolbox 0x923723c0 SendEventToEventTargetWithOptions + 58
10 com.apple.HIToolbox 0x923a0d34 ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 356
11 com.apple.HIToolbox 0x923734d6 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2134
12 com.apple.HIToolbox 0x9237255b SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 405
13 com.apple.HIToolbox 0x9238eeac SendEventToEventTarget + 52
14 com.apple.HIToolbox 0x923fba4c ToolboxEventDispatcher + 86
15 com.apple.HIToolbox 0x923f82a2 RunApplicationEventLoop + 222
maybe inside a loop? there;s an error...
you ommited some in the error message. maybe the full thing will help.
 

fr0ggE

New Member
Reaction score
1
OK, I've found a likely culprit. I added a Game Display Text to the beginning of all likely triggers and played. Everything was running at the right time, but when I killed the Caravan Leader, after a while this trigger started running in an infinite loop. What happened was, the "Caravan_Visibility_Unit" (an invisible unit that lets a chain lightning guy have vision to blink in and cast CL) who had been following the Caravan Leader, I had never reordered to follow the "LeadWagon" (which is the new leader).

However, sometimes the game crashes instantly upon the leader's death, and sometimes it goes for a while. In the test game I played, even after the infinite loop began, the game did not crash right away, so I wonder if this is just one crash of several. TT

Trigger:
  • Blinker Chain Lightning AI
    • Events
      • Time - Every 15.00 seconds of game time
    • Conditions
      • Ambush_InCombat Equal to True
    • Actions
      • Game - Display to (All players) for 15.00 seconds the text: Running Blinker Cha...
      • Wait 1.00 seconds
      • Set BlinkerAttackAbility = Lightning (Ambush)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 3) Equal to 1
        • Then - Actions
          • Set BlinkerTarget = Artane
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 2) Equal to 1
            • Then - Actions
              • Set BlinkerTarget = Silis
            • Else - Actions
              • Set BlinkerTarget = LeadWagon
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (BlinkerTarget is visible to Player 11 (Dark Green)) Equal to True
          • BlinkerTarget Not equal to IcePrisonTargetUnit
        • Then - Actions
          • Unit - Add Blinker (Ambush) to Blinker
          • Unit - Order Blinker to Night Elf Warden - Blink ((Position of BlinkerTarget) offset by ((Random real number between 100.00 and 300.00), (Random real number between 100.00 and 300.00)))
          • Wait 0.50 seconds
          • Unit - Order Blinker to Orc Far Seer - Chain Lightning BlinkerTarget
          • Wait 1.00 seconds
          • Unit - Order Blinker to Night Elf Warden - Blink (Center of Spawn Ambush Blinker Ambusher <gen>)
          • Wait 1.00 seconds
          • Unit - Remove Blinker (Ambush) from Blinker
        • Else - Actions
          • Trigger - Run (This trigger) (checking conditions)


Thanks for the help. I'll let you know if it keeps crashing after adding a

"Move Bandit_Vision_Unit instantly to position of LeadWagon"
"Order Bandit_Vision_Unit to Follow Lead_Wagon"

to the else clause at the end
 

Dest

New Member
Reaction score
26
OK, I've found a likely culprit. I added a Game Display Text to the beginning of all likely triggers and played. Everything was running at the right time, but when I killed the Caravan Leader, after a while this trigger started running in an infinite loop. What happened was, the "Caravan_Visibility_Unit" (an invisible unit that lets a chain lightning guy have vision to blink in and cast CL) who had been following the Caravan Leader, I had never reordered to follow the "LeadWagon" (which is the new leader).

However, sometimes the game crashes instantly upon the leader's death, and sometimes it goes for a while. In the test game I played, even after the infinite loop began, the game did not crash right away, so I wonder if this is just one crash of several. TT

Trigger:
  • Blinker Chain Lightning AI
    • Events
      • Time - Every 15.00 seconds of game time
    • Conditions
      • Ambush_InCombat Equal to True
    • Actions
      • Game - Display to (All players) for 15.00 seconds the text: Running Blinker Cha...
      • Wait 1.00 seconds
      • Set BlinkerAttackAbility = Lightning (Ambush)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 3) Equal to 1
        • Then - Actions
          • Set BlinkerTarget = Artane
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 2) Equal to 1
            • Then - Actions
              • Set BlinkerTarget = Silis
            • Else - Actions
              • Set BlinkerTarget = LeadWagon
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (BlinkerTarget is visible to Player 11 (Dark Green)) Equal to True
          • BlinkerTarget Not equal to IcePrisonTargetUnit
        • Then - Actions
          • Unit - Add Blinker (Ambush) to Blinker
          • Unit - Order Blinker to Night Elf Warden - Blink ((Position of BlinkerTarget) offset by ((Random real number between 100.00 and 300.00), (Random real number between 100.00 and 300.00)))
          • Wait 0.50 seconds
          • Unit - Order Blinker to Orc Far Seer - Chain Lightning BlinkerTarget
          • Wait 1.00 seconds
          • Unit - Order Blinker to Night Elf Warden - Blink (Center of Spawn Ambush Blinker Ambusher <gen>)
          • Wait 1.00 seconds
          • Unit - Remove Blinker (Ambush) from Blinker
        • Else - Actions
          • Trigger - Run (This trigger) (checking conditions)


Thanks for the help. I'll let you know if it keeps crashing after adding a

"Move Bandit_Vision_Unit instantly to position of LeadWagon"
"Order Bandit_Vision_Unit to Follow Lead_Wagon"

to the else clause at the end

That's not probably it. It has to do something with handles - do you have any JASS triggers made?
 

fr0ggE

New Member
Reaction score
1
There is no Jass in the map, and I play in version 1.24.

The map seems to have stopped crashing. It could have been then new 1.24b patch, or maybe fixing the chainlightning trigger helped.

I'll post again if it starts crashing.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top