nmehost/acadnme

How to Debug?

Opened this issue · 2 comments

Cppia crashes on 2 programs tested. Both times I was using drawtiles. I dont know how to provide better debug information is there any suggestion?

Adding "trace" is easy enough, but otherwise debugging can be tricky.
But here is a bit of a guide:
First, build acadnme from source with debug - and make sure you have the
latest version of hxcpp from http://nmehost.com/hxcpp/
Using the instructions at https://github.com/nmehost/acadnme with the
"-debug" flag.

Rebuild your cppia app with the "-debug" flag too.

Now you need to attach a debugger - this is easiest on windows, if you can
just "attach to process", otherwise I can offer some additional hints.

Now, when the app crashes, you should see the callstack. If you expand out
the "this" expression at the top of the stack, it should be a "CppiaExpr" -
if you inspect the members, you should be able to see the haxe file/line
number and the type of operation Cppia was trying to do. From this point,
it may not be obvious what has gone wrong, but maybe I can help from there.

I have made a few little fixes to cppia in the git hxcpp, so trying this
first may solve the problem - in fact, you could try the nmehost versions
of hxcpp, acadnme and nme first and see if this solves your problem.

Another option is to build your app with the "installer" nme command to
generate a ".nme" file, and share this with me, and I could have a look.

Hugh

On Fri, Aug 7, 2015 at 12:46 AM, Joe Williamson notifications@github.com
wrote:

Cppia crashes on 2 programs tested. Both times I was using drawtiles. I
dont know how to provide better debug information is there any suggestion?


Reply to this email directly or view it on GitHub
#6.

Thanks Hugh. I never got around to compiling cppia but I did notice that every application that had issues with it were using tilelayer. Probably related somehow