Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] CsoundPython.cpp

Date2006-05-11 19:25
FromIstvan Varga
SubjectRe: [Cs-dev] CsoundPython.cpp
AttachmentsNone  

Date2006-05-11 20:11
FromVictor Lazzarini
Subject[Cs-dev] CsoundPython.cpp
Looking again at CsoundPython.cpp, it seems right that there
was a memory access exception with csound5GUI. This bit of
code, which is responsible for it, is suspect:

 csoundDestroy(csound);
 csound = cppSound->getCsound();
 csoundSetHostData(csound, csoundGetHostData(*csound_));
 csoundSetMessageCallback(csound,
                            
&CsoundGUIConsole::messageCallback_Thread);

It appears that by destroy 'csound' we destroy *csound_,
which then
causes the csoundSet...() API calls to fail.

I don't really understand the code and the reasons why you
have to
create a new instance and destroy the old one. It appears
that is
because you want the derived object rather than the base,
which is
fine, but it is crashing here.

If we on the other hand do not destroy the old instance,
then it's
OK. There is no crash. I don't really want to go modifying
code that
I don't fully understand, so I'll leave it up to the authors
to fix it,
now that we know where the problem lies.

Best regards,

Victor


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net