ippiDilate crashes

ippiDilate crashes

I used the ippiDilate_8u_C1IR function for months and everything worked fine. Now, I use it in a new function and it crashes randomly but I can't get a hint on what is wrong. It crashes at MyModule.dll!_g9_Dilate_8u_C1S() +0x3bf bytes.

I use IPP 7.0 on Win7 Pro 64b.

I call ippiDilate_8u_C1IR, the image data I pass is aligned on 4bytes, mask is all filled with 1, maskSize is 3 by 3, anchor is 1, 1

Here is the Dissasembly :

0693C6F5  vpand       xmm6,xmm5,xmmword ptr [ebx+0F0h] 

0693C6FD  vpmaxub     xmm0,xmm0,xmm6 

0693C701  je          0693CD56 

0693C707 jmp _g9_Dilate_8u_C1S+17Dh (693C4EDh)

0693C70C  mov         dword ptr [esp+0Ch],ecx 

0693C710  mov         ecx,dword ptr [esp+50h] 

0693C714  mov         edi,ebx 

0693C716  mov         edx,dword ptr [esp+58h] 

0693C71A  vpxor       xmm0,xmm0,xmm0 

0693C71E  mov         dword ptr [esp],eax 

0693C721  mov         dword ptr [esp+8],esi 

0693C725  mov         dword ptr [esp+20h],ebx 

0693C729  mov         esi,dword ptr [esp+54h] 

0693C72D  mov         ebx,ecx 

crashes here ----> 0693C72F  vmovdqu     xmm3,xmmword ptr [edi] 

0693C733  lea         eax,[edi+10h] 

0693C736  jmp         _g9_Dilate_8u_C1S+3D5h (693C745h) 

0693C738  vmovdqa     xmm3,xmm1 

0693C73C  add         eax,10h 

0693C73F  add         ebx,100h 

0693C745  vpand       xmm4,xmm3,xmmword ptr [ebx] 

0693C749  cmp         esi,1 

0693C74C  vmovdqu     xmm1,xmmword ptr [eax] 

0693C750  vpmaxub     xmm0,xmm0,xmm4 

0693C754  je          0693CD8A 

0693C75A  vpsrldq     xmm3,xmm3,1 

0693C75F  cmp         esi,2 

0693C762  vpslldq     xmm4,xmm1,0Fh 

0693C767  vpor        xmm3,xmm3,xmm4 

0693C76B  vpand       xmm5,xmm3,xmmword ptr [ebx+10h] 

And here is the content of my registers :

EAX = 0000003C EBX = 0324A6F0 ECX = 0324A6F0 EDX = 00000003 ESI = 00000003 EDI = 1F15FC5F EIP = 0693C72F ESP = 0324A68C EBP = 1F15FC5F EFL = 00010206

CS = 0023 DS = 002B ES = 002B SS = 002B FS = 0053 GS = 002B

ST0 = +0.0000000000000000e+0000   ST1 = +0.0000000000000000e+0000   ST2 = +0.0000000000000000e+0000   ST3 = +0.0000000000000000e+0000   ST4 = +0.0000000000000000e+0000   ST5 = +7.9000000000000000e+0001   ST6 = +2.8600000000000000e+0002   ST7 = +0.0000000000000000e+0000   CTRL = 027F STAT = 0120 TAGS = FFFF EIP = 067410AC EDO = 0324AAA4

MM0 = 0000000000000000 MM1 = 0000000000000000 MM2 = 0000000000000000 MM3 = 0000000000000000 MM4 = 0000000000000000 MM5 = 9E00000000000000 MM6 = 8F00000000000000 MM7 = 0000000000000000

XMM0 = 00000000000000000000000000000000 XMM1 = 00000000000000000000000000000000 XMM2 = 00000000000000000000000000000000 XMM3 = 00000000000000000000000000000000 XMM4 = 00000000000000000000000000000000 XMM5 = 00000000000000000000000000000000 XMM6 = FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF XMM7 = 00000000000000000000000000000000 XMM00 = +0.00000E+000      XMM01 = +0.00000E+000      XMM02 = +0.00000E+000      XMM03 = +0.00000E+000      XMM10 = +0.00000E+000      XMM11 = +0.00000E+000      XMM12 = +0.00000E+000      XMM13 = +0.00000E+000      XMM20 = +0.00000E+000      XMM21 = +0.00000E+000      XMM22 = +0.00000E+000      XMM23 = +0.00000E+000      XMM30 = +0.00000E+000      XMM31 = +0.00000E+000      XMM32 = +0.00000E+000      XMM33 = +0.00000E+000      XMM40 = +0.00000E+000      XMM41 = +0.00000E+000      XMM42 = +0.00000E+000      XMM43 = +0.00000E+000      XMM50 = +0.00000E+000      XMM51 = +0.00000E+000      XMM52 = +0.00000E+000      XMM53 = +0.00000E+000      XMM60 = -1.#QNANE+000      XMM61 = -1.#QNANE+000      XMM62 = -1.#QNANE+000      XMM63 = -1.#QNANE+000      XMM70 = +0.00000E+000      XMM71 = +0.00000E+000      XMM72 = +0.00000E+000      XMM73 = +0.00000E+000      MXCSR = 00001F80

