Thank you everyone. I found the error. Really I needed a deep breath. The problem was in the figures. When I inserted the figures (I had a lot of pair of figures (subfigures) like floating) I used the lyx 1.44 and I couldn't center all the figures editing the preamble, so I marked every pairs of figures and I centered with the corresponding button.
Then I installed the new versions and in the version 1.6.1 it appeared a latex command before and after these figures. I don't know exactly why, some of these figures didn't work and the export to pdf stopped without any mistake. I suspect that the problem was in how I selected the figures to center it, because a few of them worked and other one didn't...