Here is the error
Cannot evaluate expression because a thread is stopped at a point where garbage collection is impossible, possibly because the code
None of the answers solved my problem so I'm posting the solution that helped me.
"If there is to much data in the parameters then this error can occure, a simple solution is to make an object, not a struct because that's a dataobject.
Put this object in your parameters instead of all the different variables, normally the problem will no longer take place."