06-07-2012 11:57 AM
Has anyone been able to debug an ANE and if so, the steps involved?
I am getting an exception at
this.ext = ExtensionContext.createExtensionContext( 'my_unique_id', null );
The ANE is properly packaged and I can see it in the final BAR file. The IDs match as the id in the extension.xml file in the C++ project.
06-07-2012 12:41 PM
If it crashes there, its not finding the ANE:
check the app.xml <extensions> FB "fixes" it...
BTW: installed new OS and simulator (2.1.0.560) and my ANE now is working on simulator, but NOT on PB.
Regards,
06-07-2012 02:18 PM
You can attach to a running process from NDK, which allows you to stop at breakpoints, step through code, inspect variables etc.
06-07-2012 04:22 PM
06-07-2012 06:30 PM
the whole ane naming is confused - here's what I found:
the ane file will be called e.g. com.example.ane (depending on the Base filename setting in Export)
not:
<project>.ane as might be expected
and you need to edit extension.xml and set the ID - IDE does not seem to update...
but, that has nothing much to do with the ID. That is called e.g. com.example.NativeAS3
also check bb-tablet.xml - make sure it has:
<action system="true">run_air_native</action>
I went round about many times before getting it straight.
oh yes: make sure to Export from NDK after any changes to the AS3 side, at least if the ANE SWC is affected.
Now, I've un/re-installed the NDK to see if it changes anything. It has all the same bugs as originally, even though I deleted the workspace - including the SDK set to 4.6 (I suspect eclipse saved some settings).
I was able to connect the NDK to a running app (on PB and simulator) - on PB, it compalined about a shared lib at the wrong address???
more later...
06-07-2012 06:41 PM
first the good news:
reinstall of NDK seems to have fixed the ANE. It works on both PB and simulator.
bad news:
when I attach the NDK to the PB app - and app hangs until I kill the debugger session...
warning: .dynamic section for "C:/bbndk-10.0.4-beta/target/qnx6/armle-v7/lib/libpps.so.1" is not at the expected address (wrong library or version mismatch?) warning: Could not load shared library symbols for 2 libraries, e.g. libCore.so. Use the "info sharedlibrary" command to see the complete listing. Do you need "set solib-search-path" or "set sysroot"?
06-07-2012 06:56 PM
one more useful bit:
when you launch your app, check that the console shows the size of the ANE's swf... and the ID is correct.
Regards,
06-07-2012 07:02 PM
06-07-2012 07:18 PM
you can start it before, but there will be no task to attach to. When the app starts, hit refresh, then select the task.
06-07-2012 07:22 PM
oh yes, I had the same issue: turned out that the ctx was null... possibly, means that the ane id is different.
trace( this._ctx )
Regards,