• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Problem with fatal error

Status
Not open for further replies.
Level 2
Joined
Feb 24, 2010
Messages
8
Since this is probably related to some trigger, i will post here:


everytime I play my map on LAN, everyone have a fatal error after 5~10 minutes. I already looked for leaks or possible trigger errors, but the problem still remains. I attached the map to this topic so anyone can see the triggers. Also, any comment about the triggering (that is pretty bad I admit) or some random error is also welcome.
 

Attachments

  • Jean Castle Footman v2.4e.w3x
    607.8 KB · Views: 57
Level 2
Joined
Feb 24, 2010
Messages
8
Not just triggers can be the source of a fatal error. Was it a ACCESS_VIOLATION error? Could the memory not be 'read' or not be 'written'? Was there any special/conspicious event occuring that might help identify it? Which features were in use?

Yes, it is an ACCESS_VIOLATION "memory could not be read", but since it happens with everyone playing the map, I thought it would be probably related with one of the triggers. As I said, it happened everytime I tested the map with my friends after 5~~ minutes playing, generally when everyone is using their footmen.
 
Level 8
Joined
Apr 26, 2011
Messages
403
It may cause by :

- unit still have skill, but that skill ready deleted)
- unit can upgrade to Unit_B, but you accident delete unit_b
- read your map's JASS file (eg, .j file), search for GetLocalPlayer(), this is most common function that result fatel error.
- "Pan camera as necessary" will cause fatel error, try use "Pan camera time" instead
- check your code to make sure you dont do something stupit, like player(-1)
- check your JASS code to make sure you don't do something stupit, like call Function_A .... and Function_A never exit....

and finally, map with massive leak/lag can cause fatel error.
 
Level 2
Joined
Feb 24, 2010
Messages
8
It may cause by :

- unit still have skill, but that skill ready deleted)
- unit can upgrade to Unit_B, but you accident delete unit_b
- read your map's JASS file (eg, .j file), search for GetLocalPlayer(), this is most common function that result fatel error.
- "Pan camera as necessary" will cause fatel error, try use "Pan camera time" instead
- check your code to make sure you dont do something stupit, like player(-1)
- check your JASS code to make sure you don't do something stupit, like call Function_A .... and Function_A never exit....

and finally, map with massive leak/lag can cause fatel error.

Thanks, I checked the jass file and no getlocalplayer could be found, and I'm also not using pan camera as necessary, so its probably a skill/unit deleted that i'm trying to access, or some idiot error I did in triggers.

Since I'm here, I have another question: can a Upgrade cause fatal error? I remember having fatal errors in another map because of a MAX HP upgrade (that I also have in this map)
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
- read your map's JASS file (eg, .j file), search for GetLocalPlayer(), this is most common function that result fatel error.
- "Pan camera as necessary" will cause fatel error, try use "Pan camera time" instead

These cause desyncs, not fatal errors. There are a lot of things that can conjure a fatal error. Next to calling functions with invalid parameters like mentioned Player(<number out of bounds>), the various object editor abilities and properties can be faulty. You may try to reconstruct the problem by testing things one after another instead of wildly pressing buttons. You may also temporarily disable features and see if the problem still occurs.
 
Level 8
Joined
Apr 26, 2011
Messages
403
Since I'm here, I have another question: can a Upgrade cause fatal error? I remember having fatal errors in another map because of a MAX HP upgrade (that I also have in this map)

I am not sure how you handle HP upgrade, if you use Trigger to handle upgrade, then watch out for invalid index or invalid skill/item (eg, you may use trigger to assign new skill level or new item for each upgrade)

for GUI: index start from 1,2,3,4,5
for JASS, it start from 0,1,2,3,4.

so check out your custom script under your GUI to make sure it have invalid index?

also, inside your warcraft 3 folder, there are one folder for Error log. you can open them with textpad or similar program, then looking for 4 digit code.
eg, if your ability's code is "AB80", and this ability cause crash, then you will found "AB80" inside error log. (and "AB80" will happen more than 1 time in that error log)
 
Level 2
Joined
Dec 26, 2011
Messages
6
Hiyaa, Im New Here,
I Have A Problem, My Trigger Has A Problem, When I Put A Correct Trigger, And I've Save The Map With Trigger, The Trigger Say's

this map now requires the expansion because:
-custom ability data have been specified (object editor)

this map is no longer considered a melee map because:
-custom triggers have been specified
-custom ability data have been specified

error:
trigger 'untiled trigger 001' has been disabled due to errors


//===========================================================================
//
// Just another Warcraft III map
//
// Warcraft III map script
// Generated by the Warcraft III World Editor
// Date: Wed Dec 28 11:57:00 2011
// Map Author: Unknown
//
//===========================================================================

//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************

globals
// Generated
trigger gg_trg_Untitled_Trigger_001 = null
endglobals

function InitGlobals takes nothing returns nothing
endfunction

//***************************************************************************
//*
//* Triggers
//*
//***************************************************************************

//===========================================================================
// Trigger: Untitled Trigger 001
//===========================================================================
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction

//===========================================================================
function InitCustomTriggers takes nothing returns nothing
call InitTrig_Untitled_Trigger_001( )
endfunction

//===========================================================================
function RunInitializationTriggers takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Untitled_Trigger_001 )
endfunction

//***************************************************************************
//*
//* Players
//*
//***************************************************************************

function InitCustomPlayerSlots takes nothing returns nothing

// Player 0
call SetPlayerStartLocation( Player(0), 0 )
call SetPlayerColor( Player(0), ConvertPlayerColor(0) )
call SetPlayerRacePreference( Player(0), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(0), true )
call SetPlayerController( Player(0), MAP_CONTROL_USER )

endfunction

function InitCustomTeams takes nothing returns nothing
// Force: TRIGSTR_002
call SetPlayerTeam( Player(0), 0 )

endfunction

//***************************************************************************
//*
//* Main Initialization
//*
//***************************************************************************

//===========================================================================
function main takes nothing returns nothing
call SetCameraBounds( -3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), -3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )
call SetDayNightModels( "Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl" )
call NewSoundEnvironment( "Default" )
call SetAmbientDaySound( "LordaeronSummerDay" )
call SetAmbientNightSound( "LordaeronSummerNight" )
call SetMapMusic( "Music", true, 0 )
call InitBlizzard( )
call InitGlobals( )
call InitCustomTriggers( )
call RunInitializationTriggers( )

endfunction

//***************************************************************************
//*
//* Map Configuration
//*
//***************************************************************************

function config takes nothing returns nothing
call SetMapName( "Just another Warcraft III map" )
call SetMapDescription( "Nondescript" )
call SetPlayers( 1 )
call SetTeams( 1 )
call SetGamePlacement( MAP_PLACEMENT_USE_MAP_SETTINGS )

call DefineStartLocation( 0, 1702.2, -564.0 )

// Player setup
call InitCustomPlayerSlots( )
call SetPlayerSlotAvailable( Player(0), MAP_CONTROL_USER )
call InitGenericPlayerSlots( )
endfunction
 
Status
Not open for further replies.
Top