Layout Duration Zero

I created 2 new layouts from api. One is ok but one is shown zero duration even it have 162 files. Both layouts have same files, one of the layout shows duration 00:00:00 and an error icon on right of the layout (and it says the layout have error and should be scheduled) on layouts screen.
I could schedule the layout, client download all files, but could not show any video, shows default layout.
I tried to copy the problem layout from layouts page, copied layout have no problem, it shows duration and could play by client without problem.
I tried to delete a row from the layout, and save order, the duration now show correct and could play without problem.
I could not understand why a layout created with zero duration, I dont know how to reproduce the problem. But I am sure this is important, because you could schdule a layout with problem, and all client could be default layout. Thanks

Sounds like the layout is in the requires building state. If you open it in the designer, and then let it sit for a short time, does the duration change when you go back to the list of layouts?

If so, it suggests one or more of your tasks isn’t running properly. Make sure the maintenance tasks are all enabled and running regularly.