danomatika / ofxPd

(maintained) a Pure Data addon for OpenFrameworks using libpd
Other
202 stars 45 forks source link

App crashes on Android when back button is pressed #58

Closed cuinjune closed 7 years ago

cuinjune commented 7 years ago

Hi, first of all thank you for your amazing work. I could successfully build and run ofxPd on Android device. But I found out that my app crashes as soon as I press back button on my phone. This is the logcat message when the app crashes.

06-30 00:11:35.851 14319-14349/? A/libc: Fatal signal 11 (SIGSEGV) at 0x00000008 (code=1), thread 14349 (Thread-50619)

If I don't initialize pd, the app didn't crash. But once it is initialized with pd.init(), even if I close patch and stop audio, the crash still occured.

Any advise or guidance would be greatly appreciated. Thank you so much!

danomatika commented 7 years ago

This is probably a threading issue where libpd is running in the audio thread and communicating with it from the GUI thread causes the crash. This shouldn't be happening as ofxPd uses a mutex for thread safety, but I would approach looking into the issue from that direction. As I haven't done any development on Android, I can't help much beyond that.

cuinjune commented 7 years ago

Thank you for your answer.

I just figured out it wasn't ofxPd's problem. It had to do with an external that I created myself. When I delete the external from pd patch, the crash no longer occurred.

I'm sorry for asking the wrong question. I will check more carefully before asking questions next time :)