Author Topic: [Confirm Fix] Unable to draw a path  (Read 237 times)

ushas

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
[Confirm Fix] Unable to draw a path
« on: October 12, 2017, 11:18:28 PM »
(v20, linux)

Decided to create a separated thread for this one.

Problem: In some situations when you right-click on a tile (or maybe also on an enemy when CC) it can happen that the game won't draw the path. Right-clicking afterwards on any tile does nothing. Also, the game won't listen inputs from keyboard (memory fuzzy, need to re-check). However, after changing/reequipping on hand item by clicking on the left interface all starts working all right again.


1. Let's re-post the one instance from the animation freeze thread:
On the first try everybody nicely felt down. However, right after Sam's falling, Ray couldn't step his tile right away being HtH. Nor any other tile, actually, till he changed his weapon at hand. Then it's all ok again.

No errors, but this in the log:
Code: [Select]
ReachableTileScript.SearchForReachableTiles. Method called. Current tile is: (10.0, 2.0) physical position: (12.6, 0.0, -2.0)
...
MouseTrackerScript.Update. Right Click. Tile is: (11.0, 2.0)
BattleControlScript.DetermineRightClickAction. Second click on same tile
BattleControlScript.DetermineRightClickAction. Move requested to unoccupied tile. Move cost: 0 action points: 10
CharacterMovementScript.InvokeStartMovement. Path is null
Ray on (10.0, 2.0) trying to step on a tile at (11.0, 2.0).


It's OldIndustrial2, danger 3, Survivalists. Ray is now standing on that (11.0, 2.0) tile I think.


2. Then there was another when Elena switched to a med kit and wanted to move & heal Sam:

(the clicked on tile is the one highlighted on the picture)

Wasn't much successful in terms of being able to give sure steps how to reproduce.


3. But there is also this report that may or may not relate, by murkki017 on the Steam bug subforum:
Quote from: murkki017
1. I've had two instances where I couldn't end turn while my character was wielding baseball bat; changin used weapon to something else allowed me to end turn.
Edit: It was only end turn button not working. But it has in common changing item solution.


Clues (beware, drawing them practically just from two anecdotal evidences):
-- So far, always when the character was about to turn around (see above - targeted tiles are behind their backs)
-- There was also a full cover wall adjacent to the tile where the first step on the path would be
-- Unit incapacitation nearby happened prior the problematic turn (see images)
-- In case it's related to the pathing, there is also usually several other units around
-- Equipped items (on hand, so far CC): HtH, trauma kit, additionally reported Machete by murkki017


Will continue hunting.
« Last Edit: October 19, 2017, 03:28:16 PM by Daithi »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
Re: Unable to draw a path
« Reply #1 on: October 18, 2017, 04:30:46 PM »
To clarify, is it just path not drawing, or is non UI input completely disabled? (Right-clicking afterwards on any tile does nothing) It sounds like the input is not being re-enabled after an action. Would really like to find out what is causing this. Have a couple of suspicions and have seen this happen a couple of times, but nothing very definite.

Edit: The log would suggest disabled input isn't the problem, as it's registering the input and trying to do something with it, but is it possible that these debug lines come from after the weapon change? If input is disabled, the click should register, but nothing more should happen. You might be on to something with being faced away, wondering if the time to turn to face target is throwing the timing for enabling input off....
« Last Edit: October 18, 2017, 04:44:13 PM by Daithi »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
Re: Unable to draw a path
« Reply #2 on: October 18, 2017, 04:50:14 PM »
Have tried a dozen or so times to recreate the bug being turned away. Wondering if the characters are turned away, and haven't turned back because input is disabled and this may be a symptom of the problem, rather than the cause.

