PDA

View Full Version : It still crashes : might be a bug


R3g
3rd May 2002, 09:18
Hi !

I come back with my old problem discussed here : http://forum.doom9.org/showthread.php?threadid=23278
But I have some news. Willing to know what was happening, I did several tests, with different decoder/frameserver/encoder, and I have been pretty sure that the crash comes from XviD. I also think (although I can't be sure about it) that the bug (if there is one) has been introduced with the core version 2.0.

So, knowing that Xvid was involved, I downloaded the CVS snapshot, build my own dll, and started a debug session on it.

As I seem to be the only one to encounter that problem, I believe it comes from a funny hardware and/or system behaviour. Anyway, I post here, in the hope that someone will have an idea of what can happen. I attach to this message the call stack and the program disassembly generated by MSVC++.

Best regards, R3g.

R3g
3rd May 2002, 14:00
well, the attachments seems to fail, so I'll copy and paste :

Here is the call stack :
XVID! transfer_8to16sub_mmx + 56 bytes
MBMotionCompensation(MACROBLOCK * const 0x045c9e00, const unsigned int 16, const unsigned int 10, const IMAGE * const 0x04021e64, const IMAGE * const 0x04021e7c, const IMAGE * const 0x04021e88, const IMAGE * const 0x04021ea0, IMAGE * const 0x04021e58, short * 0x0151f1f0, const unsigned int 472, const unsigned int 208, const unsigned int 544, const unsigned int 0) line 121 + 83 byte
FrameCodeP(Encoder * 0x04021e10, Bitstream * 0x0151f5fc, unsigned int * 0x0151f5f8, unsigned int 0, unsigned int 0) line 732 + 98 bytes
encoder_encode(Encoder * 0x04021e10, XVID_ENC_FRAME * 0x0151f718, XVID_ENC_STATS * 0x0151f704) line 312 + 29 bytes
xvid_encore(void * 0x04021e10, int 0, void * 0x0151f718, void * 0x0151f704) line 244 + 17 bytes
compress(CODEC * 0x00ef7bf8, ICCOMPRESS * 0x0151fc64) line 491 + 25 bytes
DriverProc(unsigned long 15694840, HDRVR__ * 0x00000001, unsigned int 16392, long 22150244, long 48) line 242 + 13 bytes
MSVFW32! 73b2175d()
MSVFW32! 73b2469c()
MSVFW32! 73b256a7()
DVD2AVI! 00417d02()
DVD2AVI! 00415f0e()

And the disassembly of the part of code where the crash happened :
_transfer_8to16sub_mmx:
1000F9F0 push esi
1000F9F1 push edi
1000F9F2 push ebx
1000F9F3 mov edi,dword ptr [esp+10h]
1000F9F7 mov edx,dword ptr [esp+14h]
1000F9FB mov esi,dword ptr [esp+18h]
1000F9FF mov ecx,dword ptr [esp+1Ch]
1000FA03 mov eax,edx
1000FA05 mov ebx,esi
1000FA07 add eax,ecx
1000FA09 add ebx,ecx
1000FA0B shl ecx,1
1000FA0D pxor mm7,mm7
1000FA10 movq mm0,mmword ptr [edx]
1000FA13 movq mm1,mm0
1000FA16 punpcklbw mm0,mm7
1000FA19 punpckhbw mm1,mm7
1000FA1C movq mm4,mmword ptr [eax]
1000FA1F movq mm5,mm4
1000FA22 punpcklbw mm4,mm7
1000FA25 punpckhbw mm5,mm7
1000FA28 movq mm2,mmword ptr [esi] <-- The cursor was here
1000FA2B movq mm3,mm2

-h
4th May 2002, 03:55
Hm very weird. ESI is being filled with garbage somehow, however it should just be the address of *ref which is XviD-allocated anyway.

Very strange.. if I get some free time today I'll have another look.

-h

R3g
4th May 2002, 12:14
Right, I had another debugging session with mmx optimizations disabled in XviD, and from what the debugger told me, the 'ref' symbol couldn't be resolved, as if the adresse it points to was not allocated.

-h
6th May 2002, 09:17
I didn't get any time to look at this, unfortunately. I can only say it's the most bizarre error I've seen from XviD in a while - you're using VC6 + SP5 + PPack?

Might take a while to fix :)

-h

R3g
6th May 2002, 10:51
Right, except I dunno what PPack is. Take your time, I think this thing is very particular, because I'm the only one to encounter this. Do you think my hardware and/or system could be involved ? I was perhaps thinking of a stupid interaction with my antivirus or something else ....