System error (data stack underflow) by doing Check-Mate

Hi,

one of my checks in Check-Mate (where I check object types and layers where they are located) in most cases works like a charm, but sometimes on some workstations returns an error:
- in check result: "System error (data stack underflow)"
- in syslog: "Bad eval return code 3270047 in checker '%nxopen_layer_set'"

I found out that a similar issue appears when calling UF_WEIGHT_estab_comp_props (which is not calling in my case) and Siemens believes that this error will be resolved by code changes made to the release of our software NX 2007 - December 2021 Functional Release (https://support.sw.siemens.com/knowledge-base/PL8568579). I don't know, was the problem solved or not, we don't use this release yet.

My quasition is: may be there are ways to "clear" stack/cache/ram with NXOpen API or somehow else before this kind of checks to prevent the error?

Not that I'm aware of. I'd suggest contacting Siemens support to report the issue. Even though the error message is the same, the trigger might be different in your case. If they know the cause of the error, they might be able to provide a work-around for your case.