ushas

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
Re: Unable to draw a path
« Reply #3 on: October 18, 2017, 06:56:47 PM »
Uff, let me see: In both case it was at the beginning of a turn. But think it felt as if bugged at the moment when you right-click on a tile and it will not draw a path. And then any right-clicking on any tile or using keys (unsure about all, but for sure you can't change weapon via a shortcut) won't do anything anymore till you change weapon by clicking on that left bottom interface. The log lines of the Ray's issue were from before the weapon change.

Had a log excerpt of Elena's turn in the notes too (before switching weapons, tried right-click on (13.0, 18.0) many times):
Code: [Select]
CharMainScript.CheckIfBleedingReturnKilledAndApplyDamage. Method called. Checking for: Elena Furey
BattleControlScript.FindNextActiveCharacter. Player character at pos 1 is combat capable
BattleControlScript.FindNextActiveCharacter. Elena Furey has not died from fire or bleeding
BCS.CacheCurrentCharacter. Method called for character at pos 1 on char script list. Is player controlled: True name is: Elena Furey
CameraControlScript.GetRequiredCameraPosition: Method called
CameraControlScript.FocusCamera. Method called. Return to default elevation: False target pos: (23.9, 9.0, -24.8) time scale: 1
CharacterContainer.DecreasActivePerkCooldowns. Method called.
BCS.CheckIfPlayerOrAITurn. Method called. Is character delaying turn: False
BattleControlScript.CheckIfPlayerOrAiTurn. Elena Furey is not delaying turn. Restoring AP
APDisplayScript.EnsureCorrectNumberOfAPIconsInList. pre reduction gameobject list count is: 12 script list count: 12
APDisplayScript.EnsureCorrectNumberOfAPIconsInList. post reduction gameobject list count is: 8 script list count: 8
BattleControlScript.EnablePlayerInput. Time is: 2624.307 time until user input enabled: 2584.294
BattleControlScript.EnablePlayerInput. Time is: 2624.307 time until user input enabled: 2584.294 ENABLING
UIManagerScript.HandleCombatUILeftSideButtons. Method called.
ActivePerkManager.ShowActivePanel. Button pressed. Active character is player controlled.
CharMainScript.CacheSelectedUsableItem. Method called. Selected item at pos 2 is: Trauma Kit MK II
CharMainScript.GetUseModeType. Use mode type is: 1 AP cost: 2
CharMainScript.CacheSelectedUsableItem. selected item anim type: 3 last item anim type: 0 / last equipped item model pos: -1 / current equipped item model pos: -1
ReachableTileScript.SearchForReachableTiles. Method called. Current tile is: (12.0, 21.0) physical position: (15.0, 0.0, -24.8)
CombatQueueManager.GenerateCombatantIcons. Method called. PRE GEN. Current list display objects: 6 combatant icon scripts: 6
CombatQueueManager.GenerateCombatantIcons. Method called. POST CURRENT TURN GEN. Current list display objects: 3 combatant icon scripts: 3
BattleControlScript.GetCharScriptListPositionsForPostTurnPortraits. Method called. Number of portraits requested: 4
CombatQueueManager.GenerateCombatantIcons. Method called. POST ALL TURN GEN. Current list display objects: 7 combatant icon scripts: 7
CombatQueueManager.GenerateCombatantIcons. Method called. POST GEN. Current list display objects: 6 combatant icon scripts: 6
ReachableTileScript.CreateReachablePathDisplay. METHOD CALLED.
BattleControlScript.GetTilePhysicalPosition. Method called. Requested tile: (4.0, 13.0)
CameraControlScript.FocusCamera. Method complete
MouseTrackerScript.Update. Right Click. Tile is: (13.0, 18.0)
BattleControlScript.DetermineRightClickAction. Second click on same tile
BattleControlScript.DetermineRightClickAction. Move requested to unoccupied tile. Move cost: 0 action points: 8
CharacterMovementScript.InvokeStartMovement. Path is null
BattleControlScript.DisablePlayerInput. Method called
CharacterVoiceScript.PlayVoiceClip. Method called. Clip type: 1 Char has voice clips: True
MouseTrackerScript.Update. Right Click. Tile is: (13.0, 18.0)
MouseTrackerScript.Update. Right Click. Tile is: (13.0, 18.0)
MouseTrackerScript.CheckIfCTHShouldBeDisplayed. Equipped item is equipment. Subtype is: 0
CharMainScript.GetUseModeType. Use mode type is: 1 AP cost: 2
MouseTrackerScript.Update. Right Click. Tile is: (13.0, 18.0)
MouseTrackerScript.Update. Right Click. Tile is: (13.0, 18.0)
MouseTrackerScript.Update. Right Click. Tile is: (13.0, 18.0)
MouseTrackerScript.Update. Right Click. Tile is: (13.0, 18.0)
MouseTrackerScript.Update. Right Click. Tile is: (14.0, 19.0)
MouseTrackerScript.Update. Right Click. Tile is: (13.0, 19.0)
MouseTrackerScript.Update. Right Click. Tile is: (13.0, 18.0)
UIManagerScript.Update. In combat
UIManagerScript.Update. BCS not null
GameOptionsScript.SwitchOnMenuCanvas. Method called. Scene name is: DowntownMed2
GameOptionsScript.ChangeActiveTopLevelMenuPanel. Method called. Scene name is: DowntownMed2 active panel: 0
GameOptionsScript.SwitchOnMenuCanvas. Not at home. Making save button not interactable.
MouseTrackerScript.CheckIfCTHShouldBeDisplayed. Equipped item is equipment. Subtype is: 0
CharMainScript.GetUseModeType. Use mode type is: 1 AP cost: 2
GameOptions.SwitchOffMenuCanvas. (In combat)
UIManagerScript.HandleBackButtonPressInCombatScene. Method called
UIManagerScript.SwitchOnCombatUI. Method called. Yielding for: 0 seconds
CharMainScript.CheckIfSelectedItemRemoved. Method called
CharacterMainScript.UpdateReachableTiles. Method called for: Elena Furey AP left: 8 Use mode AP: 2
ReachableTileScript.SearchForReachableTiles. Method called. Current tile is: (12.0, 21.0) physical position: (15.0, 0.0, -24.8)
UIManager.HandleBackButtonPress. Clearing active item list (0) and display objects0
MouseTrackerScript.SetCheckingForInput. Method called. Is checking for input: True
UIManagerScript.HandleCombatUILeftSideButtons. Method called.
ReachableTileScript.CreateReachablePathDisplay. METHOD CALLED.
BattleControlScript.GetTilePhysicalPosition. Method called. Requested tile: (4.0, 13.0)
MouseTrackerScript.CheckIfCTHShouldBeDisplayed. Equipped item is equipment. Subtype is: 0
CharMainScript.GetUseModeType. Use mode type is: 1 AP cost: 2
MouseTrackerScript.Update. Right Click. Tile is: (13.0, 19.0)
MouseTrackerScript.Update. Right Click. Tile is: (13.0, 18.0)
MouseTrackerScript.Update. Right Click. Tile is: (13.0, 18.0)
MouseTrackerScript.Update. Right Click. Tile is: (12.0, 18.0)
MouseTrackerScript.Update. Right Click. Tile is: (13.0, 18.0)
MouseTrackerScript.CheckIfCTHShouldBeDisplayed. Equipped item is equipment. Subtype is: 0
CharMainScript.GetUseModeType. Use mode type is: 1 AP cost: 2
MouseTrackerScript.CheckIfCTHShouldBeDisplayed. Equipped item is equipment. Subtype is: 0
CharMainScript.GetUseModeType. Use mode type is: 1 AP cost: 2
MouseTrackerScript.Update. Right Click. Tile is: (13.0, 18.0)
MouseTrackerScript.Update. Right Click. Tile is: (15.0, 19.0)
MouseTrackerScript.Update. Right Click. Tile is: (14.0, 20.0)

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
Re: Unable to draw a path
« Reply #4 on: October 19, 2017, 12:07:07 PM »
From Elena's turn:

Code: [Select]
BattleControlScript.DetermineRightClickAction. Second click on same tile
BattleControlScript.DetermineRightClickAction. Move requested to unoccupied tile. Move cost: 0 action points: 8
CharacterMovementScript.InvokeStartMovement. Path is null
BattleControlScript.DisablePlayerInput. Method called

Two problems.

1) What seems to be happening is that the path is either not being found or is being set to null (probably the latter), then movement starts, and 2) it disables input when there's no event to re-enable it(completing path), so it stays disabled until it is re-activated by changing weapon. Have fixed 2, so that should reduce the severity of the bug to occasionally having to re-click for a path, rather than disabling input also.

