Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 35

Thread: Help To Analyze Crash Dump File Please

  1. #21
    Basic Member
    Join Date
    May 2014
    Posts
    270
    Quote Originally Posted by nostrademous View Post
    Well, clearly "npcTarget:GetNearbyHeroes( nRadius, false, BOT_MODE_NONE );" is failing for you and returning "nil". Please verify that is the case. Then we can brainstorm why that happens.
    This is what the console print
    Code:
    [VScript] npc_dota_creep_goodguys_melee <==< I printed the unit name
    [VScript] Script Runtime Error: ...ripts\vscripts\bots\ability_item_usage_winter_wyvern.lua:148: bad argument #1 to 'pairs' (table expected, got nil)
    stack traceback:
    	[C]: in function 'pairs'
    	...ripts\vscripts\bots\ability_item_usage_winter_wyvern.lua:148: in function 'ConsiderIgnite'
    	...ripts\vscripts\bots\ability_item_usage_winter_wyvern.lua:28: in function <...ripts\vscripts\bots\ability_item_usage_winter_wyvern.lua:14>
    Script function 'AbilityUsageThink' on bot npc_dota_hero_winter_wyvern took 36.575ms
    Is it because the AbilityUsageThink took too long at that time? Maybe I should add npcTarget:IsHero() ?
    Last edited by arz_on4dt; 02-08-2017 at 09:29 AM.

  2. #22
    Basic Member
    Join Date
    Dec 2016
    Posts
    732
    Quote Originally Posted by arz_on4dt View Post
    This is what the console print
    Code:
    [VScript] npc_dota_creep_goodguys_melee <==< I printed the unit name
    [VScript] Script Runtime Error: ...ripts\vscripts\bots\ability_item_usage_winter_wyvern.lua:148: bad argument #1 to 'pairs' (table expected, got nil)
    stack traceback:
    	[C]: in function 'pairs'
    	...ripts\vscripts\bots\ability_item_usage_winter_wyvern.lua:148: in function 'ConsiderIgnite'
    	...ripts\vscripts\bots\ability_item_usage_winter_wyvern.lua:28: in function <...ripts\vscripts\bots\ability_item_usage_winter_wyvern.lua:14>
    Script function 'AbilityUsageThink' on bot npc_dota_hero_winter_wyvern took 36.575ms
    Is it because the AbilityUsageThink took too long at that time? Maybe I should add npcTarget:IsHero() ?
    I really don't understand why you are calling that function from a non-hero unit.. and it looks like you are calling it from a RADIANT melee creep.... which again, will return only friendly heroes, not enemies (unless you were playing DIRE). I am not sure if GetNearby*() work on non-Hero units.... we really should check that as I myself call GetNearby*() from a "tower" unit at times and it is working quirkly... perhaps for the same reason.

    And your time is insane... I would really say you should stay below 3.3ms

  3. #23
    Basic Member
    Join Date
    May 2014
    Posts
    270
    Quote Originally Posted by nostrademous View Post
    I really don't understand why you are calling that function from a non-hero unit.. and it looks like you are calling it from a RADIANT melee creep.... which again, will return only friendly heroes, not enemies (unless you were playing DIRE). I am not sure if GetNearby*() work on non-Hero units.... we really should check that as I myself call GetNearby*() from a "tower" unit at times and it is working quirkly... perhaps for the same reason.

    And your time is insane... I would really say you should stay below 3.3ms
    I thought GetTarget() always return hero so I didn't check if it's a hero or not, but then I realize it's only return hero when bot has mode roam, team roam, gank, or deffend ally. Am I correct? And yep, I only miss that checking for hero on WW. If that time execution exceed 3.3 ms rarely will that affect bot behavior for the entire game? As I said before I only get time execution that exceed 3.3 ms at start of the game (when hero loaded) and around 10 - 20 times in the whole game. Other that that it's always bellow 3.3 ms, if that message occur.
    Last edited by arz_on4dt; 02-08-2017 at 10:39 AM.

  4. #24
    Basic Member
    Join Date
    May 2014
    Posts
    270
    Noooo....!!! The crash is still happening even though I've already fixed miss type, script error and everything. Is it because my script is way too inefficient. I got no script error in console. Bellow is my latest crash dump file after 73+ minutes games which just bots vs bots. Some times it's crash between minutes 15+ at minimum until 73+ at maximum so far. Can you help me give some conclusion from that dump file? Please...

    Dump File
    Last edited by arz_on4dt; 02-09-2017 at 08:43 AM.

  5. #25
    Basic Member
    Join Date
    Dec 2016
    Posts
    732
    So @ChrisC pretty much said that GetNearby*() functions will only ever work for "hero" units. I would fix code to make sure your target is IsHero()

  6. #26
    Basic Member
    Join Date
    May 2014
    Posts
    270
    Quote Originally Posted by nostrademous View Post
    So @ChrisC pretty much said that GetNearby*() functions will only ever work for "hero" units. I would fix code to make sure your target is IsHero()
    I already double check all my implemented bot and only my winter wyvern script that doesn't have check IsHero and that's only that line. It should give an error like WW script if I haven't give it an IsHero() check. It runs properly before I added another 9 new bots, another item usage ( bloodstone & dust), shrine usage, and rain drop, dust, and BoT 2 purchasing code. I have like 65 messages that shows execution time more than 3.3 ms. So it's averaging 65 / 10 = 6.5 messagse / hero in 73+ minutes game, and probably 75% of that 6.5 is > 30 ms/hero. So I can say about 45 of them is more than 30ms. Is it a bad sign?

    Edit : I just got a game with the same script without any crash

    20170210054820_1.jpg
    Last edited by arz_on4dt; 02-09-2017 at 03:50 PM.

  7. #27
    Basic Member
    Join Date
    May 2014
    Posts
    270
    I think I just found the problem. I've delete UseShrine() function that I call in AbilityLevelUpThink(). And so far I played 3 games with the duration more than 30 minutes without any crash even though I use host_timescale x. Is something wrong with my UseShrine() function? Or it just wrong to put that function in AbilityLevelUpThink()? If I can't call it there, where should I call that function? Here is my UseShrine() function :
    Code:
    function UseShrine()
    	local npcBot = GetBot();
    	
    	--[[local nModifier = npcBot:NumModifiers( )
    	for i=0, nModifier do
    		local modName = npcBot:GetModifierName( i )
    		print(modName)
    	end]]--
    	
    	if npcBot:IsIllusion() then
    		return
    	end	
    	
    	if npcBot:HasModifier("modifier_filler_heal") then
    		return
    	end	
    	
    	if  npcBot:GetHealth() / npcBot:GetMaxHealth() > 0.45 then
    		return
    	end
    	
    	local Team = GetTeam();
    	local SJ1 = GetShrine(Team, SHRINE_JUNGLE_1);
    	if GetUnitToUnitDistance(SJ1 , npcBot ) < 1000 and GetShrineCooldown(SJ1) < 1 then
    		npcBot:Action_UseShrine(SJ1)
    		return
    	end
    	local SJ2 = GetShrine(Team, SHRINE_JUNGLE_2);
    	if GetUnitToUnitDistance(SJ2 , npcBot ) < 1000 and GetShrineCooldown(SJ2) < 1 then
    		npcBot:Action_UseShrine(SJ2)
    		return
    	end
    	local SB1 = GetShrine(Team, SHRINE_BASE_1);
    	if GetUnitToUnitDistance(SB1 , npcBot ) < 1000 and GetShrineCooldown(SB1) < 1 then
    		npcBot:Action_UseShrine(SB1)
    		return
    	end
    	local SB2 = GetShrine(Team, SHRINE_BASE_2);
    	if GetUnitToUnitDistance(SB2 , npcBot ) < 1000 and GetShrineCooldown(SB2) < 1 then
    		npcBot:Action_UseShrine(SB2)
    		return
    	end
    	local SB3 = GetShrine(Team, SHRINE_BASE_3);
    	if GetUnitToUnitDistance(SB3 , npcBot ) < 1000 and GetShrineCooldown(SB3) < 1 then
    		npcBot:Action_UseShrine(SB3)
    		return
    	end
    	local SB4 = GetShrine(Team, SHRINE_BASE_4);
    	if GetUnitToUnitDistance(SB4 , npcBot ) < 1000 and GetShrineCooldown(SB4) < 1 then
    		npcBot:Action_UseShrine(SB4)
    		return
    	end
    	local SB5 = GetShrine(Team, SHRINE_BASE_5);
    	if GetUnitToUnitDistance(SB5 , npcBot ) < 1000 and GetShrineCooldown(SB5) < 1 then
    		npcBot:Action_UseShrine(SB5)
    		return
    	end
    end
    Rip Shrine Usage
    Last edited by arz_on4dt; 02-10-2017 at 06:02 AM.

  8. #28
    Basic Member
    Join Date
    Dec 2016
    Posts
    732
    The only thing I can think of is that you don't check the health status of your shrine before calling GetShrineCooldown() or GetUnitToUnitDistance() on it. The shrine could have been killed. Otherwise looks safe/sane to me.

  9. #29
    Basic Member
    Join Date
    May 2014
    Posts
    270
    Quote Originally Posted by nostrademous View Post
    The only thing I can think of is that you don't check the health status of your shrine before calling GetShrineCooldown() or GetUnitToUnitDistance() on it. The shrine could have been killed. Otherwise looks safe/sane to me.
    Hmmmm... So that's why I get access violation on the crash dump file. So the bot try to access shrine that's already dead. That's why most of crash happen when the bot try the high ground push while the opponent team defending and wanted to use shrine that already destroyed. I hope that's the literal problem that cause the crash. Thank you so much
    Last edited by arz_on4dt; 02-10-2017 at 12:50 PM.

  10. #30
    Basic Member
    Join Date
    Dec 2016
    Posts
    180
    two things may be wrong here
    1- the npcTarget maybe nil, so this need to be checked
    2- the function GetTarget() always nil until you set target for roam( if Im not mistaken ). you may need to use setTarget before using this script

    wait for your response man.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •