From: Luke D. <cod...@ho...> - 2002-07-11 05:54:45
|
Are you using gcc 2.95.3 or gcc 3.1? Are you using C or C++? If you are using the old compiler, are you building all objects with -fvtable-thunks? Have you tested this code at all with a different compiler, such as MSVC? Sorry, but I have to ask the obvious questions first. Luke ----- Original Message ----- From: "Dirk McCormick" <mcc...@cs...> To: <min...@li...> Sent: Friday, July 05, 2002 1:32 PM Subject: [Mingw-users] OLE program crash > Hi. > I'm having a rather perplexing problem trying to implement a Drop Source > for a ListView. > Every time I drag something, it causes a "This program has performed an > illegal operation ..." error and crashes. > I've implemented interfaces for IDropSource, IDataObject (required by > IDropSource) and IEnumFORMATETC (required by IDataObject) > > GDB tells me that the sequence of events leading up to the crash are: > DoDragDrop() is called, with the IDropSource object and an IDataObject > object as parameters. > In DoDragDrop(), some of the IUnknown methods of IDataObject are called. > Specifically, QueryInterface is called 3 times, and on the third > occasion with IID_Unknown as a parameter, from which S_OK is returned. > QueryInterface is then called 2 more times, both unsuccessfully (S_OK is > not returned, ie the REFIID parameter wasn't IID_IDropSource or > IID_IUnknown) > Immediately following the return from the second QueryInterface call, > the program crashes: > > Program received signal SIGSEGV, Segmentation fault. > 0x7ff5590b in _libuser32_a_iname () > (gdb) s > Single stepping until exit from function _libuser32_a_iname, > which has no line number information. > > Program exited with code 037777777777. > > > Any help would be greatly appreciated! > If more information is needed, such as GDB output or source code, please > ask. > (I plan to release the source once I've got a decent interface working) > I'm really just looking for any hint of what might be going wrong. > > This is the whole error given by windows when the program crashes: > > MYFTP caused an invalid page fault in > module OLE32.DLL at 0167:7ff5590b. > Registers: > EAX=00000074 CS=0167 EIP=7ff5590b EFLGS=00010213 > EBX=004f51c0 SS=016f ESP=0081f1a4 EBP=00000000 > ECX=004f51c4 DS=016f ESI=004110d4 FS=2a0f > EDX=00000000 ES=016f EDI=004f5208 GS=0000 > Bytes at CS:EIP: > 89 38 8b c3 5d 5f 5e 5b 83 c4 14 c2 10 00 8d 73 > Stack dump: > 009405c0 7ff2e2b0 004f522c 009405c0 7ff2e2a0 0081f1cc 009405c0 0081f258 > 00000000 00000000 009405c0 004f0000 00000000 00000074 7ff21520 7ffce00c > > > Thanks in advance. > Dirk |