Crash reporting

Is there a sublibrary or other means of documenting when crashes occur? The tracefile will record it as some error, but what I’m looking for is something that captures what physically happened in the crash, e.g. attachment = MPH, movement = left, location = track 44, timestamp, method name, method step (line # maybe). Does anything like this exist?

1 Like

You could look at the HxUSB files that contain the firmware instructions/responses? But I think it might be hard to do that online, you’d probably have to do that after the run was aborted.

Otherwise, you could have a look at the error package, which gives you access to the Err object, but not entirely sure that will give you too much more than what the trace gives you.

1 Like

Firmware will give you a lot of information when you combine information in the command with information in the error-coded response. It would have to be parsed to determine object references like tracks, plates positions etc. It will give you xyz coordinates that can be matched to tracks.

Method name could probably be extracted from logs, perhaps with some library. Line numbers I am the least confident these could be determined programmatically without explicitly logging them for each command.

I imagine a solution could be pieced together from many different data sources.

1 Like

Hi @ckz,

Unfortunately, we do not have a standardized library to report out the information as you request, but as others have said on this thread, it is possible to extract and calculate much of this information at runtime.

  1. For method name, you’ll want to use the default HSLTrcLib library, which contains the command 'TrcGetMethodName"


  1. For timestamp, you can use the default HSLTimLib library, which contains commands for retrieving the Date and Time


  1. For remaining information, you will need to use a combination of the default HSLMlStarStepReturnLib library and your own calculations. You can download a package file with an example of how to use the Step Return library here. This library works by taking the bound Step Return data string from an instrument step, and extracting the relevant info. To get this Step Return data string, right-click on any ML_STAR command in your method and select “Bind Return Values…”, then assign variables to the data you want (library uses “Step recovery details”).

Let me know if you have any questions.

Thank you,


Thanks Dan and everyone for your input!