Breakpoint at the Beginning of Flowchart in UiPath Studio Leading to 'Cannot Access a Closed Pipe' Error

:compass: Summary
This article explains the causes and solutions of the “System.ObjectDisposedException: Cannot access a closed pipe” error that can occur due to a breakpoint positioned right before entering the Flowchart activity in UiPath Studio projects.

:puzzle_piece: Error Details

  • UiPath Studio Version: 25.0.166-cloud.20075
  • Error Message:
    System.ObjectDisposedException: Cannot access a closed pipe.
    at System.IO.Pipes.PipeStream.CheckWriteOperations()

    at UiPath.Executor.Debugger.Client.Services.RobotExecutorProxy.StepIntoAsync()

Observed Conditions:

  • Occurs when running in Debug (F7) mode.
  • The breakpoint is placed right before entering the Flowchart activity.
  • When “Continue” or “Step Into” is selected, Studio crashes with the error.
  • The flowchart runs smoothly when using Run (Ctrl+F5).
  • The error is not encountered if the breakpoint is moved inside the Flowchart.

:pushpin: Root Cause of the Problem
The UiPath Studio debug feature establishes inter-process communication (IPC) between the robot and Studio. However, in some cases:

  • A breakpoint stopped just before entering the Flowchart,
  • Timing issues with the Debugger,
    lead to an improper closure of this communication channel, causing the “closed pipe” exception.

:white_check_mark: Temporary Solution

  1. Move the breakpoint inside the Flowchart.
  2. Test using Run instead of Debug.
  3. Remove the breakpoint and recompile the project.

:hammer_and_wrench: Permanent Recommendation

  • Use a stable version of UiPath Studio.
  • When placing breakpoints, consider the flow structure.
  • A bug report can be submitted to UiPath.

:card_index_dividers: Affected Components

  • Flowchart activity
  • UiPath.Debugger
  • System.IO.Pipes
  • Breakpoint mechanism
  • Studio – Robot communication (IPC)

:paperclip: Note
This error is not limited to a specific template; it may occur in any UiPath project, especially when working with structures like Flowcharts during the debug process. Developers are advised to take this into account when positioning debug points.