Hey guys,
I’m on my way to create some extensions for my app, and I noticed that in most of the tutorials ( actually there are few tutorials about this ), we need to make calls to static java functions.
It seems that a memory issue was introduced in hxcpp 3.2.102, then fixed in version 3.2.186. Issue thread
I have version 3.2.192 and the issue is still happening to me. It happens just after calling one of theese static java methods, passing a HaxeObject as a parameter( My idea is to call haxe functions when my backend work is done ).
My Haxe callback is being called fine but then the app crashes with the same error in the link above. So there’s some memory’s black magic in there which is breaking everything. If I comment the JNI call to the static method, this doesn’t crash anymore. It seems that java doesn’t like my HaxeObject( It’s a “State” class which inherits from openfl.display.Sprite ).
So I was wondering what should happen if I call a member method to java instead of an static one, but I didn’t find too much information about calling member functions.
Is there any documentation about this JNI calls? I’ll appreciate it. Building Android takes some time and I want to avoid “trial an error” because it’s frustating
How do you guys often test your openfl extensions? Is there any good practice about that?
Thanks in advance,
Frano