The mistery is solved. In case this may be useful to somebody else:
I was running ABE from a script, asking ABE to generate new image but NOT the background. The I was renaming all generated main views after tunning ABE.
But in fact ABE still generate the background, it is just invisible, but returned in the list of all views. Changing the id of that invisible window was causing the error (it seems that the view is still locked by the process, may be this is the root cause).
Anyhow I do not need that view, as I explicitely asked not to get it, so now I detect invisible windows and skip them.
-- bitli