External function problem - Runtime termination

Dear masters of Dynare,
I am currently estimating small RBC model. I have log-linearized the model equations. Due to the structure of the model the steady-state values of endogenous variables (especially the employment rate) cannot be analytically solved for. Since these steady-state values show up in the log-linear equation this is a problem. I tried to solve this problem by using external function that solves for steady state value of employment using fsolve inside the model section. This way the steady-state values should be in accordance with current values of structural parameters. Unfortunately I am getting following error:

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.

Starting Dynare (version 4.2.0).
Starting preprocessing of the model file …
Found 14 equation(s).
Evaluating expressions…done
Computing static model derivatives:

  • order 1
    Computing dynamic model derivatives:
  • order 1

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application’s support team for more information.

??? Error using ==> dynare at 126
DYNARE: preprocessing failed

Windows XP, Matlab R2010a, Dynare 4.2.0

labour_friction.mod (5.43 KB)
solve_n_ss.m (258 Bytes)
employ.m (2.26 KB)

Thank you for catching this bug. We will fix it in the next version of Dynare. In the meanwhile, your code should run if you do not assign external functions to local variables.

This bug has been fixed. You can find it in tomorrow’s snapshot release:
dynare.org/snapshot/win/