Piecewise Kalman filter

Dear colleagues,
I ran into a problem when using the new piecewise Kalmann filter option in combination with Occbin. My estimation seems to have converged to a mode, but then the Kalmann smoother crashed. Specifically, I got this output in the command window:

Occbin: linear smoother done.
Occbin smoother iteration 1.
Occbin smoother iteration 2.
Reference to non-existent field ‘regime_history’.
Error in occbin.DSGE_smoother (line 202)
regime_history = out.regime_history;
Error in dynare_estimation_1 (line 616)
Error in dynare_estimation (line 118)
Error in E_short_obc_il.driver (line 2564)
Error in dynare (line 278)
evalin(‘base’,[fname ‘.driver’]);

Furthermore, when the computation stopped this picture remained on the screen:

The issue occurse both with Dynare 5.4 and 5.3.

I am attaching everything you need to reproduce the issue. You need to type "dynare E_short_obc_il " Many thanks in advance for your help!
Best wishes,
PKF_smootherissue.zip (2.5 MB)

thanks Ansgar
yes I think this is bug related to lack of convergence (may happen) when simulating the model with smoothed shocks. definitely this has to be trapped with an error message. whether we can make it converge by triggering some non-default option of the filter is another story …

Hi Marco,
thank you for responding so quickly. Which type of non-convergence is this…? I thought if the smoother loops between two alternatives regarding the length of regime 1 it chooses the shorter regime length?

The error code is 313, i.e.

Did not converge – infinite loop of guess regimes

not 310

Occbin solver loops between two regimes