• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Can't find the problem (crash)

Status
Not open for further replies.
Level 4
Joined
Sep 28, 2016
Messages
47
Hi all,

As hard as I try, I can't find the problem. I think it's a desync. It happens to player 2 right after player 2 gets the message: "Play Town Music Now." which is in the 2nd trigger below.

  • MUSIC Check Region CC
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • -------- Town --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • (HEROES[(Integer A)] belongs to an ally of Player 5 (Yellow)) Equal to True
                      • (CCTownRegion <gen> contains HEROES[(Integer A)]) Equal to True
                      • (HEROES[(Integer A)] is alive) Equal to True
                  • And - All (Conditions) are true
                    • Conditions
                      • (HEROES[(Integer A)] belongs to an ally of Player 10 (Light Blue)) Equal to True
                      • (RRTownRegion <gen> contains HEROES[(Integer A)]) Equal to True
                      • (HEROES[(Integer A)] is alive) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MUSIC_TownPlaying[(Integer A)] Equal to False
                • Then - Actions
                  • Set MUSIC_TownPlaying[(Integer A)] = True
                  • Set GENERIC_CreatePoint = (Center of RGD TankSpawn <gen>)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (MUSIC_DummyUnit[(Integer A)] is alive) Equal to True
                    • Then - Actions
                      • Unit - Kill MUSIC_DummyUnit[(Integer A)]
                    • Else - Actions
                  • Unit - Create 1 MUSICDUMMY Town (Copy this blank dummy for any purpose) for (Player((Integer A))) at GENERIC_CreatePoint facing Default building facing degrees
                  • -------- 138 seconds is the length of music track, +2.25 for wait change. --------
                  • Unit - Add a 140.25 second Generic expiration timer to (Last created unit)
                  • Set MUSIC_DummyUnit[(Integer A)] = (Last created unit)
                  • Custom script: call RemoveLocation (udg_GENERIC_CreatePoint)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MUSIC_CustomValue Less than 100
                    • Then - Actions
                      • Set MUSIC_CustomValue = (MUSIC_CustomValue + 1)
                    • Else - Actions
                      • Set MUSIC_CustomValue = 1
                  • Game - Display to (All players matching ((Matching player) Equal to (Player((Integer A))))) the text: (Custom value is: + (String(MUSIC_CustomValue)))
                  • Unit - Set the custom value of (Last created unit) to MUSIC_CustomValue
                  • Set MUSIC_WaitCount[MUSIC_CustomValue] = 0.00
                  • Unit Group - Add (Last created unit) to MUSIC_UnitGroup
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (HEROES[(Integer A)] belongs to an ally of Player 5 (Yellow)) Equal to True
                    • Then - Actions
                      • Set GENERIC_SoundForPlayer = (Player((Integer A)))
                      • Custom script: if GetLocalPlayer() == udg_GENERIC_SoundForPlayer then
                      • Custom script: call CinematicFilterGenericBJ( 0.50, BLEND_MODE_BLEND, "TownCC.blp", 0.00, 0.00, 0.00, 100, 100.00, 100.00, 100.00, 0 )
                      • Custom script: endif
                    • Else - Actions
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of MUSIC_DummyUnit[(Integer A)]) Equal to MUSICDUMMY Town (Copy this blank dummy for any purpose)
                • Then - Actions
                  • Unit - Kill MUSIC_DummyUnit[(Integer A)]
                • Else - Actions