XMM0DL = +0.0000000000000000E+000         XMM0DH = +0.0000000000000000E+000         XMM1DL = +0.0000000000000000E+000         XMM1DH = +0.0000000000000000E+000         XMM2DL = +0.0000000000000000E+000         XMM2DH = +0.0000000000000000E+000         XMM3DL = +0.0000000000000000E+000         XMM3DH = +0.0000000000000000E+000         XMM4DL = +0.0000000000000000E+000         XMM4DH = +0.0000000000000000E+000         XMM5DL = +0.0000000000000000E+000         XMM5DH = +0.0000000000000000E+000         XMM6DL = -1.#QNAN00000000000E+000         XMM6DH = -1.#QNAN00000000000E+000         XMM7DL = +0.0000000000000000E+000         XMM7DH = +0.0000000000000000E+000        

YMM0 = F1F2000000000000654C00000000000000000000000000000000000000000000 YMM1 = 654C000000000000000000000000000000000000000000000000000000000000 YMM2 = 0000000000000000F1F200000000000000000000000000000000000000000000 YMM3 = 000A0000000000006E6500000000000000000000000000000000000000000000 YMM4 = 45790000000000006F7200000000000000000000000000000000000000000000 YMM5 = 00010000000000006E6F00000000000000000000000000000000000000000000 YMM6 = 00010000000000006174000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF YMM7 = 00010000000000006B7200000000000000000000000000000000000000000000 YMM0I0 = 0000000000000000 YMM0I1 = 0000000000000000 YMM0I2 = 654C000000000000 YMM0I3 = F1F2000000000000 YMM1I0 = 0000000000000000 YMM1I1 = 0000000000000000 YMM1I2 = 0000000000000000 YMM1I3 = 654C000000000000 YMM2I0 = 0000000000000000 YMM2I1 = 0000000000000000 YMM2I2 = F1F2000000000000 YMM2I3 = 0000000000000000 YMM3I0 = 0000000000000000 YMM3I1 = 0000000000000000 YMM3I2 = 6E65000000000000 YMM3I3 = 000A000000000000 YMM4I0 = 0000000000000000 YMM4I1 = 0000000000000000 YMM4I2 = 6F72000000000000 YMM4I3 = 4579000000000000 YMM5I0 = 0000000000000000 YMM5I1 = 0000000000000000 YMM5I2 = 6E6F000000000000 YMM5I3 = 0001000000000000

YMM6I0 = FFFFFFFFFFFFFFFF YMM6I1 = FFFFFFFFFFFFFFFF YMM6I2 = 6174000000000000 YMM6I3 = 0001000000000000 YMM7I0 = 0000000000000000 YMM7I1 = 0000000000000000 YMM7I2 = 6B72000000000000 YMM7I3 = 0001000000000000

YMM0F0 = +0.00000E+000      YMM0F1 = +0.00000E+000      YMM0F2 = +0.00000E+000      YMM0F3 = +0.00000E+000      YMM0F4 = +0.00000E+000      YMM0F5 = +6.02102E+022      YMM0F6 = +0.00000E+000      YMM0F7 = -2.39665E+030      YMM1F0 = +0.00000E+000      YMM1F1 = +0.00000E+000      YMM1F2 = +0.00000E+000      YMM1F3 = +0.00000E+000      YMM1F4 = +0.00000E+000      YMM1F5 = +0.00000E+000      YMM1F6 = +0.00000E+000      YMM1F7 = +6.02102E+022      YMM2F0 = +0.00000E+000      YMM2F1 = +0.00000E+000      YMM2F2 = +0.00000E+000      YMM2F3 = +0.00000E+000      YMM2F4 = +0.00000E+000      YMM2F5 = -2.39665E+030      YMM2F6 = +0.00000E+000      YMM2F7 = +0.00000E+000      YMM3F0 = +0.00000E+000      YMM3F1 = +0.00000E+000      YMM3F2 = +0.00000E+000      YMM3F3 = +0.00000E+000      YMM3F4 = +0.00000E+000      YMM3F5 = +1.77180E+028      YMM3F6 = +0.00000E+000      YMM3F7 = +9.2E-040#DEN      YMM4F0 = +0.00000E+000      YMM4F1 = +0.00000E+000      YMM4F2 = +0.00000E+000      YMM4F3 = +0.00000E+000      YMM4F4 = +0.00000E+000      YMM4F5 = +7.48954E+028      YMM4F6 = +0.00000E+000      YMM4F7 = +3.98400E+003      YMM5F0 = +0.00000E+000      YMM5F1 = +0.00000E+000     

