Csound Csound-dev Csound-tekno Search About

[Cs-dev] When are externals loaded in Csound 6

Date2013-06-28 13:24
FromMichael Gogins
Subject[Cs-dev] When are externals loaded in Csound 6
AttachmentsNone  None  
Pursuant to Android problems, when exactly does Csound load plugin opcodes? Does this happen only once per Csound instance? In every performance?

Regards,
Mike

===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com

Date2013-06-28 13:27
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] When are externals loaded in Csound 6
> Pursuant to Android problems, when exactly does Csound load plugin
> opcodes?
> Does this happen only once per Csound instance? In every performance?
>
> Regards,
> Mike
>

Thought it was only once, but I could be wrong
==John ff


------------------------------------------------------------------------------
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

Date2013-06-28 13:32
FromMichael Gogins
SubjectRe: [Cs-dev] When are externals loaded in Csound 6
AttachmentsNone  None  
I'll try the assumption of once first, then.

Thanks,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 28, 2013 at 8:27 AM, <jpff@cs.bath.ac.uk> wrote:
> Pursuant to Android problems, when exactly does Csound load plugin
> opcodes?
> Does this happen only once per Csound instance? In every performance?
>
> Regards,
> Mike
>

Thought it was only once, but I could be wrong
==John ff


------------------------------------------------------------------------------
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


Date2013-06-28 18:17
FromMichael Gogins
SubjectRe: [Cs-dev] When are externals loaded in Csound 6
AttachmentsNone  None  
OK, I am using the same mechanism for Android as is now used for "static modules" that used to be plugins but now are statically linked. This should be very easy and I should have it tomorrow sometime. Everything will now be statically linked including libsndfile and the Lua opcodes except for luajit itself. I will still have to preload luajit. 

Regards,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 28, 2013 at 8:24 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
Pursuant to Android problems, when exactly does Csound load plugin opcodes? Does this happen only once per Csound instance? In every performance?

Regards,
Mike

===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


Date2013-06-28 18:45
FromSteven Yi
SubjectRe: [Cs-dev] When are externals loaded in Csound 6
Hi Michael,

Before you push anything up to Sourceforge, I'd like to take a look at
this situation.  I've got a Nexus 4 and had the same problems that
were reported using the Csound6.apk that's currently published.  I
have to step out for a while but will have time tonight to connect the
device and try to debug.

Thanks!
steven

On Fri, Jun 28, 2013 at 10:17 AM, Michael Gogins
 wrote:
> OK, I am using the same mechanism for Android as is now used for "static
> modules" that used to be plugins but now are statically linked. This should
> be very easy and I should have it tomorrow sometime. Everything will now be
> statically linked including libsndfile and the Lua opcodes except for luajit
> itself. I will still have to preload luajit.
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Jun 28, 2013 at 8:24 AM, Michael Gogins 
> wrote:
>>
>> Pursuant to Android problems, when exactly does Csound load plugin
>> opcodes? Does this happen only once per Csound instance? In every
>> performance?
>>
>> Regards,
>> Mike
>>
>> ===========================
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot 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
>

------------------------------------------------------------------------------
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

Date2013-06-28 19:02
FromMichael Gogins
SubjectRe: [Cs-dev] When are externals loaded in Csound 6
AttachmentsNone  None  
I'm working in a separate branch, so no need to worry about me pushing anything.

The situation is that all native code uses the same up to date C++ options. The app succeeds in preloading the shared GNU STL library on my phone but, it appears, nowhere else. What I would try if I were use is to use System.load instead of System.loadLibrary to load the GNU STL library from the local lib directory. I would only try this because it's the easiest thing to try...

The thing that puzzles me is that Googling about this seems to show others succeeding where I am failing. All that should be required is to put the libgnustl_shared.so file in the app lib directory and use System.loadLibrary to load it before any code that depends on it being loaded. I am doing this.

Another possibility that occurs to me is that some lib on peoples' devices is not compatible with the ABI I am building for, but only with respect to the GNU STL library. So perhaps changing the ABI or the toolchain version would help.

Please note that libsndfile loads fine as a shared library from the app lib directory.

Hope this helps,
Mike




===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 28, 2013 at 1:45 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Michael,

Before you push anything up to Sourceforge, I'd like to take a look at
this situation.  I've got a Nexus 4 and had the same problems that
were reported using the Csound6.apk that's currently published.  I
have to step out for a while but will have time tonight to connect the
device and try to debug.

