[Cs-dev] Csound API issues...
Date | 2012-10-12 11:00 |
From | Rory Walsh |
Subject | [Cs-dev] Csound API issues... |
In my quest to build an AU version of Cabbage I've hit an issue with the Csound library. The reason I assume it's something to do with Csound is due to the fact that not calling Csound gets rid of the error. Here's is what the console says: 10/11/12 5:07:52 PM [0x0-0x19c99c8].org.ardour.Ardour2[38032] JUCE v2.0.25 10/11/12 5:07:52 PM [0x0-0x19c99c8].org.ardour.Ardour2[38032] File exists:/Users/walshr/Library/Audio/Plug-Ins/Components/CabbagePluginOSX.component/Contents/CabbagePluginOSX.csd 10/11/12 5:07:52 PM [0x0-0x19c99c8].org.ardour.Ardour2[38032] Ardour2.bin(38032,0xa049d540) malloc: *** error for object 0x17dedc20: pointer being freed was not allocated The other thing that leads me to believe this is an issue with the Csound lib is that I use smart pointers only, and from my understanding of the above problem, it's highly unlikely to occur when using smart pointers. The other odd thing is that it only appears when I try to launch a Cabbage AU in Ardour. There is no crash with other hosts. Perhaps it's not an issue with Csound at all, but I'm certainly stumped. And I'm a total OSX noobie! Any help in debugging would be much appreciated! ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2012-10-12 11:49 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Csound API issues... |
Can you run this on gdb and see where the crash is? You can attach GDB to ardour's PID and see if you get backtrace $ps -u |
Date | 2012-10-12 11:54 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] Csound API issues... |
I am not a noobie on OSX -- mre of a neveroo But, does valgrind run on OSX? That would identify a false free. Otoh I have never heard of smart pointers either > In my quest to build an AU version of Cabbage I've hit an issue with > the Csound library. The reason I assume it's something to do with > Csound is due to the fact that not calling Csound gets rid of the > error. Here's is what the console says: > > 10/11/12 5:07:52 PM [0x0-0x19c99c8].org.ardour.Ardour2[38032] JUCE v2.0.25 > 10/11/12 5:07:52 PM [0x0-0x19c99c8].org.ardour.Ardour2[38032] File > exists:/Users/walshr/Library/Audio/Plug-Ins/Components/CabbagePluginOSX.component/Contents/CabbagePluginOSX.csd > 10/11/12 5:07:52 > PM [0x0-0x19c99c8].org.ardour.Ardour2[38032] Ardour2.bin(38032,0xa049d540) > malloc: *** error for object 0x17dedc20: pointer being freed was not > allocated > > The other thing that leads me to believe this is an issue with the > Csound lib is that I use smart pointers only, and from my > understanding of the above problem, it's highly unlikely to occur when > using smart pointers. The other odd thing is that it only appears when > I try to launch a Cabbage AU in Ardour. There is no crash with other > hosts. Perhaps it's not an issue with Csound at all, but I'm certainly > stumped. And I'm a total OSX noobie! Any help in debugging would be > much appreciated! > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel > > > ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2012-10-12 12:22 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Csound API issues... |
There's valgrind on OSX,. Here's the summary for the csound command running trapped ==38182== ==38182== HEAP SUMMARY: ==38182== in use at exit: 796,369 bytes in 2,162 blocks ==38182== total heap usage: 42,025 allocs, 39,863 frees, 22,315,442 bytes allocated ==38182== ==38182== LEAK SUMMARY: ==38182== definitely lost: 72 bytes in 1 blocks ==38182== indirectly lost: 0 bytes in 0 blocks ==38182== possibly lost: 0 bytes in 0 blocks ==38182== still reachable: 796,209 bytes in 2,160 blocks ==38182== suppressed: 88 bytes in 1 blocks ==38182== Rerun with --leak-check=full to see details of leaked memory ==38182== ==38182== For counts of detected and suppressed errors, rerun with: -v ==38182== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) On 12 Oct 2012, at 11:54, jpff@cs.bath.ac.uk wrote: > I am not a noobie on OSX -- mre of a neveroo > But, does valgrind run on OSX? That would identify a false free. > Otoh I have never heard of smart pointers either > > >> In my quest to build an AU version of Cabbage I've hit an issue with >> the Csound library. The reason I assume it's something to do with >> Csound is due to the fact that not calling Csound gets rid of the >> error. Here's is what the console says: >> >> 10/11/12 5:07:52 PM [0x0-0x19c99c8].org.ardour.Ardour2[38032] JUCE v2.0.25 >> 10/11/12 5:07:52 PM [0x0-0x19c99c8].org.ardour.Ardour2[38032] File >> exists:/Users/walshr/Library/Audio/Plug-Ins/Components/CabbagePluginOSX.component/Contents/CabbagePluginOSX.csd >> 10/11/12 5:07:52 >> PM [0x0-0x19c99c8].org.ardour.Ardour2[38032] Ardour2.bin(38032,0xa049d540) >> malloc: *** error for object 0x17dedc20: pointer being freed was not >> allocated >> >> The other thing that leads me to believe this is an issue with the >> Csound lib is that I use smart pointers only, and from my >> understanding of the above problem, it's highly unlikely to occur when >> using smart pointers. The other odd thing is that it only appears when >> I try to launch a Cabbage AU in Ardour. There is no crash with other >> hosts. Perhaps it's not an issue with Csound at all, but I'm certainly >> stumped. And I'm a total OSX noobie! Any help in debugging would be >> much appreciated! >> >> ------------------------------------------------------------------------------ >> Don't let slow site performance ruin your business. Deploy New Relic APM >> Deploy New Relic app performance management and know exactly >> what is happening inside your Ruby, Python, PHP, Java, and .NET app >> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >> http://p.sf.net/sfu/newrelic-dev2dev >> _______________________________________________ >> Csound-devel mailing list >> Csound-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/csound-devel >> >> >> > > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-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 ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2012-10-12 13:32 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Csound API issues... |
Just trying that now. The problem is that as soon as I attach Ardour's process to gdb it renders Ardour useless. I get that little beachball. It just keeps spinning and spinning...does it spin anti-clockwise in the southern hemisphere? Ok, now to Valgrind, but I'll have to built it myself first I think. On 12 October 2012 11:49, Victor Lazzarini |
Date | 2012-10-12 13:35 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Csound API issues... |
I'll take a look at Valgrind. Smart pointers are a C++ thing, auto garbage collection thingymabobs. Great for people like me who tend to play loose and fast with memory! On 12 October 2012 11:54, |
Date | 2012-10-12 13:44 |
From | Steven Yi |
Subject | Re: [Cs-dev] Csound API issues... |
Attachments | None None |
Are you pressing c to continue once you attach? On Oct 12, 2012 1:33 PM, "Rory Walsh" <rorywalsh@ear.ie> wrote:
Just trying that now. The problem is that as soon as I attach Ardour's |
Date | 2012-10-12 13:52 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Csound API issues... |
Thanks Steven! Nice idea! Ok, once I try to open a Cabbage plugin I get the following before it hangs: Reading symbols for shared libraries ........... done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000184 0x17df01a3 in opcode_list_new_oentry () On 12 October 2012 13:44, Steven Yi |
Date | 2012-10-12 14:08 |
From | Felipe Sateler |
Subject | Re: [Cs-dev] Csound API issues... |
Attachments | None None |
Use the backtrace command to see the call chain that led to the problem (after the crash). On Fri, Oct 12, 2012 at 9:52 AM, Rory Walsh <rorywalsh@ear.ie> wrote: Thanks Steven! Nice idea! Ok, once I try to open a Cabbage plugin I Saludos, Felipe Sateler |
Date | 2012-10-12 15:32 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] Csound API issues... |
> I'll take a look at Valgrind. Smart pointers are a C++ thing, auto > garbage collection thingymabobs. Great for people like me who tend to > play loose and fast with memory! > > Arhh all that effort trying to educate students to Do It Right being nullified by yeaky code....... Time to retire I think! ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2012-10-15 11:27 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Csound API issues... |
This is what the backtrace says: (gdb) c Continuing. Reading symbols for shared libraries ............ done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000184 0x17df01a3 in opcode_list_new_oentry () The sequence of call to the Csound API is as follows: csound = new Csound(); csound->PreCompile(); csound->SetHostData(this); The takes place during the call to PreCompile(). If I take out the call to PreCompile I get a different set of errors, but I fear that might not be the best tack to take. Also, I have to point out that this happens only with Ardour. My Csound driven plugins works in other AU hosts. Any suggestions? ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2012-10-15 11:36 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Csound API issues... |
Could you give us the other set of errors mentioned? On 15 Oct 2012, at 11:27, Rory Walsh wrote: > This is what the backtrace says: > > (gdb) c > Continuing. > Reading symbols for shared libraries ............ done > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_PROTECTION_FAILURE at address: 0x00000184 > 0x17df01a3 in opcode_list_new_oentry () > > The sequence of call to the Csound API is as follows: > > csound = new Csound(); > csound->PreCompile(); > csound->SetHostData(this); > > The takes place during the call to PreCompile(). If I take out the > call to PreCompile I get a different set of errors, but I fear that > might not be the best tack to take. Also, I have to point out that > this happens only with Ardour. My Csound driven plugins works in other > AU hosts. Any suggestions? > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-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 ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2012-10-15 11:38 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Csound API issues... |
Also, what is the exact message that the bt command prints? On 15 Oct 2012, at 11:27, Rory Walsh wrote: > This is what the backtrace says: > > (gdb) c > Continuing. > Reading symbols for shared libraries ............ done > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_PROTECTION_FAILURE at address: 0x00000184 > 0x17df01a3 in opcode_list_new_oentry () > > The sequence of call to the Csound API is as follows: > > csound = new Csound(); > csound->PreCompile(); > csound->SetHostData(this); > > The takes place during the call to PreCompile(). If I take out the > call to PreCompile I get a different set of errors, but I fear that > might not be the best tack to take. Also, I have to point out that > this happens only with Ardour. My Csound driven plugins works in other > AU hosts. Any suggestions? > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-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 ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2012-10-15 11:48 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Csound API issues... |
The exact message is: (gdb) c Continuing. Reading symbols for shared libraries ............ done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000184 0x17df01a3 in opcode_list_new_oentry () (gdb) bt #0 0x17df01a3 in opcode_list_new_oentry () #1 0x17df0274 in csoundAppendOpcodes () (gdb) If I take out the call to PreCompile(), so my sequence of calls now looks like this: csound = new Csound(); //csound->PreCompile(); csound->SetHostData(this); csound->SetExternalMidiInOpenCallback(OpenMidiInputDevice); csound->SetExternalMidiReadCallback(ReadMidiData); csound->SetExternalMidiOutOpenCallback(OpenMidiOutputDevice); csound->SetExternalMidiWriteCallback(WriteMidiData); csCompileResult = csound->Compile( const_cast |
Date | 2012-10-15 12:01 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Csound API issues... |
OK, thanks, so we know it's a problem when loading opcodes. I'll look at it now. Victor On 15 Oct 2012, at 11:48, Rory Walsh wrote: > The exact message is: > > (gdb) c > Continuing. > Reading symbols for shared libraries ............ done > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_PROTECTION_FAILURE at address: 0x00000184 > 0x17df01a3 in opcode_list_new_oentry () > (gdb) bt > #0 0x17df01a3 in opcode_list_new_oentry () > #1 0x17df0274 in csoundAppendOpcodes () > (gdb) > > > If I take out the call to PreCompile(), so my sequence of calls now > looks like this: > > csound = new Csound(); > //csound->PreCompile(); > csound->SetHostData(this); > > csound->SetExternalMidiInOpenCallback(OpenMidiInputDevice); > csound->SetExternalMidiReadCallback(ReadMidiData); > csound->SetExternalMidiOutOpenCallback(OpenMidiOutputDevice); > csound->SetExternalMidiWriteCallback(WriteMidiData); > > csCompileResult = csound->Compile( > const_cast |
Date | 2012-10-15 12:20 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Csound API issues... |
One thing you could try, just to narrow down the search for us, is to hide the opcode directory, the one in the framework, then run again. This will allow us to see if the issue is with one of the plugin opcodes. You could hide it by either renaming it or by setting the OPCODEDIR etc variables in .MacOSX/environment.plist Victor On 15 Oct 2012, at 11:48, Rory Walsh wrote: > The exact message is: > > (gdb) c > Continuing. > Reading symbols for shared libraries ............ done > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_PROTECTION_FAILURE at address: 0x00000184 > 0x17df01a3 in opcode_list_new_oentry () > (gdb) bt > #0 0x17df01a3 in opcode_list_new_oentry () > #1 0x17df0274 in csoundAppendOpcodes () > (gdb) > > > If I take out the call to PreCompile(), so my sequence of calls now > looks like this: > > csound = new Csound(); > //csound->PreCompile(); > csound->SetHostData(this); > > csound->SetExternalMidiInOpenCallback(OpenMidiInputDevice); > csound->SetExternalMidiReadCallback(ReadMidiData); > csound->SetExternalMidiOutOpenCallback(OpenMidiOutputDevice); > csound->SetExternalMidiWriteCallback(WriteMidiData); > > csCompileResult = csound->Compile( > const_cast |
Date | 2012-10-15 14:11 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Csound API issues... |
Steven suggested I try that too, but in the end it didn't make any difference. Same errors as before. On 15 October 2012 12:20, Victor Lazzarini |
Date | 2012-10-15 15:02 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Csound API issues... |
Ok, so it's earlier than that. I am looking at a possible bug now, and I'll let you know. Victor On 15 Oct 2012, at 14:11, Rory Walsh wrote: > Steven suggested I try that too, but in the end it didn't make any > difference. Same errors as before. > > On 15 October 2012 12:20, Victor Lazzarini |