Something like a missed \stoptext , i.e.\starttext....%\stoptextA good strategy is to move \stoptext from bottom to up next to\starttext until a correct compilation