Thanks!
steven

On Fri, Jun 28, 2013 at 10:17 AM, Michael Gogins
<michael.gogins@gmail.com> wrote:
> OK, I am using the same mechanism for Android as is now used for "static
> modules" that used to be plugins but now are statically linked. This should
> be very easy and I should have it tomorrow sometime. Everything will now be
> statically linked including libsndfile and the Lua opcodes except for luajit
> itself. I will still have to preload luajit.
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Jun 28, 2013 at 8:24 AM, Michael Gogins <michael.gogins@gmail.com>
> wrote:
>>
>> Pursuant to Android problems, when exactly does Csound load plugin
>> opcodes? Does this happen only once per Csound instance? In every
>> performance?
>>
>> Regards,
>> Mike
>>
>> ===========================
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot 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
>

------------------------------------------------------------------------------
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


Date2013-06-28 20:22
FromSteven Yi
SubjectRe: [Cs-dev] When are externals loaded in Csound 6
AttachmentsNone  None  

Thanks Michael,

I am sort it of surprised too as the glances I had seen of your changes all looked good. I'm hoping the problem will be easier to diagnose with a device that exhibits the problem. Thanks for the info!

Steven

On Jun 28, 2013 2:02 PM, "Michael Gogins" <michael.gogins@gmail.com> wrote:
I'm working in a separate branch, so no need to worry about me pushing anything.

The situation is that all native code uses the same up to date C++ options. The app succeeds in preloading the shared GNU STL library on my phone but, it appears, nowhere else. What I would try if I were use is to use System.load instead of System.loadLibrary to load the GNU STL library from the local lib directory. I would only try this because it's the easiest thing to try...

The thing that puzzles me is that Googling about this seems to show others succeeding where I am failing. All that should be required is to put the libgnustl_shared.so file in the app lib directory and use System.loadLibrary to load it before any code that depends on it being loaded. I am doing this.

Another possibility that occurs to me is that some lib on peoples' devices is not compatible with the ABI I am building for, but only with respect to the GNU STL library. So perhaps changing the ABI or the toolchain version would help.

Please note that libsndfile loads fine as a shared library from the app lib directory.

Hope this helps,
Mike




===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 28, 2013 at 1:45 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Michael,

Before you push anything up to Sourceforge, I'd like to take a look at
this situation.  I've got a Nexus 4 and had the same problems that
were reported using the Csound6.apk that's currently published.  I
have to step out for a while but will have time tonight to connect the
device and try to debug.

Thanks!
steven

On Fri, Jun 28, 2013 at 10:17 AM, Michael Gogins
<michael.gogins@gmail.com> wrote:
> OK, I am using the same mechanism for Android as is now used for "static
> modules" that used to be plugins but now are statically linked. This should
> be very easy and I should have it tomorrow sometime. Everything will now be
> statically linked including libsndfile and the Lua opcodes except for luajit
> itself. I will still have to preload luajit.
>
> Regards,
> Mike
>
>
> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Fri, Jun 28, 2013 at 8:24 AM, Michael Gogins <michael.gogins@gmail.com>
> wrote:
>>
>> Pursuant to Android problems, when exactly does Csound load plugin
>> opcodes? Does this happen only once per Csound instance? In every
>> performance?
>>
>> Regards,
>> Mike
>>
>> ===========================
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot 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
>

------------------------------------------------------------------------------
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


------------------------------------------------------------------------------
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


Date2013-06-28 21:45
FromVictor Lazzarini
SubjectRe: [Cs-dev] When are externals loaded in Csound 6
It gets loaded either on csoundReset(), csoundCompileArgs() or csoundStart(), depending on the sequence of calls.
Look for csoundLoadModules().

Victor

On 28 Jun 2013, at 13:27, jpff@cs.bath.ac.uk wrote:

>> Pursuant to Android problems, when exactly does Csound load plugin
>> opcodes?
>> Does this happen only once per Csound instance? In every performance?
>> 
>> Regards,
>> Mike
>> 
> 
> Thought it was only once, but I could be wrong
> ==John ff
> 
> 
> ------------------------------------------------------------------------------
> 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

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
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

Date2013-06-29 02:22
FromSteven Yi
SubjectRe: [Cs-dev] When are externals loaded in Csound 6
Hi Michael,

