[Cs-dev] CSound rc03 android & CSD Player
Date | 2013-06-18 16:40 |
From | Jacques |
Subject | [Cs-dev] CSound rc03 android & CSD Player |
Hello CSounders. I have been trying to get cs6 rc3 to run by trying to build csdplayer. I keep a log of the steps taken, so that it is easier for me to track and fix problems. Below are the notes: Experiences using CS6 rc3 ---------------------------------- delete cs 5 projects from eclipse: CSDPlayer, CSoundExamples, CSoundAndroid copy the cs6 projects to the workspace: csdplayer, csoundandroid, csoundandroidexamples, pluginlibs CSD Player has install_libs.sh, when the script is run, run the line "cp -f ../../samples/* assets/samples" fails with "cp: ../../samples/*: No such file or directory". When building CSDPlayer, getting error: [2013-06-18 16:14:35 - CSDPlayer] Error generating final archive: Found duplicate file for APK: lib/armeabi/libsndfile.so Origin 1: /Users/jacques/CVSCode/CVSAudio/CSDPlayer/libs/armeabi/libsndfile.so Origin 2: /Users/jacques/CVSCode/CVSAudio/CsoundAndroid/libs/armeabi/libsndfile.so That is because the csoundandroid (library) project already has the libsndfile.so, so I deleted it from the csdplayer project. At this point there are no more build errors. Problems launching CSDPlayer ---------------------------------- When trying to launch csdplayer from eclipse to the android 2.3.3 emulator I get the following stack trace: 06-18 16:29:03.816: D/dalvikvm(365): Trying to load lib /data/data/com.csounds.Csound6/lib/libsndfile.so 0x405150d0 06-18 16:29:03.826: D/dalvikvm(365): Added shared lib /data/data/com.csounds.Csound6/lib/libsndfile.so 0x405150d0 06-18 16:29:03.916: D/dalvikvm(365): No JNI_OnLoad found in /data/data/com.csounds.Csound6/lib/libsndfile.so 0x405150d0, skipping init 06-18 16:29:03.916: D/dalvikvm(365): Trying to load lib /data/data/com.csounds.Csound6/lib/libcsoundandroid.so 0x405150d0 06-18 16:29:04.026: D/dalvikvm(365): Added shared lib /data/data/com.csounds.Csound6/lib/libcsoundandroid.so 0x405150d0 06-18 16:29:04.026: D/dalvikvm(365): No JNI_OnLoad found in /data/data/com.csounds.Csound6/lib/libcsoundandroid.so 0x405150d0, skipping init 06-18 16:29:04.046: D/dalvikvm(365): Trying to load lib /data/data/com.csounds.Csound6/lib/libfluidOpcodes.so 0x405150d0 06-18 16:29:04.066: D/AndroidRuntime(365): Shutting down VM 06-18 16:29:04.066: W/dalvikvm(365): threadid=1: thread exiting with uncaught exception (group=0x40015560) 06-18 16:29:04.076: E/AndroidRuntime(365): FATAL EXCEPTION: main 06-18 16:29:04.076: E/AndroidRuntime(365): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.csounds.Csound6/com.csounds.Csound6.CsoundAppActivity}: java.lang.NullPointerException 06-18 16:29:04.076: E/AndroidRuntime(365): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647) 06-18 16:29:04.076: E/AndroidRuntime(365): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 06-18 16:29:04.076: E/AndroidRuntime(365): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 06-18 16:29:04.076: E/AndroidRuntime(365): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 06-18 16:29:04.076: E/AndroidRuntime(365): at android.os.Handler.dispatchMessage(Handler.java:99) 06-18 16:29:04.076: E/AndroidRuntime(365): at android.os.Looper.loop(Looper.java:123) 06-18 16:29:04.076: E/AndroidRuntime(365): at android.app.ActivityThread.main(ActivityThread.java:3683) 06-18 16:29:04.076: E/AndroidRuntime(365): at java.lang.reflect.Method.invokeNative(Native Method) 06-18 16:29:04.076: E/AndroidRuntime(365): at java.lang.reflect.Method.invoke(Method.java:507) 06-18 16:29:04.076: E/AndroidRuntime(365): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 06-18 16:29:04.076: E/AndroidRuntime(365): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 06-18 16:29:04.076: E/AndroidRuntime(365): at dalvik.system.NativeStart.main(Native Method) 06-18 16:29:04.076: E/AndroidRuntime(365): Caused by: java.lang.NullPointerException 06-18 16:29:04.076: E/AndroidRuntime(365): at com.csounds.Csound6.CsoundAppActivity$2.run(CsoundAppActivity.java:168) 06-18 16:29:04.076: E/AndroidRuntime(365): at android.app.Activity.runOnUiThread(Activity.java:3717) 06-18 16:29:04.076: E/AndroidRuntime(365): at com.csounds.Csound6.CsoundAppActivity.postMessageClear_(CsoundAppActivity.java:159) 06-18 16:29:04.076: E/AndroidRuntime(365): at com.csounds.Csound6.CsoundAppActivity.postMessage(CsoundAppActivity.java:148) 06-18 16:29:04.076: E/AndroidRuntime(365): at com.csounds.Csound6.CsoundAppActivity.onCreate(CsoundAppActivity.java:250) 06-18 16:29:04.076: E/AndroidRuntime(365): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 06-18 16:29:04.076: E/AndroidRuntime(365): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611) 06-18 16:29:04.076: E/AndroidRuntime(365): ... 11 more This last problem is a bit tough for me to figure out what the problem is. It seems to be shared library and possibly uni related? Looking forward to some suggestions. All the best, Jacques -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-rc03-android-CSD-Player-tp5724638.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2013-06-18 18:36 |
From | Michael Gogins |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Attachments | None None |
When I was developing I did not use the emulator at all. I just hooked up my phone and used that. I will try with the emulator in the next day or so and let you know how it goes.
I know about the duplicate libsndfile library problem, I will modify one of the build scripts to fix that. About the other libs, I always built the plugins and debugged and tested with them. Obviously there is a problem if the plugins are not there. I thought I had made it possible to run without the plugins by catching a Throwable if they aren't there, but I will double-check that. At this point, I'm not sure if it is a problem only in the emulator, or also on a device.
Thanks for the information, Mike Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Tue, Jun 18, 2013 at 11:40 AM, Jacques <jacques@j3ltd.com> wrote: Hello CSounders. |
Date | 2013-06-18 21:35 |
From | Jacques |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Thanks for the reply. I'll try using actual devices tomorrow. cs5 performs quite ok on the emulator (mac OS & eclipse), so I got into the habit of giving that a shot prior to plugging in wires and devices before deploying. All the best, Jacques -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-rc03-android-CSD-Player-tp5724638p5724641.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2013-06-19 11:57 |
From | Jacques |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Hello again, I tried running CSD Player on a Sony device (Android version 2.3.7), several times. Each time it fails after trying to load a shared library (libsndfile or libfluidopcodes ....). So I tried running, each time deleting one of the shared libraries. it only works if the libs/armabi-v7a has just one shared library left: libstdutil.so To start the CSDPlayer's libs/armabi-v7a folder had libfluidopcodes, libluacsound, libsignalflowgraph and libstdutil Try new build with all shared libs on Nexus 4. Get error: 06-19 11:33:54.333: D/dalvikvm(20399): Trying to load lib /data/app-lib/com.csounds.Csound6-1/libfluidOpcodes.so 0x41688660 06-19 11:33:54.333: E/dalvikvm(20399): dlopen("/data/app-lib/com.csounds.Csound6-1/libfluidOpcodes.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libgnustl_shared.so" needed by "libfluidOpcodes.so"; caused by load_library(linker.cpp:745): library "libgnustl_shared.so" not found copied libgnustl_shared.so from pluginlibs/libfluidsynth/libs/armeabi-v7a to CDSPLayer/libs/armeabi-v7a Tried running again, still error about not finding libgnustl_shared.so not being found: 06-19 11:46:34.854: I/dalvikvm(21462): Turning on JNI app bug workarounds for target SDK version 10... 06-19 11:46:34.894: D/dalvikvm(21462): Trying to load lib /data/app-lib/com.csounds.Csound6-1/libsndfile.so 0x4168de00 06-19 11:46:34.894: D/dalvikvm(21462): Added shared lib /data/app-lib/com.csounds.Csound6-1/libsndfile.so 0x4168de00 06-19 11:46:34.894: D/dalvikvm(21462): No JNI_OnLoad found in /data/app-lib/com.csounds.Csound6-1/libsndfile.so 0x4168de00, skipping init 06-19 11:46:34.894: D/dalvikvm(21462): Trying to load lib /data/app-lib/com.csounds.Csound6-1/libcsoundandroid.so 0x4168de00 06-19 11:46:34.904: D/dalvikvm(21462): Added shared lib /data/app-lib/com.csounds.Csound6-1/libcsoundandroid.so 0x4168de00 06-19 11:46:34.904: D/dalvikvm(21462): No JNI_OnLoad found in /data/app-lib/com.csounds.Csound6-1/libcsoundandroid.so 0x4168de00, skipping init 06-19 11:46:34.904: D/dalvikvm(21462): Trying to load lib /data/app-lib/com.csounds.Csound6-1/libfluidOpcodes.so 0x4168de00 06-19 11:46:34.904: E/dalvikvm(21462): dlopen("/data/app-lib/com.csounds.Csound6-1/libfluidOpcodes.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libgnustl_shared.so" needed by "libfluidOpcodes.so"; caused by load_library(linker.cpp:745): library "libgnustl_shared.so" not found 06-19 11:46:34.904: D/AndroidRuntime(21462): Shutting down VM 06-19 11:46:34.904: W/dalvikvm(21462): threadid=1: thread exiting with uncaught exception (group=0x40e0d930) 06-19 11:46:34.904: E/AndroidRuntime(21462): FATAL EXCEPTION: main 06-19 11:46:34.904: E/AndroidRuntime(21462): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.csounds.Csound6/com.csounds.Csound6.CsoundAppActivity}: java.lang.NullPointerException 06-19 11:46:34.904: E/AndroidRuntime(21462): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180) 06-19 11:46:34.904: E/AndroidRuntime(21462): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) 06-19 11:46:34.904: E/AndroidRuntime(21462): at android.app.ActivityThread.access$600(ActivityThread.java:141) 06-19 11:46:34.904: E/AndroidRuntime(21462): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) 06-19 11:46:34.904: E/AndroidRuntime(21462): at android.os.Handler.dispatchMessage(Handler.java:99) 06-19 11:46:34.904: E/AndroidRuntime(21462): at android.os.Looper.loop(Looper.java:137) 06-19 11:46:34.904: E/AndroidRuntime(21462): at android.app.ActivityThread.main(ActivityThread.java:5041) 06-19 11:46:34.904: E/AndroidRuntime(21462): at java.lang.reflect.Method.invokeNative(Native Method) 06-19 11:46:34.904: E/AndroidRuntime(21462): at java.lang.reflect.Method.invoke(Method.java:511) 06-19 11:46:34.904: E/AndroidRuntime(21462): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 06-19 11:46:34.904: E/AndroidRuntime(21462): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 06-19 11:46:34.904: E/AndroidRuntime(21462): at dalvik.system.NativeStart.main(Native Method) 06-19 11:46:34.904: E/AndroidRuntime(21462): Caused by: java.lang.NullPointerException 06-19 11:46:34.904: E/AndroidRuntime(21462): at com.csounds.Csound6.CsoundAppActivity$2.run(CsoundAppActivity.java:168) 06-19 11:46:34.904: E/AndroidRuntime(21462): at android.app.Activity.runOnUiThread(Activity.java:4644) 06-19 11:46:34.904: E/AndroidRuntime(21462): at com.csounds.Csound6.CsoundAppActivity.postMessageClear_(CsoundAppActivity.java:159) 06-19 11:46:34.904: E/AndroidRuntime(21462): at com.csounds.Csound6.CsoundAppActivity.postMessage(CsoundAppActivity.java:148) 06-19 11:46:34.904: E/AndroidRuntime(21462): at com.csounds.Csound6.CsoundAppActivity.onCreate(CsoundAppActivity.java:250) 06-19 11:46:34.904: E/AndroidRuntime(21462): at android.app.Activity.performCreate(Activity.java:5104) 06-19 11:46:34.904: E/AndroidRuntime(21462): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) 06-19 11:46:34.904: E/AndroidRuntime(21462): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) 06-19 11:46:34.904: E/AndroidRuntime(21462): ... 11 more -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-rc03-android-CSD-Player-tp5724638p5724652.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2013-06-19 12:30 |
From | Michael Gogins |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Attachments | None None |
I have just verified that if I omit all the pluginlibs except for libstdutil on my Samsung Galaxy S4, the app will still run. The csound performance will end with a parse error, but the app will still run, and will still render csds that do not depend on plugins. There are load errors in logcat but these errors, I repeat, do not affect performance of csds that do not depend on plugins. Can you run the app at all, and can you perform, say, trapped.csd? If not, then handling of dlopen errors on your device is different than it is on mine. Google about that... By the way, if you see that a library is "Added" in logcat, that means that the shared library was successfully dlopen'ed. About the gnustl lib, do you have that on your device? You can check the system libs in the NDK or, if you can see the actual OS libs on your device, you can check there. If you do not have this lib on your device, you can try building with an alternative STL implementation. If you have no STL implementation on your device,you can edit the static section and the start callback in the CSDPlayer.java file to omit the System.load of any files in the app lib directory.
Hope this helps, Mike =========================== Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Wed, Jun 19, 2013 at 6:57 AM, Jacques <jacques@j3ltd.com> wrote: Hello again, |
Date | 2013-06-19 13:44 |
From | Michael Gogins |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Attachments | None None |
Also, there is the question of architecture for your Sony device. Is it armeabi, or is it armeabi-v7a, or is it something else? "Architecture" means the CPU instruction set used by the compiler. Regards, Mike =========================== Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Wed, Jun 19, 2013 at 7:30 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
|
Date | 2013-06-19 14:40 |
From | Jacques |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
In case of confusion, tests I am running are against http://sourceforge.net/projects/csound/files/csound6/csound6.0rc3/csound-android-6.00.0rc3.zip I expect the sony device is armeabi-v7a simply because changing the content of the libs folder (lib/armeabi-v7a) changes the app's behaviour from crashing at startup to running: deleting all shared libs in the lib/armeabi-v7a except for libstdutil allows the app to run, open csd files and run them, though there is no sound produced. These are csd's that ran fine in the csd player that shipped with the sound 5 version of the android distro. Next I downloaded and installed http://sourceforge.net/projects/csound/files/csound6/csound6.0rc3/Csound6.apk/download And installed it onto a LG Nexus 4. Same error as before. Hence when building the csd player using the android distro of csound6 rc3 and the csound 6 player that is pre built in the sound 6 rc3 both crash on startup, with the same error. -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-rc03-android-CSD-Player-tp5724638p5724655.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2013-06-19 15:14 |
From | Michael Gogins |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Attachments | None None |
Can you run the actual Csound6.apk from SourceForge? On Jun 19, 2013 9:41 AM, "Jacques" <jacques@j3ltd.com> wrote:
In case of confusion, tests I am running are against |
Date | 2013-06-19 15:49 |
From | Jacques |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
No, crashes on startup. Tried it on a Sony experia u st25i running android 2.3.7 and a Lge-960 nexus 4 running android 4.2.2. -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-rc03-android-CSD-Player-tp5724638p5724657.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2013-06-20 16:28 |
From | hcenteno |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
I just tested the Csound.apk from Sourceforge on a Galaxy S3 and it also crashes at startup. Here's the output from LogCat: 06-20 11:25:28.871: E/dalvikvm(21198): dlopen("/data/app-lib/com.csounds.Csound6-1/libfluidOpcodes.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1673): could not load library "libgnustl_shared.so" needed by "libfluidOpcodes.so"; caused by load_library(linker.cpp:771): library "libgnustl_shared.so" not found 06-20 11:25:28.871: E/AndroidRuntime(21198): FATAL EXCEPTION: main 06-20 11:25:28.871: E/AndroidRuntime(21198): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.csounds.Csound6/com.csounds.Csound6.CsoundAppActivity}: java.lang.NullPointerException 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2308) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2358) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.ActivityThread.access$600(ActivityThread.java:153) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.os.Handler.dispatchMessage(Handler.java:99) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.os.Looper.loop(Looper.java:137) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.ActivityThread.main(ActivityThread.java:5227) 06-20 11:25:28.871: E/AndroidRuntime(21198): at java.lang.reflect.Method.invokeNative(Native Method) 06-20 11:25:28.871: E/AndroidRuntime(21198): at java.lang.reflect.Method.invoke(Method.java:511) 06-20 11:25:28.871: E/AndroidRuntime(21198): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795) 06-20 11:25:28.871: E/AndroidRuntime(21198): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562) 06-20 11:25:28.871: E/AndroidRuntime(21198): at dalvik.system.NativeStart.main(Native Method) 06-20 11:25:28.871: E/AndroidRuntime(21198): Caused by: java.lang.NullPointerException 06-20 11:25:28.871: E/AndroidRuntime(21198): at com.csounds.Csound6.CsoundAppActivity$2.run(CsoundAppActivity.java:167) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.Activity.runOnUiThread(Activity.java:4644) 06-20 11:25:28.871: E/AndroidRuntime(21198): at com.csounds.Csound6.CsoundAppActivity.postMessageClear_(CsoundAppActivity.java:158) 06-20 11:25:28.871: E/AndroidRuntime(21198): at com.csounds.Csound6.CsoundAppActivity.postMessage(CsoundAppActivity.java:147) 06-20 11:25:28.871: E/AndroidRuntime(21198): at com.csounds.Csound6.CsoundAppActivity.onCreate(CsoundAppActivity.java:254) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.Activity.performCreate(Activity.java:5104) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2262) 06-20 11:25:28.871: E/AndroidRuntime(21198): ... 11 more If I build the app from source it doesn't crash (using the csound-android-6.00.0rc3.zip release). -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-rc03-android-CSD-Player-tp5724638p5724679.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2013-06-20 16:36 |
From | Michael Gogins |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Attachments | None None |
Very puzzling. When you built from source did you build the plugin opcodes and LuaJIT? If not, that's the explanation. If so, then you may have used a different STL implementation. On Jun 20, 2013 11:29 AM, "hcenteno" <hcengar@gmail.com> wrote:
I just tested the Csound.apk from Sourceforge on a Galaxy S3 and it also |
Date | 2013-06-20 16:36 |
From | hcenteno |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
I should add that I didn't build the Csound6 app with the extra libraries. I'll do that later today and report back. -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-rc03-android-CSD-Player-tp5724638p5724680.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2013-06-20 16:42 |
From | Michael Gogins |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Attachments | None None |
The simplest explanation is that my phone already has the gnu stl library and your phone does not, and the library is missing from the local lib dir in the apk. I will check that. I just tested the Csound.apk from Sourceforge on a Galaxy S3 and it also
crashes at startup. Here's the output from LogCat: 06-20 11:25:28.871: E/dalvikvm(21198): dlopen("/data/app-lib/com.csounds.Csound6-1/libfluidOpcodes.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1673): could not load library "libgnustl_shared.so" needed by "libfluidOpcodes.so"; caused by load_library(linker.cpp:771): library "libgnustl_shared.so" not found 06-20 11:25:28.871: E/AndroidRuntime(21198): FATAL EXCEPTION: main 06-20 11:25:28.871: E/AndroidRuntime(21198): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.csounds.Csound6/com.csounds.Csound6.CsoundAppActivity}: java.lang.NullPointerException 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2308) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2358) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.ActivityThread.access$600(ActivityThread.java:153) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.os.Handler.dispatchMessage(Handler.java:99) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.os.Looper.loop(Looper.java:137) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.ActivityThread.main(ActivityThread.java:5227) 06-20 11:25:28.871: E/AndroidRuntime(21198): at java.lang.reflect.Method.invokeNative(Native Method) 06-20 11:25:28.871: E/AndroidRuntime(21198): at java.lang.reflect.Method.invoke(Method.java:511) 06-20 11:25:28.871: E/AndroidRuntime(21198): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795) 06-20 11:25:28.871: E/AndroidRuntime(21198): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562) 06-20 11:25:28.871: E/AndroidRuntime(21198): at dalvik.system.NativeStart.main(Native Method) 06-20 11:25:28.871: E/AndroidRuntime(21198): Caused by: java.lang.NullPointerException 06-20 11:25:28.871: E/AndroidRuntime(21198): at com.csounds.Csound6.CsoundAppActivity$2.run(CsoundAppActivity.java:167) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.Activity.runOnUiThread(Activity.java:4644) 06-20 11:25:28.871: E/AndroidRuntime(21198): at com.csounds.Csound6.CsoundAppActivity.postMessageClear_(CsoundAppActivity.java:158) 06-20 11:25:28.871: E/AndroidRuntime(21198): at com.csounds.Csound6.CsoundAppActivity.postMessage(CsoundAppActivity.java:147) 06-20 11:25:28.871: E/AndroidRuntime(21198): at com.csounds.Csound6.CsoundAppActivity.onCreate(CsoundAppActivity.java:254) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.Activity.performCreate(Activity.java:5104) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) 06-20 11:25:28.871: E/AndroidRuntime(21198): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2262) 06-20 11:25:28.871: E/AndroidRuntime(21198): ... 11 more If I build the app from source it doesn't crash (using the csound-android-6.00.0rc3.zip release). -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-rc03-android-CSD-Player-tp5724638p5724679.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/csound-devel |
Date | 2013-06-20 17:05 |
From | hcenteno |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
I just rebuilt Csound6.apk including all the armeabi and armeabi-v7a libraries from pluginlibs (I also copied libgnustl_shared.so to the lib directory) and the app still crashes with the same "library "libgnustl_shared.so" not found" error. -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-rc03-android-CSD-Player-tp5724638p5724685.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2013-06-20 18:05 |
From | Michael Gogins |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Attachments | None None |
Then the phones react differently to no loading a lib, mine handles the Throwable and yours does not. I'll Google about what to do. You could try using a different STL lib in the Android.mk files. Did you debug to see if the gnu stl lib actually ended up on your phone? On Jun 20, 2013 12:05 PM, "hcenteno" <hcengar@gmail.com> wrote:
I just rebuilt Csound6.apk including all the armeabi and armeabi-v7a |
Date | 2013-06-20 18:12 |
From | Michael Gogins |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Attachments | None None |
I'll also try to put in code not to try loading libs that are not on the device. On Jun 20, 2013 1:05 PM, "Michael Gogins" <michael.gogins@gmail.com> wrote:
|
Date | 2013-06-20 19:21 |
From | hcenteno |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Yes, I just checked the contents of the Csound6.apk in the phone and it has the libgnustl_shared.so file included. Strange. -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-rc03-android-CSD-Player-tp5724638p5724689.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2013-06-20 19:58 | ||
From | Michael Gogins | ||
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player | ||
Attachments | None None | ||
I think I see the problem. In the CsoundAndroid Application.mk change
to
I'm trying this now, I'll let you know if the app still runs for me. Probably take a few minutes. Again, the simplest explanation is that for some reason, my phone has the shared GNU STL library already installed in the system, and yours does not. The fix above should enable the lib to be packed and loaded dynamically.
Regards, Mike ===========================
Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Thu, Jun 20, 2013 at 2:21 PM, hcenteno <hcengar@gmail.com> wrote: Yes, I just checked the contents of the Csound6.apk in the phone and it has |
Date | 2013-06-20 20:17 | ||
From | Michael Gogins | ||
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player | ||
Attachments | None None | ||
I've made this fix to my sources. I've pushed them to GIT. I've uploaded a new Csound6.apk to Csound 6 rc3. Please try it and tell me if it runs now. Regards,
Mike =========================== Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Thu, Jun 20, 2013 at 2:58 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
|
Date | 2013-06-20 20:18 |
From | hcenteno |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
I did the change and it still crashes. I opened CsoundAndroid/jni/Application.mk in Eclipse to make the change and then cleaned both projects before rebuilding Csound6. Did I miss something else? -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-rc03-android-CSD-Player-tp5724638p5724694.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2013-06-20 20:26 |
From | Michael Gogins |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Attachments | None None |
In cases like this you can rule out things to worry about by rebuilding everything from scratch. I would rebuild the native csoundandroid project at least, also the CsoundAndroid and csdplayer project Eclipse projects. Look in your .apk file (it's actually just a zip file) to see if the libs are ok and that you do have libgnustl_shared.so for both architectures. Then if it crashes send your logcat again.
Regards, Mike =========================== Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Thu, Jun 20, 2013 at 3:18 PM, hcenteno <hcengar@gmail.com> wrote: I did the change and it still crashes. I opened |
Date | 2013-06-20 20:40 |
From | Michael Gogins |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Attachments | None None |
I also need to preload lisbnstl_shared.so the same way we do libsndfile.so. Give me a minute. ===========================
Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Thu, Jun 20, 2013 at 3:26 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
|
Date | 2013-06-20 20:51 |
From | Michael Gogins |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Attachments | None None |
I've uploaded a new Csound6.apk with preloading for gnustl. Please try and let me know... ===========================
Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Thu, Jun 20, 2013 at 3:40 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
|
Date | 2013-06-20 23:29 |
From | hcenteno |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Hi Michael, I just tested the new Csound6.apk and now it freezes with a blank screen. The logcat shows a constant stream of repeating errors. This is a sample: 06-20 18:25:30.203: I/dalvikvm(15612): Turning on JNI app bug workarounds for target SDK version 10... 06-20 18:25:30.273: I/dalvikvm(15626): Turning on JNI app bug workarounds for target SDK version 10... 06-20 18:25:30.543: D/dalvikvm(15670): Trying to load lib /data/app-lib/com.csounds.Csound6-1/libsndfile.so 0x4141d490 06-20 18:25:30.543: D/dalvikvm(15670): Added shared lib /data/app-lib/com.csounds.Csound6-1/libsndfile.so 0x4141d490 06-20 18:25:30.693: D/dalvikvm(15698): Trying to load lib /data/app-lib/com.csounds.Csound6-1/libsndfile.so 0x4141f1d0 06-20 18:25:30.693: D/dalvikvm(15698): Added shared lib /data/app-lib/com.csounds.Csound6-1/libsndfile.so 0x4141f1d0 06-20 18:25:30.693: D/dalvikvm(15698): No JNI_OnLoad found in /data/app-lib/com.csounds.Csound6-1/libsndfile.so 0x4141f1d0, skipping init 06-20 18:25:30.693: D/dalvikvm(15698): Trying to load lib /data/app-lib/com.csounds.Csound6-1/libcsoundandroid.so 0x4141f1d0 06-20 18:25:30.693: E/dalvikvm(15698): dlopen("/data/app-lib/com.csounds.Csound6-1/libcsoundandroid.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1673): could not load library "libgnustl_shared.so" needed by "libcsoundandroid.so"; caused by load_library(linker.cpp:771): library "libgnustl_shared.so" not found 06-20 18:25:30.693: W/System.err(15698): csoundandroid native code library failed to load. 06-20 18:25:30.764: D/dalvikvm(15712): Trying to load lib /data/app-lib/com.csounds.Csound6-1/libsndfile.so 0x41420070 06-20 18:25:30.764: D/dalvikvm(15712): Added shared lib /data/app-lib/com.csounds.Csound6-1/libsndfile.so 0x41420070 06-20 18:25:30.764: D/dalvikvm(15712): No JNI_OnLoad found in /data/app-lib/com.csounds.Csound6-1/libsndfile.so 0x41420070, skipping init 06-20 18:25:30.764: D/dalvikvm(15712): Trying to load lib /data/app-lib/com.csounds.Csound6-1/libcsoundandroid.so 0x41420070 06-20 18:25:30.764: E/dalvikvm(15712): dlopen("/data/app-lib/com.csounds.Csound6-1/libcsoundandroid.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1673): could not load library "libgnustl_shared.so" needed by "libcsoundandroid.so"; caused by load_library(linker.cpp:771): library "libgnustl_shared.so" not found 06-20 18:25:30.764: W/System.err(15712): csoundandroid native code library failed to load. 06-20 18:25:30.764: W/System.err(15712): java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1673): could not load library "libgnustl_shared.so" needed by "libcsoundandroid.so"; caused by load_library(linker.cpp:771): library "libgnustl_shared.so" not found 06-20 18:25:30.804: I/dalvikvm(15726): Turning on JNI app bug workarounds for target SDK version 10... 06-20 18:25:30.994: D/dalvikvm(15755): Trying to load lib /data/app-lib/com.csounds.Csound6-1/libsndfile.so 0x41418b68 06-20 18:25:31.004: D/dalvikvm(15755): Added shared lib /data/app-lib/com.csounds.Csound6-1/libsndfile.so 0x41418b68 06-20 18:25:31.004: D/dalvikvm(15755): No JNI_OnLoad found in /data/app-lib/com.csounds.Csound6-1/libsndfile.so 0x41418b68, skipping init 06-20 18:25:31.004: D/dalvikvm(15755): Trying to load lib /data/app-lib/com.csounds.Csound6-1/libcsoundandroid.so 0x41418b68 06-20 18:25:31.004: E/dalvikvm(15755): dlopen("/data/app-lib/com.csounds.Csound6-1/libcsoundandroid.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1673): could not load library "libgnustl_shared.so" needed by "libcsoundandroid.so"; caused by load_library(linker.cpp:771): library "libgnustl_shared.so" not found 06-20 18:25:31.004: W/System.err(15755): csoundandroid native code library failed to load. 06-20 18:25:31.004: W/System.err(15755): java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1673): could not load library "libgnustl_shared.so" needed by "libcsoundandroid.so"; caused by load_library(linker.cpp:771): library "libgnustl_shared.so" not found 06-20 18:25:31.034: I/dalvikvm(15771): Turning on JNI app bug workarounds for target SDK version 10... -- View this message in context: http://csound.1045644.n5.nabble.com/CSound-rc03-android-CSD-Player-tp5724638p5724698.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2013-06-20 23:43 |
From | Michael Gogins |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Attachments | None None |
Thanks for your patience. It looks like the gnustl lib didn't get loaded from the .apk. That probably means that your Application.mk file is either wrong or has not taken effect yet.
I am going into the debugger now to see if my GNU STL lib actually does get loaded onto my device. Hold on... =========================== Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Thu, Jun 20, 2013 at 6:29 PM, hcenteno <hcengar@gmail.com> wrote: Hi Michael, |
Date | 2013-06-20 23:51 |
From | Michael Gogins |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Attachments | None None |
Yes it is. On about line 249 of CsoundAppActivity.java I set a breakpoint, and I examine the files array to see what files are there. Among them I find:
/data/app-lib/com.csounds.Csound6-1/libgnustl_shared.so Can you set this breakpoint and examine the elements of the files array to see if this library has been loaded onto your device? Also, before you test, you un-installed your old Csound6 app from your device and downloaded and installed the new one from SourceForge, correct? I made one more change to preload the lib, did you get that change?
I am now googling to find out what else may be required to ensure loading this library... Regards, Mike =========================== Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Thu, Jun 20, 2013 at 6:43 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
|
Date | 2013-06-21 00:31 |
From | Michael Gogins |
Subject | Re: [Cs-dev] CSound rc03 android & CSD Player |
Attachments | None None |
I'm finding some additional inconsistencies in respect to C++ shared libraries. The Android documentation says that if there are multiple modules (as there are here, with plugin opcodes) everyone has to use the SAME C++ RUNTIME. That is why I changed androidcsound to use libgnustl_shared.so. I found that the Fluidsynth plugin was still using static GNU STL, so I changed that. I found that csoundandroid insists on exceptions but I had set all the others to no exceptions, so I changed that to all using -fexceptions
Some used rtti and some not, so I made them all -fno-rtti. Doing a complete rebuild and reinstall now. If it runs I will upload a new .apk to SourceForge and you can try it.
Regards, Mike =========================== Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Thu, Jun 20, 2013 at 6:51 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
|