Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash on Android when sending callbacks #10

Open
ninja-gaiden opened this issue Jul 1, 2014 · 2 comments
Open

crash on Android when sending callbacks #10

ninja-gaiden opened this issue Jul 1, 2014 · 2 comments

Comments

@ninja-gaiden
Copy link

Application crashes when HypFacebook.hx calls HypFacebook.java method jni_connect and then Java sends Event callback using CPP

07-01 18:14:36.644: I/trace(7994): Java_fr_hyperfiction_HypFacebook_onFBEvent
07-01 18:14:36.644: I/trace(7994): hypfb_dispatch_event
07-01 18:14:36.649: A/libc(7994): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 8033 (Thread-33545)

lines in ExternalInterface.cpp that cause this error

        int top = 0;
        gc_set_top_of_stack(&top, true);
        gc_exit_blocking();
        #endif
        val_call3(
                    eval_onEvent->get( ) ,
                    alloc_string( sType ) ,
                    alloc_string( sArg1 ) ,
                    alloc_string( sArg2 )
                );
        #ifdef ANDROID
        gc_enter_blocking();
        #endif

I've edited HypFacebook.java a bit to avoid this CPP code completely and send callback to HaxeObject without that stuff - everything seems to work now but still I'm wondering why this code crashes on my Galaxy S3

Haxe Compiler 3.1.3
actuate: 1.52 1.6.3 1.7.1 1.7.2 [1.7.5]
format: 3.0.4 [3.0.5]
haxelib_client: [3.1.0-rc.4]
hxcpp: 2.10.3 3.0.2 3.1.21 3.1.30 [3.1.39]
hxlibc: 1.1.1 [1.1.4]
hxtools: [1.1.6]
inthebox-macros: [1.1.0]
lime-tools: 1.2.2 1.4.0 [1.5.7]
lime: 0.9.0 0.9.7 [1.0.1]
nme: 4.0.2 5.0.37 [5.1.8]
openfl-compatibility: [1.0.1]
openfl-html5: 1.0.1 1.0.2 1.0.5 [1.4.2-beta]
openfl-native: 1.0.1 1.2.0 [1.4.0]
openfl-samples: 1.0.0-rc.1 1.2.0 [1.3.0]
openfl-tools: 1.0.0 [1.0.10] 1.0.2
openfl: 1.0.1 1.0.4 1.0.5 1.2.0 1.2.1 1.2.2 1.4.0 [2.0.1]
svg: 1.0.7 [1.0.8] 1.04
swf: 1.0.0 1.0.1 1.0.2 1.17 1.2.0 1.4.2 [1.5.2]
@ninja-gaiden ninja-gaiden changed the title crash on Android crash on Android when sending callbacks Jul 1, 2014
@shoebox
Copy link
Member

shoebox commented Jul 3, 2014

cf openfl/openfl-native#216 (just debugged it today !)

Or use OpenFl version < 1.4

@ninja-gaiden
Copy link
Author

Great news, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants