VM crash
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.
Sun Jun 04 14:26:40 2006
Exception code: C0000005
Exception addr: 00419EED
Access violation (read access) at 222D9300
EAX:222D9300 EBX:80000002 ECX:00000001 EDX:00000000
ESI:1228D280 EDI:1228D0CC EBP:1223A3B8 ESP:0006FBA8
EIP:00419EED EFL:00010246
FP Control: FFFF037F
FP Status: FFFF4020
FP Tag: FFFFFFFF
VM Version: Squeak 3.7.1 (release) from Sep 23 2004
Compiler: gcc 2.95.2 19991024 (release)
Current byte code: 196
Primitive index: 0
Loaded plugins:
SDRDttSpDSPPlugin 4 June 2006 (e)
JPEGReadWriter2Plugin 23 September 2004 (i)
SoundPlugin 23 September 2004 (i)
LargeIntegers v1.3 23 September 2004 (i)
SocketPlugin 23 September 2004 (i)
B2DPlugin 23 September 2004 (i)
Matrix2x3Plugin 23 September 2004 (i)
FloatArrayPlugin 23 September 2004 (i)
BitBltPlugin 23 September 2004 (i)
SecurityPlugin 23 September 2004 (i)
FilePlugin 23 September 2004 (i)
MiscPrimitivePlugin 23 September 2004 (i)
Stack dump:
304685232 EventSensor>queueEvent:
304685128 EventSensor>processEvent:
304681876 EventSensor>fetchMoreEvents
304376896 [] in EventSensor>eventTickler
304376712 BlockContext>on:do:
300511300 EventSensor>eventTickler
300511024 [] in EventSensor>installEventTickler
300511208 [] in BlockContext>newProcess
-------------------------------------------
Hi all,
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?
Thanks in advance for any help.
Bob
The C code:
-----------
void process_test(float *results) {
float a[4096];
int i;
float f = 0.0;
for(i=0;i<4096;i++){
a[i] = f;
f = f + 1.0;
}
memcpy((void *)results, a, 4096*sizeof(float));
}
The plugin code which is translated and compiled with the C code:
----------------
test: data
self export: true.
self primitive: 'test'
parameters:#(FloatArray).
(self cCode: 'process_test(data)').
^data.
The calling code:
-----------------
primTest: data
<primitive: 'test' module:'SDRDttSpDSPPlugin'>
Transcript show: 'Primitive Test failed'.
^ false
Finally, the method I call:
------------------
test
|data|
data := FloatArray new: 4096.
self primTest: data.
^ data.
*** Confidentiality Notice *** Proprietary/Confidential
Information belonging to CGI Group Inc. and its affiliates
may be contained in this message. If you are not a recipient
indicated or intended in this message (or responsible for
delivery of this message to such person), or you think for
any reason that this message may have been addressed to you
in error, you may not use or copy or deliver this message
to anyone else. In such case, you should destroy this
message and are asked to notify the sender by reply email.
*** Confidentiality Notice ***
Proprietary/Confidential
Information belonging to CGI Group Inc. and its
affiliates
may be contained in this message. If you are not a
recipient
indicated or intended in this message (or responsible
for
delivery of this message to such person), or you think for
any reason
that this message may have been addressed to you
in error, you may not use or
copy or deliver this message
to anyone else. In such case, you should
destroy this
message and are asked to notify the sender by reply
email.