<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>VM crash</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>This may help although I have a feeling it's just where it was in the execution loop. Anyway, the last crash gave the following dump and the first time I have seen a stack trace with it.</FONT></P>
<P><FONT SIZE=2>Sun Jun 04 14:26:40 2006</FONT>
</P>
<P><FONT SIZE=2>Exception code: C0000005</FONT>
<BR><FONT SIZE=2>Exception addr: 00419EED</FONT>
<BR><FONT SIZE=2>Access violation (read access) at 222D9300</FONT>
<BR><FONT SIZE=2>EAX:222D9300 EBX:80000002 ECX:00000001 EDX:00000000</FONT>
<BR><FONT SIZE=2>ESI:1228D280 EDI:1228D0CC EBP:1223A3B8 ESP:0006FBA8</FONT>
<BR><FONT SIZE=2>EIP:00419EED EFL:00010246</FONT>
<BR><FONT SIZE=2>FP Control: FFFF037F</FONT>
<BR><FONT SIZE=2>FP Status: FFFF4020</FONT>
<BR><FONT SIZE=2>FP Tag: FFFFFFFF</FONT>
<BR><FONT SIZE=2>VM Version: Squeak 3.7.1 (release) from Sep 23 2004</FONT>
<BR><FONT SIZE=2>Compiler: gcc 2.95.2 19991024 (release)</FONT>
</P>
<P><FONT SIZE=2>Current byte code: 196</FONT>
<BR><FONT SIZE=2>Primitive index: 0</FONT>
</P>
<P><FONT SIZE=2>Loaded plugins:</FONT>
<BR> <FONT SIZE=2>SDRDttSpDSPPlugin 4 June 2006 (e)</FONT>
<BR> <FONT SIZE=2>JPEGReadWriter2Plugin 23 September 2004 (i)</FONT>
<BR> <FONT SIZE=2>SoundPlugin 23 September 2004 (i)</FONT>
<BR> <FONT SIZE=2>LargeIntegers v1.3 23 September 2004 (i)</FONT>
<BR> <FONT SIZE=2>SocketPlugin 23 September 2004 (i)</FONT>
<BR> <FONT SIZE=2>B2DPlugin 23 September 2004 (i)</FONT>
<BR> <FONT SIZE=2>Matrix2x3Plugin 23 September 2004 (i)</FONT>
<BR> <FONT SIZE=2>FloatArrayPlugin 23 September 2004 (i)</FONT>
<BR> <FONT SIZE=2>BitBltPlugin 23 September 2004 (i)</FONT>
<BR> <FONT SIZE=2>SecurityPlugin 23 September 2004 (i)</FONT>
<BR> <FONT SIZE=2>FilePlugin 23 September 2004 (i)</FONT>
<BR> <FONT SIZE=2>MiscPrimitivePlugin 23 September 2004 (i)</FONT>
</P>
<BR>
<P><FONT SIZE=2>Stack dump:</FONT>
</P>
<P><FONT SIZE=2>304685232 EventSensor>queueEvent:</FONT>
<BR><FONT SIZE=2>304685128 EventSensor>processEvent:</FONT>
<BR><FONT SIZE=2>304681876 EventSensor>fetchMoreEvents</FONT>
<BR><FONT SIZE=2>304376896 [] in EventSensor>eventTickler</FONT>
<BR><FONT SIZE=2>304376712 BlockContext>on:do:</FONT>
<BR><FONT SIZE=2>300511300 EventSensor>eventTickler</FONT>
<BR><FONT SIZE=2>300511024 [] in EventSensor>installEventTickler</FONT>
<BR><FONT SIZE=2>300511208 [] in BlockContext>newProcess</FONT>
</P>
<BR>
<P><FONT SIZE=2>-------------------------------------------</FONT>
<BR><FONT SIZE=2>Hi all, </FONT>
<BR><FONT SIZE=2>I do hope someone can help me out here because it's a real stopper for my app. I was getting sporadic VM crashes when calling my plugin, which I have now got down to a very small subset of code to reproduce the problem. The crash dump never has a stack trace and sometimes it fails so bad no dump is produced. Essentially what I have is a 'C' method that returns and array of 4096 float values. I have taken away all the application C code and simply load and return an array, so I am quite sure it's not the C code that's breaking but somewhere in the C/Squeak interface. Here is what I have (stripped to minimum for clarity). For testing I am running this flat out in a loop. If I run 100,000 iterations I will usually but not always get a crash. Is there anything I can do to isolate this a bit further?</FONT></P>
<P><FONT SIZE=2>Thanks in advance for any help. </FONT>
<BR><FONT SIZE=2>Bob </FONT>
<BR><FONT SIZE=2>The C code: </FONT>
<BR><FONT SIZE=2>----------- </FONT>
<BR><FONT SIZE=2>void process_test(float *results) { </FONT>
<BR><FONT SIZE=2> float a[4096]; </FONT>
<BR><FONT SIZE=2> int i; </FONT>
<BR><FONT SIZE=2> float f = 0.0; </FONT>
<BR><FONT SIZE=2> for(i=0;i<4096;i++){ </FONT>
<BR><FONT SIZE=2> a[i] = f; </FONT>
<BR><FONT SIZE=2> f = f + 1.0; </FONT>
<BR><FONT SIZE=2> } </FONT>
<BR><FONT SIZE=2> memcpy((void *)results, a, 4096*sizeof(float)); </FONT>
<BR><FONT SIZE=2>} </FONT>
<BR><FONT SIZE=2>The plugin code which is translated and compiled with the C code: </FONT>
<BR><FONT SIZE=2>---------------- </FONT>
<BR><FONT SIZE=2>test: data </FONT>
<BR><FONT SIZE=2> self export: true. </FONT>
<BR><FONT SIZE=2> self primitive: 'test' </FONT>
<BR><FONT SIZE=2> parameters:#(FloatArray). </FONT>
<BR><FONT SIZE=2> (self cCode: 'process_test(data)'). </FONT>
<BR><FONT SIZE=2> ^data. </FONT>
<BR><FONT SIZE=2>The calling code: </FONT>
<BR><FONT SIZE=2>----------------- </FONT>
<BR><FONT SIZE=2>primTest: data </FONT>
<BR><FONT SIZE=2> <primitive: 'test' module:'SDRDttSpDSPPlugin'> </FONT>
<BR><FONT SIZE=2> Transcript show: 'Primitive Test failed'. </FONT>
<BR><FONT SIZE=2> ^ false </FONT>
<BR><FONT SIZE=2>Finally, the method I call: </FONT>
<BR><FONT SIZE=2>------------------ </FONT>
<BR><FONT SIZE=2>test </FONT>
<BR><FONT SIZE=2> |data| </FONT>
<BR><FONT SIZE=2> data := FloatArray new: 4096. </FONT>
<BR><FONT SIZE=2> self primTest: data. </FONT>
<BR><FONT SIZE=2> ^ data. </FONT>
<BR><FONT SIZE=2>*** Confidentiality Notice *** Proprietary/Confidential</FONT>
<BR><FONT SIZE=2>Information belonging to CGI Group Inc. and its affiliates</FONT>
<BR><FONT SIZE=2>may be contained in this message. If you are not a recipient</FONT>
<BR><FONT SIZE=2>indicated or intended in this message (or responsible for</FONT>
<BR><FONT SIZE=2>delivery of this message to such person), or you think for</FONT>
<BR><FONT SIZE=2>any reason that this message may have been addressed to you</FONT>
<BR><FONT SIZE=2>in error, you may not use or copy or deliver this message</FONT>
<BR><FONT SIZE=2>to anyone else. In such case, you should destroy this</FONT>
<BR><FONT SIZE=2>message and are asked to notify the sender by reply email.</FONT>
</P>
<P><STRONG>*** Confidentiality Notice ***</STRONG>
Proprietary/Confidential<BR>Information belonging to CGI Group Inc. and its
affiliates<BR>may be contained in this message. If you are not a
recipient<BR>indicated or intended in this message (or responsible
for<BR>delivery of this message to such person), or you think for<BR>any reason
that this message may have been addressed to you<BR>in error, you may not use or
copy or deliver this message<BR>to anyone else. In such case, you should
destroy this<BR>message and are asked to notify the sender by reply
email.</P>
</BODY>
</HTML>