I'm still debugging here.  The strange thing I'm noticing is that the
CsoundAndroidExamples project builds/loads/runs just fine.  It has
this in the APK:

-rwxrwxrwx  0 0      0           0 Jun 28 16:22 lib/armeabi/libcsoundandroid.so
-rwxrwxrwx  0 0      0           0 Jun 28 16:22 lib/armeabi/libgnustl_shared.so
-rwxrwxrwx  0 0      0           0 Jun 28 16:22 lib/armeabi/libsndfile.so
-rwxrwxrwx  0 0      0           0 Jun 28 16:24
lib/armeabi-v7a/libcsoundandroid.so
-rwxrwxrwx  0 0      0           0 Jun 28 16:24
lib/armeabi-v7a/libgnustl_shared.so
-rwxrwxrwx  0 0      0           0 Jun 28 16:24 lib/armeabi-v7a/libsndfile.so

I'm hoping that's a hint as to how to move forward.

Continuing on...

steven

On Fri, Jun 28, 2013 at 4:45 PM, Victor Lazzarini
 wrote:
> It gets loaded either on csoundReset(), csoundCompileArgs() or csoundStart(), depending on the sequence of calls.
> Look for csoundLoadModules().
>
> Victor
>
> On 28 Jun 2013, at 13:27, jpff@cs.bath.ac.uk wrote:
>
>>> Pursuant to Android problems, when exactly does Csound load plugin
>>> opcodes?
>>> Does this happen only once per Csound instance? In every performance?
>>>
>>> Regards,
>>> Mike
>>>
>>
>> Thought it was only once, but I could be wrong
>> ==John ff
>>
>>
>> ------------------------------------------------------------------------------
>> 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
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
> ------------------------------------------------------------------------------
> 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

------------------------------------------------------------------------------
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

Date2013-06-29 02:43
FromSteven Yi
SubjectRe: [Cs-dev] When are externals loaded in Csound 6
Success!  I modified CsoundAppActivity.java to pre-load both
libsndfile and libgnustl_shared.  This got all the libraries to load.
I am not certain, but my guess is that putting the opcode libraries
into libs/armeabi-v7a and libs/armeabi is not the correct thing.
Also, my guess is that Android by default tries to load the libraries
on startup, and does so without regard for any kind of order.  For
now, I think the fix I pushed should be considered just a stop gap,
and we should work out moving the opcode libraries to a different
directory (perhaps assets).

I've modified install_libs.sh too to work even if the directories it
mkdir's already exist.

Otherwise, I am able to run a CSD once.  On the second time running a
CSD I get what looks like a crash.  The app just goes back to the
homescreen. I do see this in logcat:

06-28 21:41:36.191: A/libc(16951): @@@ ABORTING: LIBC: ARGUMENT IS
INVALID HEAP ADDRESS IN dlfree addr=0x71eba880

Again, my bet is that we should move the opcodes to a different location.

Michael: I think you reported this second time crash issue, but I'm
only getting back into csound dev since yesterday, so I might have it
all jumbled in my head.  Are you getting this behavior too?  Also,
have you tried moving the plugins into a separate location?

Thanks!
steven

On Fri, Jun 28, 2013 at 9:22 PM, Steven Yi  wrote:
> Hi Michael,
>
> I'm still debugging here.  The strange thing I'm noticing is that the
> CsoundAndroidExamples project builds/loads/runs just fine.  It has
> this in the APK:
>
> -rwxrwxrwx  0 0      0           0 Jun 28 16:22 lib/armeabi/libcsoundandroid.so
> -rwxrwxrwx  0 0      0           0 Jun 28 16:22 lib/armeabi/libgnustl_shared.so
> -rwxrwxrwx  0 0      0           0 Jun 28 16:22 lib/armeabi/libsndfile.so
> -rwxrwxrwx  0 0      0           0 Jun 28 16:24
> lib/armeabi-v7a/libcsoundandroid.so
> -rwxrwxrwx  0 0      0           0 Jun 28 16:24
> lib/armeabi-v7a/libgnustl_shared.so
> -rwxrwxrwx  0 0      0           0 Jun 28 16:24 lib/armeabi-v7a/libsndfile.so
>
> I'm hoping that's a hint as to how to move forward.
>
> Continuing on...
>
> steven
>
> On Fri, Jun 28, 2013 at 4:45 PM, Victor Lazzarini
>  wrote:
>> It gets loaded either on csoundReset(), csoundCompileArgs() or csoundStart(), depending on the sequence of calls.
>> Look for csoundLoadModules().
>>
>> Victor
>>
>> On 28 Jun 2013, at 13:27, jpff@cs.bath.ac.uk wrote:
>>
>>>> Pursuant to Android problems, when exactly does Csound load plugin
>>>> opcodes?
>>>> Does this happen only once per Csound instance? In every performance?
>>>>
>>>> Regards,
>>>> Mike
>>>>
>>>
>>> Thought it was only once, but I could be wrong
>>> ==John ff
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> 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
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> 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

