[Bug] BinarySelector and Breakpoint

NodeCanvas Forums Support [Bug] BinarySelector and Breakpoint

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13677
    psykaw
    Participant

    I think there is a bug with BinarySelector and breakpoint.
    If I set a breakpoint on a BinarySelector which is not dynamic, it’s always the true connection which is executed (cf screesnhots).
    BinarySelector BugFalse Condition
    The breakpoint puts node status at Running and the BinarySelector check if status == Resting to check conditions.
    Why breapoint puts node status at Running ?

    Thanks.

    Attachments:
    You must be logged in to view attached files.
    #13682
    Gavalakis
    Keymaster

    Thanks for the report.
    It’s actually a bug in the way I handled breakpoints when Unity Editor is also paused and not a problem with Binary per-se.
    Here is the fix:
    1) Node.Execute, right after the log:

    2) Change the YieldBreak coroutine to this:

    Breakpoints puts node to Status.Running to fake mid code execution and since the breakpoint is handled before the node is actually executed.

    Thank you.

    Join us on Discord: https://discord.gg/97q2Rjh

    #13685
    psykaw
    Participant

    Hey,

    The fix doesn’t solve the issue. Binary Selector execute true connection even if condition return false.

    #13693
    Gavalakis
    Keymaster

    Oh. I’ve mised the part where you said “when it’s not dynamic”.
    So, I took another look at this. Probably the best “global” fix is to use a flag that a breakpoint is reached and reset the flag (as well as the status of the node back to Resting after resuming. Here is the current code changes which I’ve tested and work fine so far:

    You will of course need to add a private bool breakPointReached; to the class as well.

    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.