Risolto problema IllegalStateThreadException