------------------------------------------------------------------------------
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

Date2013-06-29 03:36
FromMichael Gogins
SubjectRe: [Cs-dev] When are externals loaded in Csound 6
AttachmentsNone  None  

I had the second round crash problem only once, it went away.

I was preloading in CsoundAndroid's static initializer. I will try keeping that and also doing it as you do. Perhaps the order of losing differs between devices.  

I have all the libs built statically and I just have to link them with Csound.

So it sounds like we have two approaches that should work.

Thanks, I will be able to do more on this tomorrow.

Best,
Mike

On Jun 28, 2013 9:44 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
Success!  I modified CsoundAppActivity.java to pre-load both
libsndfile and libgnustl_shared.  This got all the libraries to load.
I am not certain, but my guess is that putting the opcode libraries
into libs/armeabi-v7a and libs/armeabi is not the correct thing.
Also, my guess is that Android by default tries to load the libraries
on startup, and does so without regard for any kind of order.  For
now, I think the fix I pushed should be considered just a stop gap,
and we should work out moving the opcode libraries to a different
directory (perhaps assets).

I've modified install_libs.sh too to work even if the directories it
mkdir's already exist.

Otherwise, I am able to run a CSD once.  On the second time running a
CSD I get what looks like a crash.  The app just goes back to the
homescreen. I do see this in logcat:

06-28 21:41:36.191: A/libc(16951): @@@ ABORTING: LIBC: ARGUMENT IS
INVALID HEAP ADDRESS IN dlfree addr=0x71eba880

Again, my bet is that we should move the opcodes to a different location.

Michael: I think you reported this second time crash issue, but I'm
only getting back into csound dev since yesterday, so I might have it
all jumbled in my head.  Are you getting this behavior too?  Also,
have you tried moving the plugins into a separate location?

Thanks!
steven

On Fri, Jun 28, 2013 at 9:22 PM, Steven Yi <stevenyi@gmail.com> wrote:
> Hi Michael,
>
> I'm still debugging here.  The strange thing I'm noticing is that the
> CsoundAndroidExamples project builds/loads/runs just fine.  It has
> this in the APK:
>
> -rwxrwxrwx  0 0      0           0 Jun 28 16:22 lib/armeabi/libcsoundandroid.so
> -rwxrwxrwx  0 0      0           0 Jun 28 16:22 lib/armeabi/libgnustl_shared.so
> -rwxrwxrwx  0 0      0           0 Jun 28 16:22 lib/armeabi/libsndfile.so
> -rwxrwxrwx  0 0      0           0 Jun 28 16:24
> lib/armeabi-v7a/libcsoundandroid.so
> -rwxrwxrwx  0 0      0           0 Jun 28 16:24
> lib/armeabi-v7a/libgnustl_shared.so
> -rwxrwxrwx  0 0      0           0 Jun 28 16:24 lib/armeabi-v7a/libsndfile.so
>
> I'm hoping that's a hint as to how to move forward.
>
> Continuing on...
>
> steven
>
> On Fri, Jun 28, 2013 at 4:45 PM, Victor Lazzarini
> <Victor.Lazzarini@nuim.ie> wrote:
>> It gets loaded either on csoundReset(), csoundCompileArgs() or csoundStart(), depending on the sequence of calls.
>> Look for csoundLoadModules().
>>
>> Victor
>>
>> On 28 Jun 2013, at 13:27, jpff@cs.bath.ac.uk wrote:
>>
>>>> Pursuant to Android problems, when exactly does Csound load plugin
>>>> opcodes?
>>>> Does this happen only once per Csound instance? In every performance?
>>>>
>>>> Regards,
>>>> Mike
>>>>
>>>
>>> Thought it was only once, but I could be wrong
>>> ==John ff
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> 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
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> 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

------------------------------------------------------------------------------
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

Date2013-06-29 03:40
FromSteven Yi
SubjectRe: [Cs-dev] When are externals loaded in Csound 6
I think the issue though is that with CsoundAndroid, that static
initializer wasn't going to run until csndJNI got called the first
time, which was probably later than when the libs were loaded from
libs/armeabi-v7a.  My guess too is that load order differs by device.
I think investigating loading opcode libs outside of libs/armeabi-v7a
will be fruitful.

Other things to note, I tried the Csound Android examples.  LuaMoog
and the lua score gen examples loaded and played but had notes with 0
amp.  I didn't look at the CSD's yet but wasn't sure if they were
supposed to be playing something.  I guess though that they did load
and run which seems like a good sign.

On Fri, Jun 28, 2013 at 10:36 PM, Michael Gogins
 wrote:
> I had the second round crash problem only once, it went away.
>
> I was preloading in CsoundAndroid's static initializer. I will try keeping
> that and also doing it as you do. Perhaps the order of losing differs
> between devices.
>
> I have all the libs built statically and I just have to link them with
> Csound.
>
> So it sounds like we have two approaches that should work.
>
> Thanks, I will be able to do more on this tomorrow.
>
> Best,
> Mike
>
> On Jun 28, 2013 9:44 PM, "Steven Yi"  wrote:
>>
>> Success!  I modified CsoundAppActivity.java to pre-load both
>> libsndfile and libgnustl_shared.  This got all the libraries to load.
>> I am not certain, but my guess is that putting the opcode libraries
>> into libs/armeabi-v7a and libs/armeabi is not the correct thing.
>> Also, my guess is that Android by default tries to load the libraries
>> on startup, and does so without regard for any kind of order.  For
>> now, I think the fix I pushed should be considered just a stop gap,
>> and we should work out moving the opcode libraries to a different
>> directory (perhaps assets).
>>
>> I've modified install_libs.sh too to work even if the directories it
>> mkdir's already exist.
>>
>> Otherwise, I am able to run a CSD once.  On the second time running a
>> CSD I get what looks like a crash.  The app just goes back to the
>> homescreen. I do see this in logcat:
>>
>> 06-28 21:41:36.191: A/libc(16951): @@@ ABORTING: LIBC: ARGUMENT IS
>> INVALID HEAP ADDRESS IN dlfree addr=0x71eba880
>>
>> Again, my bet is that we should move the opcodes to a different location.
>>
>> Michael: I think you reported this second time crash issue, but I'm
>> only getting back into csound dev since yesterday, so I might have it
>> all jumbled in my head.  Are you getting this behavior too?  Also,
>> have you tried moving the plugins into a separate location?
>>
>> Thanks!
>> steven
>>
>> On Fri, Jun 28, 2013 at 9:22 PM, Steven Yi  wrote:
>> > Hi Michael,
>> >
>> > I'm still debugging here.  The strange thing I'm noticing is that the
>> > CsoundAndroidExamples project builds/loads/runs just fine.  It has
>> > this in the APK:
>> >
>> > -rwxrwxrwx  0 0      0           0 Jun 28 16:22
>> > lib/armeabi/libcsoundandroid.so
>> > -rwxrwxrwx  0 0      0           0 Jun 28 16:22
>> > lib/armeabi/libgnustl_shared.so
>> > -rwxrwxrwx  0 0      0           0 Jun 28 16:22
>> > lib/armeabi/libsndfile.so
>> > -rwxrwxrwx  0 0      0           0 Jun 28 16:24
>> > lib/armeabi-v7a/libcsoundandroid.so
>> > -rwxrwxrwx  0 0      0           0 Jun 28 16:24
>> > lib/armeabi-v7a/libgnustl_shared.so
>> > -rwxrwxrwx  0 0      0           0 Jun 28 16:24
>> > lib/armeabi-v7a/libsndfile.so
>> >
>> > I'm hoping that's a hint as to how to move forward.
>> >
>> > Continuing on...
>> >
>> > steven
>> >
>> > On Fri, Jun 28, 2013 at 4:45 PM, Victor Lazzarini
>> >  wrote:
>> >> It gets loaded either on csoundReset(), csoundCompileArgs() or
>> >> csoundStart(), depending on the sequence of calls.
>> >> Look for csoundLoadModules().
>> >>
>> >> Victor
>> >>
>> >> On 28 Jun 2013, at 13:27, jpff@cs.bath.ac.uk wrote:
>> >>
>> >>>> Pursuant to Android problems, when exactly does Csound load plugin
>> >>>> opcodes?
>> >>>> Does this happen only once per Csound instance? In every performance?
>> >>>>
>> >>>> Regards,
>> >>>> Mike
>> >>>>
>> >>>
>> >>> Thought it was only once, but I could be wrong
>> >>> ==John ff
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> 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
>> >>
>> >> Dr Victor Lazzarini
>> >> Senior Lecturer
>> >> Dept. of Music
>> >> NUI Maynooth Ireland
>> >> tel.: +353 1 708 3545
>> >> Victor dot Lazzarini AT nuim dot ie
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> 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
>>
>>
>> ------------------------------------------------------------------------------
>> 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
>
>
> ------------------------------------------------------------------------------
> 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
>

