How to solve error A call to PInvoke function MyMethod has unbalanced the stack.

Today I upgraded a C# program from .NET 2.0 to .NET 4.0 and started debugging it.

I got the error message when pInvoke called a C++ function in one of my DLLs:

Continue reading “How to solve error A call to PInvoke function MyMethod has unbalanced the stack.”

How to debug cocos2d-x and Java code using Eclipse

In the post Developing with cocos2d-x for android on Linux I told you how to compile your cocos2d-x and run it on Eclipse.

Now I’m going to tell you how to debug both cocos2d-x native code and Java using MOTODEV Studio for Android (You can use the instructions provided here with plain Eclipse with some extra effort).

Despite the fact I’m writing with cocos2d-x in mind, what I’m going to present here will let you debug any kind of native code mixed with Android / java.

Continue reading “How to debug cocos2d-x and Java code using Eclipse”