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

Thread crashes on android when going home page #79

Open
kevinresol opened this issue Aug 19, 2015 · 6 comments
Open

Thread crashes on android when going home page #79

kevinresol opened this issue Aug 19, 2015 · 6 comments

Comments

@kevinresol
Copy link
Contributor

var t = Thread.create(function() { } )

Run the above code in ready() and then press the android "home button", the app will crash with error:

hxcpp: GetLocalAllocMT - requesting memory from unregistered thread!

or it should be reported in hxcpp?

@ruby0x1
Copy link
Member

ruby0x1 commented Nov 17, 2015

Some tips so long.
Rebuild snow in debug:
cd <snow>/project/
flow build android --debug --d snow_dynamic_link

Ensure your app is in debug.
Ensure ART jni debugging is enabled https://source.android.com/devices/tech/dalvik/

For other information:
snow doesn't create threads,
snow doesn't jump back and forth between java/haxe (only SDL layer does)
we need more information to debug the callstack - the best option is to have it crash with a proper callstack (i.e the debug snow should help a lot at first)

@kevinresol
Copy link
Contributor Author

Is this the supposed output?
capture

@ruby0x1
Copy link
Member

ruby0x1 commented Nov 17, 2015

With a debug snow build the libsnow lines would show actual cpp locations

@kevinresol
Copy link
Contributor Author

oops right, I missed something, let me try again...

@kevinresol
Copy link
Contributor Author

Here it is:
capture

@ruby0x1
Copy link
Member

ruby0x1 commented Nov 17, 2015

That's much better.

It appears that the SDL_AddEventWatch is pushing a message when another thread is active.
Knowing where and why is what was needed to fix it or work around it - I'll try a fix soon (but with dev log 8 you'll see a lot of changes are headed in here, which might happen first).

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