------------------------------------------------------------------------------
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

Date2013-06-29 03:44
FromMichael Gogins
SubjectRe: [Cs-dev] When are externals loaded in Csound 6
AttachmentsNone  None  

Those examples require the sliders to be moved. They are working!

Best, Mike

On Jun 28, 2013 10:41 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
I think the issue though is that with CsoundAndroid, that static
initializer wasn't going to run until csndJNI got called the first
time, which was probably later than when the libs were loaded from
libs/armeabi-v7a.  My guess too is that load order differs by device.
I think investigating loading opcode libs outside of libs/armeabi-v7a
will be fruitful.

Other things to note, I tried the Csound Android examples.  LuaMoog
and the lua score gen examples loaded and played but had notes with 0
amp.  I didn't look at the CSD's yet but wasn't sure if they were
supposed to be playing something.  I guess though that they did load
and run which seems like a good sign.

On Fri, Jun 28, 2013 at 10:36 PM, Michael Gogins
<michael.gogins@gmail.com> wrote:
> I had the second round crash problem only once, it went away.
>
> I was preloading in CsoundAndroid's static initializer. I will try keeping
> that and also doing it as you do. Perhaps the order of losing differs
> between devices.
>
> I have all the libs built statically and I just have to link them with
> Csound.
>
> So it sounds like we have two approaches that should work.
>
> Thanks, I will be able to do more on this tomorrow.
>
> Best,
> Mike
>
> On Jun 28, 2013 9:44 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
>>
>> Success!  I modified CsoundAppActivity.java to pre-load both
>> libsndfile and libgnustl_shared.  This got all the libraries to load.
>> I am not certain, but my guess is that putting the opcode libraries
>> into libs/armeabi-v7a and libs/armeabi is not the correct thing.
>> Also, my guess is that Android by default tries to load the libraries
>> on startup, and does so without regard for any kind of order.  For
>> now, I think the fix I pushed should be considered just a stop gap,
>> and we should work out moving the opcode libraries to a different
>> directory (perhaps assets).
>>
>> I've modified install_libs.sh too to work even if the directories it
>> mkdir's already exist.
>>
>> Otherwise, I am able to run a CSD once.  On the second time running a
>> CSD I get what looks like a crash.  The app just goes back to the
>> homescreen. I do see this in logcat:
>>
>> 06-28 21:41:36.191: A/libc(16951): @@@ ABORTING: LIBC: ARGUMENT IS
>> INVALID HEAP ADDRESS IN dlfree addr=0x71eba880
>>
>> Again, my bet is that we should move the opcodes to a different location.
>>
>> Michael: I think you reported this second time crash issue, but I'm
>> only getting back into csound dev since yesterday, so I might have it
>> all jumbled in my head.  Are you getting this behavior too?  Also,
>> have you tried moving the plugins into a separate location?
>>
>> Thanks!
>> steven
>>
>> On Fri, Jun 28, 2013 at 9:22 PM, Steven Yi <stevenyi@gmail.com> wrote:
>> > Hi Michael,
>> >
>> > I'm still debugging here.  The strange thing I'm noticing is that the
>> > CsoundAndroidExamples project builds/loads/runs just fine.  It has
>> > this in the APK:
>> >
>> > -rwxrwxrwx  0 0      0           0 Jun 28 16:22
>> > lib/armeabi/libcsoundandroid.so
>> > -rwxrwxrwx  0 0      0           0 Jun 28 16:22
>> > lib/armeabi/libgnustl_shared.so
>> > -rwxrwxrwx  0 0      0           0 Jun 28 16:22
>> > lib/armeabi/libsndfile.so
>> > -rwxrwxrwx  0 0      0           0 Jun 28 16:24
>> > lib/armeabi-v7a/libcsoundandroid.so
>> > -rwxrwxrwx  0 0      0           0 Jun 28 16:24
>> > lib/armeabi-v7a/libgnustl_shared.so
>> > -rwxrwxrwx  0 0      0           0 Jun 28 16:24
>> > lib/armeabi-v7a/libsndfile.so
>> >
>> > I'm hoping that's a hint as to how to move forward.
>> >
>> > Continuing on...
>> >
>> > steven
>> >
>> > On Fri, Jun 28, 2013 at 4:45 PM, Victor Lazzarini
>> > <Victor.Lazzarini@nuim.ie> wrote:
>> >> It gets loaded either on csoundReset(), csoundCompileArgs() or
>> >> csoundStart(), depending on the sequence of calls.
>> >> Look for csoundLoadModules().
>> >>
>> >> Victor
>> >>
>> >> On 28 Jun 2013, at 13:27, jpff@cs.bath.ac.uk wrote:
>> >>
>> >>>> Pursuant to Android problems, when exactly does Csound load plugin
>> >>>> opcodes?
>> >>>> Does this happen only once per Csound instance? In every performance?
>> >>>>
>> >>>> Regards,
>> >>>> Mike
>> >>>>
>> >>>
>> >>> Thought it was only once, but I could be wrong
>> >>> ==John ff
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> 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
>> >>
>> >> Dr Victor Lazzarini
>> >> Senior Lecturer
>> >> Dept. of Music
>> >> NUI Maynooth Ireland
>> >> tel.: +353 1 708 3545
>> >> Victor dot Lazzarini AT nuim dot ie
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> 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
>>
>>
>> ------------------------------------------------------------------------------
>> 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
>
>
> ------------------------------------------------------------------------------
> 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
>