Could you send me the entire log, so can see if there's something that might be interfering with the path from the previous turn? A couple of ideas: would you have tabbed away prior to this happening, or just returned from UI? If it happens again, might be worth noting what the previous turn character did at the end of their turn.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
Re: Unable to draw a path
« Reply #5 on: October 19, 2017, 02:48:04 PM »
For 1) have went back through the log file, and the first click on the tile (to draw the path) is being registered as the second click (to execute the path), so no path finding has happened, hence null path. Difficult to say why it's happening, possibly a click from previous turn hasn't been cleared from memory, but shouldn't be a hard fix, and really good to deal with this issue (fingers crossed), as it's been popping up occasionally for some time.

ushas

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
Re: Unable to draw a path
« Reply #6 on: October 19, 2017, 02:55:06 PM »
Ok. She was possibly firing at somebody or so (it will be in the log I guess)... What I was noting were incapacitated units (perhaps shortly) prior those turns - could they somehow interfere?

If you say "possibly a click from previous turn hasn't been cleared from memory", must that be from her own previous turn?

As for tabbing, possible during a combat, don't recall doing it shortly before that moment though. But I also usually first go into the menu.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
Re: Unable to draw a path
« Reply #7 on: October 19, 2017, 03:27:59 PM »
Anything is possible. It's likely going to be an unusual event or combination of events, since this isn't a very frequent issue.

