Android extension crash on callback

During switching from legacy to OpenFL 4.9.2 Extension callback function seems stop function: at runtime when from java try to use something like that, perfectly working on legacy, my apps crashes.

Extension.callbackHandler.post (new Runnable () {
                        
	@Override public void run () {
		Log.i ("Purchases", "Before callback");
		RedEvoGamesExtension.callback.call ("onStarted", new Object[] { "Success" });
		Log.i ("Purchases", "After callback");
	}
	
});
05-11 10:46:46.307 17460 17508 I Purchases: Initializing billing service: redevogames.redmption.tcg
05-11 10:46:46.324 17460 17460 I Purchases: Before callback: redevogames.redmption.tcg
05-11 10:46:46.370 17460 17460 I Purchases: After callback: redevogames.redmption.tcg
05-11 10:46:46.415 17460 17508 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 17508 (SDLThread): redevogames.redmption.tcg
05-11 10:46:46.435 17679 17679 I AEE/AED : handle_request(0)
05-11 10:46:46.436 17679 17679 I AEE/AED : check process 17460 name:s.redmption.tcg
05-11 10:46:46.436 17679 17679 I AEE/AED : tid 17508 abort msg address is:0x00000000, si_code is:1 (request from 17460:10192)
05-11 10:46:46.436 17679 17679 I AEE/AED : BOOM: pid=17460 uid=10192 gid=10192 tid=17508
05-11 10:46:46.436 17679 17679 I AEE/AED : [OnPurpose Redunant in void preset_info(aed_report_record*, int, int)] pid: 17460, tid: 17508, name: SDLThread  >>> redevogames.redmption.tcg <<<
05-11 10:46:46.488 17679 17679 I AEE/AED : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-11 10:46:46.488 17679 17679 I AEE/AED : Build fingerprint: 'alps/full_bd6735_65u_a_l1/bd6735_65u_a_l1:5.1/LMY47D/1469014457:user/dev-keys'
05-11 10:46:46.488 17679 17679 I AEE/AED : Revision: '0'
05-11 10:46:46.488 17679 17679 I AEE/AED : ABI: 'arm'
05-11 10:46:46.488 17679 17679 I AEE/AED : pid: 17460, tid: 17508, name: SDLThread  >>> redevogames.redmption.tcg <<<
05-11 10:46:46.488 17679 17679 I AEE/AED : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
05-11 10:46:46.501 17679 17679 I AEE/AED :     r0 e0be71a8  r1 00000008  r2 0016b524  r3 e0be7188
05-11 10:46:46.501 17679 17679 I AEE/AED :     r4 e0be71a8  r5 002693d8  r6 e0be71a8  r7 e0be70b0
05-11 10:46:46.501 17679 17679 I AEE/AED :     r8 e0be7178  r9 e0be7180  sl e0be7188  fp e0be7198
05-11 10:46:46.501 17679 17679 I AEE/AED :     ip a0000000  sp e0be70a8  lr e1bfd4fc  pc e26855c0  cpsr 800f0010

There’s something i’ve missed?

Thanks in advance.
David.

curious that the crash occurs after the “after callback” message. Have you tried adding traces inside the Haxe method there?

This is a really strange behavior but is the normal execution of Android. This behavior is common to old legacy version (3.6.1) and 4.9.2. Android doesn’t crash until the end of the function.

public function onStarted(result:String){
	trace("onStarted!");
	Engine.events.addPurchaseEvent(new StencylEvent(StencylEvent.PURCHASE_READY, ""));
	
	#if (android)
	initialized = true;
	#end
}

This is onStarted() called by callback, has you can see first of all i put a trace but don’t compare in logs.
Any idea to solve?

Thanks.
David.

Doespecially it work if the callback has a different parameter type, or no parameters? Might help to isolate the issue

Thank you

I don’t know why but with the following procedure the issue is solved.

  1. Start with another project
  2. Adjust project.xml like previously
  3. Compile

Clean compile don’t resolved for the old project.
Really Thanks for interest.

@singmajesty About the strange behavior you have noticed, is there some kind of test can I do to due more informations?
David.

Does the old project use dead-code-elimination, or some other define or value that could change how the project is built?

Do you mean the elimination of code not directly called in other classes? In this case both version adopt this feature.
David.