Skip to content

[Question] Simulation App hangs when closing as does simulation context. #3475

Closed

Description

@bkolligs

Question

I'm trying to gracefully shutdown my application but the two methods that I would expect to work here hang: SimulationContext.stop() and SimulationApp.stop.

SimulationApp.stop

With verbosity increased, I see the following output after a call to simulation_app.stop:

2025-09-16T19:33:53Z [70,301ms] [Verbose] [omni.datastore] Disk size in budget: 5853240, budget: 102400 MiB
2025-09-16T19:34:23Z [100,306ms] [Verbose] [omni.datastore] Disk size in budget: 5853240, budget: 102400 MiB
2025-09-16T19:34:53Z [130,308ms] [Verbose] [omni.datastore] Disk size in budget: 5853240, budget: 102400 MiB
2025-09-16T19:35:23Z [160,311ms] [Verbose] [omni.datastore] Disk size in budget: 5853240, budget: 102400 MiB

Any idea why this would be occurring? Thanks!

MRE

Isaac Lab 2.2 installed through pip.
Isaac Sim 5.0 installed through pip.

dependencies = [
    "isaacsim[all,extscache]==5.0.0; sys_platform == 'linux'",
    "isaaclab[all,isaacsim]==2.2.0; sys_platform == 'linux'",
]
import argparse
import pickle
from pathlib import Path
import threading

from isaaclab.app import AppLauncher

# add argparse arguments
parser = argparse.ArgumentParser(
    description="Simulating grasps in a parallel environment"
)
parser.add_argument(
    "--num_envs", type=int, default=1, help="Number of environments to spawn."
)

parser.add_argument("-o", "--output_dir", type=str, default="replicator_output")
# append AppLauncher cli args
AppLauncher.add_app_launcher_args(parser)
# parse the arguments
args = parser.parse_args()

# launch omniverse app
app_launcher = AppLauncher(args)
simulation_app = app_launcher.app


import isaaclab.sim as sim_utils  # noqa: E402
import torch  # noqa: E402
from isaaclab.actuators import ImplicitActuatorCfg  # noqa: E402
from isaaclab.assets import AssetBaseCfg, RigidObjectCfg  # noqa: E402
from isaaclab.assets.articulation import ArticulationCfg  # noqa: E402
from isaaclab.scene import InteractiveScene, InteractiveSceneCfg  # noqa: E402


class SimulationCfg(InteractiveSceneCfg):
    """Designs the scene."""

    # lights
    dome_light = AssetBaseCfg(
        prim_path="/World/Light",
        spawn=sim_utils.DomeLightCfg(intensity=3000.0, color=(0.75, 0.75, 0.75)),
    )


def main() -> None:
    """Main function."""

    sim_cfg = sim_utils.SimulationCfg(device=args.device)
    sim = sim_utils.SimulationContext(sim_cfg)
    sim.set_camera_view([3.5, 0.0, 3.2], [0.0, 0.0, 0.5])
    scene_cfg = SimulationCfg(args.num_envs, env_spacing=1.0)
    scene = InteractiveScene(scene_cfg)

    sim.reset()
    scene.reset()

    print(threading.enumerate())
    simulation_app.close()


if __name__ == "__main__":
    main()

Activity

  1. PeterL-NV commented on Sep 16, 2025

    @PeterL-NV
    Contributor

    Thanks for reporting this. Seems the issue is with sim.reset(). If you comment that out, simulation_app.close() will not hang. Will follow up.

  2. bkolligs commented on Sep 17, 2025

    @bkolligs
    Author

    Interesting, during my application though I am calling sim.reset() frequently as I cycle through random positions, so how can i call it while maintaining the ability to close the app?

  3. PeterL-NV commented on Sep 17, 2025

    @PeterL-NV
    Contributor

    We're working on a fix. I think you don't need to make any change in your application. Just your app will not close gracefully for now, you can use Ctr + C to close it as a WAR.

  4. bkolligs commented on Sep 17, 2025

    @bkolligs
    Author

    Sounds great thanks!

  5. matthewtrepte commented on Sep 22, 2025

    @matthewtrepte
    Collaborator

    @bkolligs can you please update to the latest release of IsaacLab and IsaacSim and try again?

  6. bkolligs commented on Oct 27, 2025

    @bkolligs
    Author

    @matthewtrepte I am using the Isaac Lab pip installable, and so 2.2.0 is the latest release available.

  7. kyounginbaik commented on Jan 12, 2026

    @kyounginbaik

    I think issue fixed? My code is not being terminated properly.

  8. AntoineRichard commented on Aug 27, 2026

    @AntoineRichard
    Collaborator

    Thanks @bkolligs for the minimal repro — it made this easy to re-test properly.

    We ran your exact MRE shape on current develop (Isaac Lab 3.x / Isaac Sim 6.x), headless: AppLauncher → SimulationContext → InteractiveScene (dome light only) → sim.reset() + scene.reset() → simulation_app.close(). The process exits cleanly with code 0 in about 4 seconds, with a no-reset control run behaving identically — no hang, no SIGKILL needed.

    @exaFLOPs26 — if your application still doesn't terminate on a current release, that's likely a different exit path; a fresh issue with your script would help us chase it separately.

    Closing as resolved on 3.0 — please reopen if the hang returns on a current release.


    🤖 This issue was reviewed as part of an AI-assisted triage of the Isaac Lab backlog, with automated verification against the current codebase. If we got this wrong, please reopen — we'd rather hear about it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions