HI,
I have also faced these problems many times. This is what I follow. But this is not a 100% cure.
1. Make a new VI
2. Make sure the calling conventions are proper. (for matlab it is definitely C)
3. The Inputs and the Outputs should be properly taken care, because a small mistake can cause a lot problem
Finally, kindly check if the matlab code is done correctly. Because many a times, the code seems to be working, but shows these kind of integration problems. Also try to create another dll with some other name.
Hopefully this helps you.
I want to know other ways to solve the problem
regards