<br><br><div class="gmail_quote">2011/11/12 Mathieu Bouchard <span dir="ltr">&lt;<a href="mailto:matju@artengine.ca">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 class="im"><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 class="im"><br></div></blockquote><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 class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><font class="Apple-style-span" face="arial, sans-serif"> gl_frame_cond = (pthread_cond_t) malloc(sizeof(pthread_mutex_t));</font><font class="Apple-style-span" face="arial, sans-serif" size="2">&quot;</font></span></div>

<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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
<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 class="h5"><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><br>