Think I found it.
I created a Close buttom in the toolbar, and this seems to be the problem.
It appears that VF7 doesn't like the _mfi_close bar at some situations, and when the GetValue of the StateManager evaluate it, the errors happens.
I put a condition in the
"m.lSkip = EMPTY(WONTOP()) OR SKPBAR('_MFILE', EVALUATE(m.cBar))"
not to run if the m.cBar was _mfi_close, and now everything works fine.
If there are any comments, I'm all ears ... (do you say that in english ?)
Obrigado.
Ivan