<br><br><div class="gmail_quote">2011/11/12 tim vets <span dir="ltr">&lt;<a href="mailto:timvets@gmail.com">timvets@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br><br><div class="gmail_quote"><div class="im">2011/11/12 Mathieu Bouchard <span dir="ltr">&lt;<a href="mailto:matju@artengine.ca" target="_blank">matju@artengine.ca</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Le 2011-11-12 à 18:19:00, tim vets a écrit :<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Whenever you have a crash while doing malloc/new, hunt down the Invalid Writes that you see and it will usually fix the problem.<br>
If it doesn&#39;t fix the problem, then it&#39;s because there are other Invalid Writes that valgrind couldn&#39;t detect.<br>
indeed, when creating [fux_kinect], valgrind says:<br>
<br>
==3908== Invalid write of size 4<br>
==3908==    at 0x417017E: pthread_cond_init@@GLIBC_2.3.2 (pthread_cond_init.c:43)<br>
</blockquote>
<br></div>
So, when will you apply the fix I gave in a previous mail ?<div><br></div></blockquote></div><div>it&#39;s stretching my knowledge quite far now, </div><div>but gave it a shot anyway, and interpreted what you wrote as:</div>


<div>find the line &quot;<span style="background-color:rgb(255, 255, 255)"><font face="arial, sans-serif"> gl_frame_cond = (pthread_cond_t) malloc(sizeof(pthread_mutex_t));</font><font face="arial, sans-serif" size="2">&quot;</font></span></div>

</div></blockquote><div>typo: the original line being</div><div> &quot;<span style="background-color: rgb(255, 255, 255); "><font face="arial, sans-serif"> gl_frame_cond = (pthread_cond_t*) malloc(sizeof(pthread_mutex_t));</font><font face="arial, sans-serif" size="2">&quot;</font></span></div>

<div><span style="background-color: rgb(255, 255, 255); "><font face="arial, sans-serif" size="2">that is...</font></span></div><div><span style="background-color: rgb(255, 255, 255); "><font face="arial, sans-serif" size="2"><br>

</font></span></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote">
<div>(in fux_kinect.cpp)</div><div>and remove the &quot;*&quot; from that line.</div><div>now make gives:</div><div> &quot;g++ -export_dynamic -shared -I/home/tim/Downloads/pdextendedSVN/0.42/pd/include `pkg-config --cflags libfreenect` -g -O2 -fPIC -freg-struct-return -Os -falign-loops=32 -falign-functions=32 -falign-jumps=32 -funroll-loops -ffast-math  -mmmx  -DLINUX -o fux_kinect.o -c fux_kinect.cpp</div>


<div>fux_kinect.cpp: In constructor ‘fux_kinect::fux_kinect(int, t_atom*)’:</div><div>fux_kinect.cpp:80:66: error: no matching function for call to ‘pthread_cond_t::pthread_cond_t(void*)’</div><div>/usr/include/bits/pthreadtypes.h:130:3: note: candidates are: pthread_cond_t::pthread_cond_t()</div>


<div>/usr/include/bits/pthreadtypes.h:130:3: note:                 pthread_cond_t::pthread_cond_t(const pthread_cond_t&amp;)</div><div>make: *** [all] Error 1</div><div><br></div><div>or am I getting it wrong?</div><div>

gr,</div>
<div>Tim</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
==3908==  Address 0x4389460 is not stack&#39;d, malloc&#39;d or (recently) free&#39;d<br>
</blockquote>
<br></div>
Did you just remove the malloc line entirely ? Put the correct line I gave you.<br>
<br>
To get rid of malloc/free, you need make more changes than just that (removing * in some places and adding &amp; in some other places).<div><div></div><div><br>
<br>
 ______________________________<u></u>______________________________<u></u>__________<br>
| Mathieu BOUCHARD ----- téléphone : <a href="tel:%2B1.514.383.3801" value="+15143833801" target="_blank">+1.514.383.3801</a> ----- Montréal, QC</div></div></blockquote></div></div><br>
</blockquote></div><br>