So I have been battling this issue for awhile now and tried many different ways to fix it but cannot.
Bascally waht my app does is calls a java file to load an applica
As it is adviced here, setting process.EnableRaisingEvents = true solved the problem of the blocked ui in my case.