YMM5F2 = +0.00000E+000      YMM5F3 = +0.00000E+000      YMM5F4 = +0.00000E+000      YMM5F5 = +1.84917E+028      YMM5F6 = +0.00000E+000      YMM5F7 = +9.2E-041#DEN      YMM6F0 = -1.#QNANE+000      YMM6F1 = -1.#QNANE+000      YMM6F2 = -1.#QNANE+000      YMM6F3 = -1.#QNANE+000      YMM6F4 = +0.00000E+000      YMM6F5 = +2.81313E+020      YMM6F6 = +0.00000E+000      YMM6F7 = +9.2E-041#DEN      YMM7F0 = +0.00000E+000      YMM7F1 = +0.00000E+000      YMM7F2 = +0.00000E+000      YMM7F3 = +0.00000E+000      YMM7F4 = +0.00000E+000      YMM7F5 = +2.92560E+026      YMM7F6 = +0.00000E+000      YMM7F7 = +9.2E-041#DEN      YMM0D0 = +0.0000000000000000E+000         YMM0D1 = +0.0000000000000000E+000         YMM0D2 = +9.0770653069271721E+179         YMM0D3 = -7.5015162369898361E+240         YMM1D0 = +0.0000000000000000E+000         YMM1D1 = +0.0000000000000000E+000         YMM1D2 = +0.0000000000000000E+000         YMM1D3 = +9.0770653069271721E+179         YMM2D0 = +0.0000000000000000E+000         YMM2D1 = +0.0000000000000000E+000         YMM2D2 = -7.5015162369898361E+240         YMM2D3 = +0.0000000000000000E+000         YMM3D0 = +0.0000000000000000E+000        

YMM3D1 = +0.0000000000000000E+000         YMM3D2 = +6.0727596168061509E+223         YMM3D3 = +1.390671161567E-308#DEN         YMM4D0 = +0.0000000000000000E+000         YMM4D1 = +0.0000000000000000E+000         YMM4D2 = +6.8225892728058498E+228         YMM4D3 = +4.8357032784585167E+026         YMM5D0 = +0.0000000000000000E+000         YMM5D1 = +0.0000000000000000E+000         YMM5D2 = +8.9645499105233656E+223         YMM5D3 = +1.390671161567E-309#DEN         YMM6D0 = -1.#QNAN00000000000E+000         YMM6D1 = -1.#QNAN00000000000E+000         YMM6D2 = +2.8118211215894977E+161         YMM6D3 = +1.390671161567E-309#DEN         YMM7D0 = +0.0000000000000000E+000         YMM7D1 = +0.0000000000000000E+000         YMM7D2 = +3.6985330557762001E+209         YMM7D3 = +1.390671161567E-309#DEN        

OV = 0 UP = 0 EI = 1 PL = 0 ZR = 0 AC = 0 PE = 1 CY = 0

1F15FC5F = ????????????????????????????????

 

Thanks for any help or clue to find out what is wrong in my code.

Francis 

6 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

Hi Francis,

>>... It crashes at MyModule.dll!_g9_Dilate_8u_C1S() +0x3bf bytes...

Unfortunately, it is not enough to understand what is wrong.

>>...Thanks for any help or clue to find out what is wrong in my code...

Any chance to post a reproducer that simulates your real processing and crashes?

Best regards,
Sergey

Bild des Benutzers iliyapolak

Hi!
While doing single step debugging please post the content of the memory pointed by this instructions :vpand xmm6,xmm5,xmmword ptr [ebx+0F0h]
What is the memory content of "ebx+0F0h?
Please observe the different values(stack addresses) which are pointed by ebx register and try to locate their content in the memory window.
What type of crash are you experiencing?
Is this so called memory access violation code 0xc0000005 or something else?
Also crucial information needed to understand the culprit is related to this mov instruction : mov edi,ebx

Finally, we have figured out that when we deactivate another of our threads, we are fine. So it is not related at all with the dilate and it's really a problem on our side of a thread that is writing over our memory.

iliyapolak, we were getting an access violation code 0xc0000005 and looking closer to the registers, I think that our anchor parameter was getting override by some junk from our bugged thread.

Thanks for the support. I think we can remove this whole topic since it's not relevant anymore.

Francis

You could update the title of the thread to: '[SOLVED] ippiDilate crashes' or '[FIXED] ippiDilate crashes'.

Thanks in advance.

Bild des Benutzers iliyapolak

>>> think that our anchor parameter was getting override by some junk from our bugged thread.>>>
Yes it was quite possible.Probably leftover from the other thread's called functions, or improper functions cleanup.

Melden Sie sich an, um einen Kommentar zu hinterlassen.