[Xapian-devel] xapian csharp bindings crash

Olly Betts olly at survex.com
Sun Jun 26 07:28:45 BST 2011


On Sat, Jun 25, 2011 at 05:37:09PM +0200, Greg wrote:
> FAULTING_IP:
> _XapianSharp!CSharp_TermGenerator_SetFlags__SWIG_1+f2ca5
> 000007fe`e3d8533e 8b440208        mov     eax,dword ptr [rdx+rax+8]
> 
> EXCEPTION_RECORD:  ffffffffffffffff -- (.exr 0xffffffffffffffff)
> ExceptionAddress: 000007fee3d8533e
> (_XapianSharp!CSharp_TermGenerator_SetFlags__SWIG_1+0x00000000000f2ca5)
>    ExceptionCode: c0000005 (Access violation)
>   ExceptionFlags: 00000000
> NumberParameters: 2
>    Parameter[0]: 0000000000000000
>    Parameter[1]: 000000001dcb0058
> Attempt to read from address 000000001dcb0058

What version of Xapian are you using here?

This sounds like Parameter[1] is the "this" pointer and Parameter[0] is
the flags being set.  The other way round doesn't make sense, since the
C++ code doesn't try to read the flags as an address, and also that's
not a sensible flags value.

The generated C++ code there looks fine to me, at least in the latest
version.  So it looks like the pointer to the C++ object which the C#
object is holding is invalid.  I'm not sure how that might have happened
though.  Do you know if that's a plausible pointer value to a C++ heap
allocated object in your environment?

> I still have the dump files I could upload if they'll help, I'll also
> upload the latest compiled binaries to our production so that next
> crash will have proper pdb-s. In any case it looks to be an issue with
> pointer access in CSharp_TermGenerator_SetFlags__SWIG_1.

The dump files wouldn't help me - perhaps somebody else would know
what to do with them though.

Cheers,
    Olly



More information about the Xapian-devel mailing list