0

I am using 3rd party Decoder [ which is DivX] and in my application I get

"A first chance exception of type 'System.AccessViolationException' occurred"

When I look at stack trace, it seems that there is an error at memcpy in msvcr90.dll

msvcr90.dll!memcpy(unsigned char * dst=0x00000000, unsigned char * src=0x0ac766fe, unsigned long count=4294967248) Line 188 Asm

I can not able to trace problem further in Visual C++ 2008...What may cause this, or any tools technics to get root cause of this strange error?

MPelletier
  • 16,256
  • 15
  • 86
  • 137
Novalis
  • 2,265
  • 6
  • 39
  • 63
  • 2
    The cause is a NULL pointer being passed as the destination buffer to `memcpy()`. – hmjd Jul 17 '12 at 07:53
  • 2
    I'd look at the stack again, to check MY code and see what my code has passed as arguments to the 3rd party lib. I see a `NULL` pointer in `memcpy`. – Kiril Kirov Jul 17 '12 at 07:53
  • 1
    Also, the count argument is 4294967248 (=0xFFFFFFD0) which is a highly unlikely value. – Nordic Mainframe Jul 17 '12 at 07:57
  • Does the stack trace show you where `memcpy` is being called from? Have a look there to see why the first argument is null, and why the third seems to be -48. – Mike Seymour Jul 17 '12 at 08:04
  • Yes, stack trace show me where it called by i can not see its internals...It is a callback function without parameters. – Novalis Jul 17 '12 at 08:12

1 Answers1

0

It look like a pointer to unallocated\desallocated memory and the count seam also weird. You can try to debug\decompile it with OllyDBG or WinDBG and trace the problem.

Jiwan
  • 731
  • 4
  • 11