From the above image you can see that an error occurs when the function setAttribute returns from its call.
Does anyone know how to resolve this error shown in the picture? I know that it is an error between calling conventions, but how do I find out what the calling convention for setAttribute is?
This error indicates that your stack is corrupted. There are many ways to get there. As mentioned in the error message a different calling convention is possible but this is not often the case.
It is much more likely that your stack has been overwritten by writing to memory pointed to by an invalid pointer.
This can also be down to a corrupted build. Clean the project, rebuild, and the problem might go away. It did for me.