2nd trigger.

  • MUSIC Periodic Wait
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
      • (MUSIC_UnitGroup is empty) Equal to False
    • Actions
      • Unit Group - Pick every unit in MUSIC_UnitGroup and do (Actions)
        • Loop - Actions
          • Set MUSIC_PlayerTemp = (Owner of (Picked unit))
          • Set MUSIC_PlayerHeroTemp = HEROES[(Player number of (Owner of (Picked unit)))]
          • Set MUSIC_PlayerNumberTemp = (Player number of (Owner of (Picked unit)))
          • Set MUSIC_TempInt = (Custom value of (Picked unit))
          • Set MUSIC_WaitCount[MUSIC_TempInt] = (MUSIC_WaitCount[MUSIC_TempInt] + 2.00)
          • -------- Town --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MUSIC_WaitCount[MUSIC_TempInt] Equal to 4.00
              • (Unit-type of (Picked unit)) Equal to MUSICDUMMY Town (Copy this blank dummy for any purpose)
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • (HEROES[MUSIC_PlayerNumberTemp] belongs to an ally of Player 5 (Yellow)) Equal to True
                          • (CCTownRegion <gen> contains HEROES[MUSIC_PlayerNumberTemp]) Equal to True
                          • (HEROES[MUSIC_PlayerNumberTemp] is alive) Equal to True
                      • And - All (Conditions) are true
                        • Conditions
                          • (HEROES[MUSIC_PlayerNumberTemp] belongs to an ally of Player 10 (Light Blue)) Equal to True
                          • (RRTownRegion <gen> contains HEROES[MUSIC_PlayerNumberTemp]) Equal to True
                          • (HEROES[MUSIC_PlayerNumberTemp] is alive) Equal to True
                • Then - Actions
                  • Game - Display to (All players matching ((Matching player) Equal to (Owner of (Picked unit)))) the text: Play Town Music Now.
                  • Set GENERIC_SoundForPlayer = (Owner of (Picked unit))
                  • Custom script: if GetLocalPlayer() == udg_GENERIC_SoundForPlayer then
                  • Custom script: call VolumeGroupSetVolumeBJ( SOUND_VOLUMEGROUP_MUSIC, 80.00 )
                  • Custom script: call PlayMusic(gg_snd_MAINISLAND_TOWN__The_Scumm_Bar)
                  • Custom script: call CinematicFadeBJ( bj_CINEFADETYPE_FADEIN, 1.00, "TownCC.blp", 100.00, 100.00, 100.00, 0.00 )
                  • Custom script: endif
                  • Unit Group - Remove (Picked unit) from MUSIC_UnitGroup
                • Else - Actions
                  • Game - Display to (All players matching ((Matching player) Equal to (Owner of (Picked unit)))) the text: Not actually in tow...
                  • Set GENERIC_SoundForPlayer = (Owner of (Picked unit))
                  • Custom script: if GetLocalPlayer() == udg_GENERIC_SoundForPlayer then
                  • Custom script: call CinematicFadeBJ( bj_CINEFADETYPE_FADEIN, 1.00, "TownCC.blp", 100.00, 100.00, 100.00, 0.00 )
                  • Custom script: endif
                  • Unit - Kill (Picked unit)
                  • Unit Group - Remove (Picked unit) from MUSIC_UnitGroup
            • Else - Actions
If I disable these triggers, there is no crash. Anyone have any ideas? I thought I kept the local triggers enclosed within their appropriate GetLocalPlayer() statements.

EDIT: By the way - You start the map in that town region, so the music starts playing. It crashes when I do nothing but wait. I stay exactly still inside that region.
 
Last edited:
Level 13
Joined
Mar 24, 2013
Messages
1,105
You say both crash and desync, which is it?

If I had to guess from a cursory glance, I'd say some of the Cinematic stuff you're doing cannot be done locally.

I could be wrong, try searching around on here to see if the things you are using are safe.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
I think it's a desync.
A desync is when the host coordination server drops a player or notifies everyone that a desync has occurred. No clients crash and all clients can potentially keep playing the same session alone if allowed to.

A crash is when the game stops progressing for one reason or another. This can take on multiple forms. A fatal application error will boot one to desktop with a popup notifying of the error. Some fatal application errors just boot to desktop with no popup. An infinite loop will cause the game to become unresponsive and stall in its current state, and may require manual termination from task manager to close.

So which is it?

I see fade filters are being used. I recall someone mentioning that specifying an invalid BLP file for a fade filter will cause a crash.
 
Status
Not open for further replies.
Top