Solver crashes in first SQP iterations with Merit Backtracking

Hi there :wave:

I recently used merit_backtracking as globalization method for my mpc manipulator application within the acados python interface. I found that it greatly improved / stabilized my convergence rate, especially while experimenting with different control cycle frequencies and therefore different amount of total iterations used to optimize the ocp.

However I am encountering a weird problem which i cannot wrap my head around:

In some rare cases, the initial configuration, which is definitely feasible in the initialization (checked this with a wide range of scenes), the solver crashes (QP solver returned error status 3 in ...) in the first SQP iterations (but not necessarily in the first QP iterations).

Those are the residuals for a scenario, in which the solver crashed:

Those are the residuals for a scenario in which it did not crash:

As you can see there are no big deviations in those residuals (or are they?). Furthermore, if I use ‘FIXED_STEP’ as globalization strategy, this behaviour does not occure.

Is there anything known to this globalization method that could cause some instability, especially compared to fixed_step? I would like to find the root of this behaviour since I need to analyze those failed scenarios in my thesis.

Thanks yet again for your support in advance!