------------------------------------------------------------------------------
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

Date2013-06-29 03:51
FromSteven Yi
SubjectRe: [Cs-dev] When are externals loaded in Csound 6
I tried just now moving sliders, pressing buttons, hitting the
trackpad and still got 0 amp output.  Should the changes register
during a render, or do they need to be changed before render is
started?  If the former, then something is off here.

On Fri, Jun 28, 2013 at 10:44 PM, Michael Gogins
 wrote:
> Those examples require the sliders to be moved. They are working!
>
> Best, Mike
>
> On Jun 28, 2013 10:41 PM, "Steven Yi"  wrote:
>>
>> I think the issue though is that with CsoundAndroid, that static
>> initializer wasn't going to run until csndJNI got called the first
>> time, which was probably later than when the libs were loaded from
>> libs/armeabi-v7a.  My guess too is that load order differs by device.
>> I think investigating loading opcode libs outside of libs/armeabi-v7a
>> will be fruitful.
>>
>> Other things to note, I tried the Csound Android examples.  LuaMoog
>> and the lua score gen examples loaded and played but had notes with 0
>> amp.  I didn't look at the CSD's yet but wasn't sure if they were
>> supposed to be playing something.  I guess though that they did load
>> and run which seems like a good sign.
>>
>> On Fri, Jun 28, 2013 at 10:36 PM, Michael Gogins
>>  wrote:
>> > I had the second round crash problem only once, it went away.
>> >
>> > I was preloading in CsoundAndroid's static initializer. I will try
>> > keeping
>> > that and also doing it as you do. Perhaps the order of losing differs
>> > between devices.
>> >
>> > I have all the libs built statically and I just have to link them with
>> > Csound.
>> >
>> > So it sounds like we have two approaches that should work.
>> >
>> > Thanks, I will be able to do more on this tomorrow.
>> >
>> > Best,
>> > Mike
>> >
>> > On Jun 28, 2013 9:44 PM, "Steven Yi"  wrote:
>> >>
>> >> Success!  I modified CsoundAppActivity.java to pre-load both
>> >> libsndfile and libgnustl_shared.  This got all the libraries to load.
>> >> I am not certain, but my guess is that putting the opcode libraries
>> >> into libs/armeabi-v7a and libs/armeabi is not the correct thing.
>> >> Also, my guess is that Android by default tries to load the libraries
>> >> on startup, and does so without regard for any kind of order.  For
>> >> now, I think the fix I pushed should be considered just a stop gap,
>> >> and we should work out moving the opcode libraries to a different
>> >> directory (perhaps assets).
>> >>
>> >> I've modified install_libs.sh too to work even if the directories it
>> >> mkdir's already exist.
>> >>
>> >> Otherwise, I am able to run a CSD once.  On the second time running a
>> >> CSD I get what looks like a crash.  The app just goes back to the
>> >> homescreen. I do see this in logcat:
>> >>
>> >> 06-28 21:41:36.191: A/libc(16951): @@@ ABORTING: LIBC: ARGUMENT IS
>> >> INVALID HEAP ADDRESS IN dlfree addr=0x71eba880
>> >>
>> >> Again, my bet is that we should move the opcodes to a different
>> >> location.
>> >>
>> >> Michael: I think you reported this second time crash issue, but I'm
>> >> only getting back into csound dev since yesterday, so I might have it
>> >> all jumbled in my head.  Are you getting this behavior too?  Also,
>> >> have you tried moving the plugins into a separate location?
>> >>
>> >> Thanks!
>> >> steven
>> >>
>> >> On Fri, Jun 28, 2013 at 9:22 PM, Steven Yi  wrote:
>> >> > Hi Michael,
>> >> >
>> >> > I'm still debugging here.  The strange thing I'm noticing is that the
>> >> > CsoundAndroidExamples project builds/loads/runs just fine.  It has
>> >> > this in the APK:
>> >> >
>> >> > -rwxrwxrwx  0 0      0           0 Jun 28 16:22
>> >> > lib/armeabi/libcsoundandroid.so
>> >> > -rwxrwxrwx  0 0      0           0 Jun 28 16:22
>> >> > lib/armeabi/libgnustl_shared.so
>> >> > -rwxrwxrwx  0 0      0           0 Jun 28 16:22
>> >> > lib/armeabi/libsndfile.so
>> >> > -rwxrwxrwx  0 0      0           0 Jun 28 16:24
>> >> > lib/armeabi-v7a/libcsoundandroid.so
>> >> > -rwxrwxrwx  0 0      0           0 Jun 28 16:24
>> >> > lib/armeabi-v7a/libgnustl_shared.so
>> >> > -rwxrwxrwx  0 0      0           0 Jun 28 16:24
>> >> > lib/armeabi-v7a/libsndfile.so
>> >> >
>> >> > I'm hoping that's a hint as to how to move forward.
>> >> >
>> >> > Continuing on...
>> >> >
>> >> > steven
>> >> >
>> >> > On Fri, Jun 28, 2013 at 4:45 PM, Victor Lazzarini
>> >> >  wrote:
>> >> >> It gets loaded either on csoundReset(), csoundCompileArgs() or
>> >> >> csoundStart(), depending on the sequence of calls.
>> >> >> Look for csoundLoadModules().
>> >> >>
>> >> >> Victor
>> >> >>
>> >> >> On 28 Jun 2013, at 13:27, jpff@cs.bath.ac.uk wrote:
>> >> >>
>> >> >>>> Pursuant to Android problems, when exactly does Csound load plugin
>> >> >>>> opcodes?
>> >> >>>> Does this happen only once per Csound instance? In every
>> >> >>>> performance?
>> >> >>>>
>> >> >>>> Regards,
>> >> >>>> Mike
>> >> >>>>
>> >> >>>
>> >> >>> Thought it was only once, but I could be wrong
>> >> >>> ==John ff
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> ------------------------------------------------------------------------------
>> >> >>> 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
>> >> >>
>> >> >> Dr Victor Lazzarini
>> >> >> Senior Lecturer
>> >> >> Dept. of Music
>> >> >> NUI Maynooth Ireland
>> >> >> tel.: +353 1 708 3545
>> >> >> Victor dot Lazzarini AT nuim dot ie
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> ------------------------------------------------------------------------------
>> >> >> 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
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> 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
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > 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
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> 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
>
>
> ------------------------------------------------------------------------------
> 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
>

------------------------------------------------------------------------------
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