VM crash

Bob.Cowdery at CGI-Europe.com Bob.Cowdery at CGI-Europe.com
Sun Jun 4 12:12:12 UTC 2006


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20060604/42f2022c/attachment.htm


More information about the Squeak-dev mailing list