Concerning click from previous turn - from a player character anyway, not necessarily same character - that data isn't being used by AI at all. I've added code to set the data to null, to force pathing on the first right click. Can't confirm it's a fix though since we haven't got a handle on how to recreate, so will keep it in confirm bug fixes. If the input disabled issue is gone, and it's just down to having to click a second time, would be pretty happy with that.

ushas

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
Re: [Confirm Fix] Unable to draw a path
« Reply #8 on: October 19, 2017, 04:32:44 PM »
Sounds promising. Will keep eyes open.

However, do you think it has anything to do with that situation: wielding bat + only end turn button non-responding? Changing item solution indicates maybe it needed resetting input too? But then I dunno about the cause...



PS: As was looking in the log anyway, right before Elena's bugged turn there was Sam's. Just in case of need in future:
Code: [Select]
CharMainScript.CheckIfBleedingReturnKilledAndApplyDamage. Method called. Checking for: Sam Contino
BattleControlScript.FindNextActiveCharacter. Player character at pos 0 is combat capable
BattleControlScript.FindNextActiveCharacter. Sam Contino has not died from fire or bleeding
BCS.CacheCurrentCharacter. Method called for character at pos 0 on char script list. Is player controlled: True name is: Sam Contino
CameraControlScript.GetRequiredCameraPosition: Method called
CameraControlScript.FocusCamera. Method called. Return to default elevation: False target pos: (25.1, 9.0, -24.8) time scale: 1
CharacterContainer.DecreasActivePerkCooldowns. Method called.
BCS.CheckIfPlayerOrAITurn. Method called. Is character delaying turn: False
BattleControlScript.CheckIfPlayerOrAiTurn. Sam Contino is not delaying turn. Restoring AP
BattleControlScript.EnablePlayerInput. Time is: 2616.724 time until user input enabled: 2584.294
BattleControlScript.EnablePlayerInput. Time is: 2616.724 time until user input enabled: 2584.294 ENABLING
UIManagerScript.HandleCombatUILeftSideButtons. Method called.
ActivePerkManager.ShowActivePanel. Button pressed. Active character is player controlled.
ActivePerkManager.InstantiateActivePerkDisplayObject. Method called. Perk number: 8 position in active perk list: 0 character name: Sam Contino
ActivePerkDisplayIconScript.HandleCooldownImage. tuns left: 0 of 2
CharMainScript.CacheSelectedUsableItem. Method called. Selected item at pos 1 is: Baton
CharMainScript.GetUseModeType. Use mode type is: 1 AP cost: 4
CharMainScript.CacheSelectedUsableItem. selected item anim type: 0 last item anim type: 0 / last equipped item model pos: 4 / current equipped item model pos: 4
ReachableTileScript.SearchForReachableTiles. Method called. Current tile is: (13.0, 21.0) physical position: (16.2, 0.0, -24.8)
CombatQueueManager.GenerateCombatantIcons. Method called. PRE GEN. Current list display objects: 4 combatant icon scripts: 4
CombatQueueManager.GenerateCombatantIcons. Method called. POST CURRENT TURN GEN. Current list display objects: 4 combatant icon scripts: 4
BattleControlScript.GetCharScriptListPositionsForPostTurnPortraits. Method called. Number of portraits requested: 3
CombatQueueManager.GenerateCombatantIcons. Method called. POST ALL TURN GEN. Current list display objects: 7 combatant icon scripts: 7
CombatQueueManager.GenerateCombatantIcons. Method called. POST GEN. Current list display objects: 6 combatant icon scripts: 6
ReachableTileScript.CreateReachablePathDisplay. METHOD CALLED.
BattleControlScript.GetTilePhysicalPosition. Method called. Requested tile: (1.0, 9.0)
CameraControlScript.FocusCamera. Method complete
MouseTrackerScript.Update. Right Click. Tile is: (14.0, 18.0)
BattleControlScript.DetermineRightClickAction. Second click on same tile
BattleControlScript.DetermineRightClickAction. Selected tile is null
BattleControlScript.HandlePlayerPathFindingRequest. Character faction is: 0 is crouching: False
MouseTrackerScript.Update. Right Click. Tile is: (14.0, 18.0)
BattleControlScript.DetermineRightClickAction. Second click on same tile
BattleControlScript.DetermineRightClickAction. Move requested to unoccupied tile. Move cost: 3 action points: 12
CharacterMovementScript.InvokeSetupMovement. Path pos: 2
BattleControlScript.DisablePlayerInput. Method called
CharacterVoiceScript.PlayVoiceClip. Method called. Clip type: 1 Char has voice clips: False
CharacterVoiceScript.PlayVoiceClip. Method called. This character doesn't have voice clips
CharMoveScript.SetupMovement. Method called
CharacterMainScript.HideReachableTiles. Method called.
CharacterMovementScript.InvokeSetAimingAnimationParameterFalse. Method called
CTHDisplayObjectScript.SetParticleSelectorBusy. METHOD CALLED
CommandRadiusDetector.OnTriggerEnter. Character has entered collider. Name: Ray Case(Clone)
CommandRadiusScript.HandleCharacterEnteringCommandRadius. Applying leadership bonus to: Ray Case
CharacterMovementScript.PlayFootSteps. Method called. SFX volume is: 0.7
CommandRadiusDetector.OnTriggerEnter. Character has exited collider. Name: Elena Furey(Clone)
CharacterMovementScript.HandleEndOfMovement. Method called for: Sam Contino Is character combat capable: True is moving: False
CharacterMovementScript.HandleEndOfMovement. Path NOT null
CharacterMovementScript.UpdateCurrentTile. Method called. Path position is: 0
CharacterMainScript.UpdateReachableTiles. Method called for: Sam Contino AP left: 9 Use mode AP: 4
ReachableTileScript.SearchForReachableTiles. Method called. Current tile is: (14.0, 18.0) physical position: (17.4, 0.0, -21.2)
BCS.AlertSurroundingEnemies: Criminal at (13.0, 19.0) alerted
BattleControlScript.AlertSurroundingEnemies. Conor Gruszka is not on Sam Contino's adjacent enemy list. Number of enemies on list: 1
CharacterMovement.ClearCurrentLocalPath. PATH BEING SET TO NULL for Sam Contino
CharMainScript.GetCoverLevel. This character is in the open, but not crouched
CharacterMovementScript.HandleReturnOfControl. Method called
BattleControlScript.EnablePlayerInput. Time is: 2621.14 time until user input enabled: 2584.294
BattleControlScript.EnablePlayerInput. Time is: 2621.14 time until user input enabled: 2584.294 ENABLING
ReachableTileScript.CreateReachablePathDisplay. METHOD CALLED.
BattleControlScript.GetTilePhysicalPosition. Method called. Requested tile: (7.0, 9.0)
MouseTrackerScript.Update. Right Click. Tile is: (13.0, 18.0)
BattleControlScript.DetermineRightClickAction. Second click on same tile
BattleControlScript.DetermineRightClickAction. Selected tile is null
BattleControlScript.HandlePlayerPathFindingRequest. Character faction is: 0 is crouching: False
BattlControlScript.EndCharacterTurn. METHOD CALLED for Sam Contino
ConeOfFireScript.ClearAllStrafeLocationMarkers. Method called. Number of strafe locations to destroy: 0
VictoryDefeatConditionManager.CheckVictoryDefeatConditions. Method called. Level won: False mission failed: False
VictoryDefeatConditionManager.GetNumberOfCombatCapableAllies: Count is: 3
VictoryDefeatConditionManager.CheckVictoryDefeatConditions. Combat capable: 3 incapacitated: 0 fled: 0
BattleControlScript.CheckIfVictoryConditionsSatisfied. Criminal at pos: 2 is still combat capable. Not all criminals have been disabled.
VictoryDefeatConditionManager.CheckVictoryDefeatConditions. Number of patrols: 21
CharacterMovement.ClearCurrentLocalPath. PATH BEING SET TO NULL for Sam Contino
BattleControlScript.StandDownAnyMeleeAttackedEnemies. Number of characters that Sam Contino attacked this turn: 0

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
Re: [Confirm Fix] Unable to draw a path
« Reply #9 on: October 19, 2017, 05:23:00 PM »
There is also code which prevents ending turn if an action is underway. A breakdown in this code is possible, where the code is blocked from running and is then fixed by changing item. Will ask about it on Codex.

