When I encountered this issue, it was because of the grid panel. According to this Stackoverflow answer http://stackoverflow.com/a/21740832/5539403 it is because the grid panel tries to shrink-wrap its content but there was no content at the time the layout run is executed.
I fixed it by setting the width of the grid panel somehow.