Simulation has crashed or was freed manually

Hi Team,

I have developed an automation script using the Sequencer, and my model contains three UCM blocks.

Before executing the automation through the Sequencer, I typically verify that the model runs smoothly and behaves as expected during manual execution. However, when running the same workflow through the Sequencer, I frequently encounter the attached error at random points during execution.

The issue appears to be intermittent, as it does not occur at a specific test case or simulation step and is difficult to reproduce consistently. The model itself runs normally outside the Sequencer environment.

I have attached:

The error message/screenshot
The corresponding console output

Could someone please help investigate the root cause of this behavior and suggest possible troubleshooting steps?

hii, I had something kinda similar before so sharing what helped me :sweat_smile:

From your console it looks like the sim actually starts fine (starting → running), and then you get “Simulation heartbeat failed” + “Thread interrupted”. From what I understand, the heartbeat is basically the PC and the simulator pinging each other to check they’re both still alive. If the target doesn’t hear from the PC in time, it stops the sim as a safety thing. So I think it’s one of two things:

  1. Your PC gets too busy for a moment. With the Sequencer running scripts, ScopeView, maybe Excel/logging, plus Windows doing random stuff in the background (updates etc.), the PC can miss a ping. That would also explain why it’s random and not tied to one test case. When I had this, closing extra programs and pausing Windows updates during long runs made it happen way less. Maybe also check whether the PC goes to sleep or power-saving mode during long sequences?

  2. One of the UCMs actually crashes. The popup even says “make sure the UCM code runs correctly” :eyes: Since you have 3 UCMs, I think it’s worth checking for things like a divide by zero, a NaN, or an array index going out of range. Sometimes it only happens with certain values, so in manual runs you might just never hit that case. I read about one where a NaN got cast to an int and used as an array index, and it crashed the whole sim. If you clamp/check inputs and indexes in the UCM code it’s easy to rule out.

Some things I’d try:

  • open the simulation log (.simout) with verbose mode on, like the popup says, and see what the last lines are before the crash
  • check for overruns around the time it fails
  • does it still crash if you run the same sequence with the UCMs bypassed or with simple test values?
  • I also noticed the log says “running → stopping” just before the heartbeat fails. Is the Sequencer maybe sending stop/start commands quite fast one after another? Adding a small wait between steps might help

btw why are you using up to 3 UCMs? are they protection/control logic or something else? and which HYPERSIM version + simulator are you on? I’m curious what kind of automation you’re running too, it sounds like a cool setup