ushas

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
Re: [Confirm Fix] Unable to draw a path
« Reply #10 on: October 19, 2017, 06:52:19 PM »
Hooray! Recreated!

Edit: Or seems not... I don't know what happened, it was so nicely bugged before alt-tabbed to write here. :-\
« Last Edit: October 19, 2017, 06:56:37 PM by ushas »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
Re: [Confirm Fix] Unable to draw a path
« Reply #11 on: October 19, 2017, 06:56:08 PM »
Have you got the how?

ushas

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
Re: [Confirm Fix] Unable to draw a path
« Reply #12 on: October 19, 2017, 07:00:31 PM »
See edit. But I really thought... Will check the log.
All allies were in CC running around. It was Sam attacking a guy with a bat and then clicked on a tile behind his back. Btw. next to a full-cover.

Edit1 + Edit2: Not sure. There is a long window after an attack when display and input gathering isn't updated yet and if you click at that point it won't give you path. I'm uncertain whether it hadn't gave me path in this instance or afterwards. What then happened is that I escaped to the menu and back and them mouseover at an adjacent enemy and left-clicked to change mode. If the bug wasn't just a hallucination, then doing that corrected the issue. Will return later with some better info (hopefully:)) -- no better info. Conclusion: Inconclusive. Possibly false alarm.
« Last Edit: October 20, 2017, 01:21:26 PM by ushas »