Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
6628 Discussions

FatalExecutionEngineError during FFT in visual basic 2005 (.NET)

I'm having trouble trying to get the FFT to work consistently. My code gives me the right results but crashes after a certain number of runs.

Dim st As ipp.IppStatus
Dim fftOrder = 10
Dim L As Integer = 2 ^ fftOrder
Dim sig1(L) As ipp.Ipp64fc
Dim pSig1 As IntPtr = GetPtr(sig1)
Dim sig2(L) As ipp.Ipp64fc
Dim pSig2 As IntPtr = GetPtr(sig2)

Dim phase() As Double = {0}
Dim pPhase As IntPtr = GetPtr(phase)

Dim FFTflag As Integer = ipp.IppsFFTFlags.IPP_FFT_DIV_FWD_BY_N
Dim pFFTspec(0) As IntPtr
Dim ppFFTSpec As IntPtr = GetPtr(pFFTspec)

Public Function GetPtr(ByRef Array As Array) As IntPtr
Return System.Runtime.InteropServices.Marshal.UnsafeAddrOfPinnedArrayElement(Array, 0)
End Function

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
st = ipp.sp.ippsFFTInitAlloc_C_64fc(ppFFTSpec, fftOrder, FFTflag, ipp.IppHintAlgorithm.ippAlgHintFast) 'Initilise FFT
st = ipp.sp.ippsTone_Direct_64fc(pSig1, L, 1, 999 / L, pPhase, ipp.IppHintAlgorithm.ippAlgHintFast) 'Make a tone
st = ipp.sp.ippsWinBlackman_64fc_I(pSig1, L, CDbl(0.3)) 'Apply Window
st = ipp.sp.ippsFFTFwd_CToC_64fc(pSig1, pSig2, pFFTspec(0), Nothing) 'Do the FFT
'This runs many times succesfully then genarates the following error

' FatalExecutionEngineError was detected
' Message: The runtime has encountered a fatal error. The address of the error was at 0x79e73c0b, on thread 0x15b0. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.

st = ipp.sp.ippsFFTFree_C_64fc(pFFTspec(0)) 'FREE FFT MEMORY
End Sub

' Im using the following version of IPP
Package ID: w_ipp_ia32_p_5.3.1.064
Package Contents: Intel IPP 5.3 Update 1 for Windows* on IA-32 Intel Architecture

Thanks in Advance
0 Kudos
1 Reply


we were not able to reproduce that issue. Could you please provide a test case if you did not solve it yet?