Very confusing ATL crash - any help appreciated! 
Author Message
 Very confusing ATL crash - any help appreciated!


Got a very strange crash which has had me scratching my head for over
a week now, and was wondering if anyone had seen anything similar or
had any ideas where to look... I've tried to list all the relevant key
details and things I've tried, if anyone can shed any light on this it
would be *much* appreciated!

We've got our own list control-derived COM component built using ATL.
Double-clicking on it is meant to bring up a dialog box; in doing so
we create another COM object that resides in a separate DLL. When
creating this COM component, the application crashes with an access
violation. The crash is:

+ Release mode only (naturally...)
+ In ATL::InlineIsEqualGUID()
+ Intermittent - the usual case is that it works or crashes straight
away, but sometimes it can take a few or many clicks to make it crash.
+ Works or fails depending on the machine the component
(ListControl.dll) was *built* on (this is the scary bit)
+ Adding debug information to one of the DLLs in the call stack -
ITMRowList.dll - stops the crash
+ If it crashes on one machine, it crashes on other machines, and vice

Whether it crashes or not depends on the machine our component was
built on, so we narrowed it down to a single component -
ListControl.dll. This led me to trying the following to no avail:

+ Changing and disabling optimisation settings
+ Comparing stdole32.tlb, stdole2.tlb, stdole.tlb, ctl3d32.dll,
ctl3dv2.dll, comctl32.ocx, ole32.dll versions on the build machines
and replacing the version on the broken machine with the non-broken
machine version. I'm not sure what other differences could affect the
build on the two machines.
+ Re-installing VC++ SP3 on a clean machine - this still crashes
+ Rolling back to a previous version of the code that used to work -
re-building it now crashes
+ Rebuilding absolutely everything
+ Building manually and with our automated build process

Other things I've tried:

+ Ensuring all COM methods in the call stack have AFX_MANAGE_STATE()
calls if required
+ Trying to create the component at various points in the call stack,
all of which still cause it to crash

The definition of InlineIsEqualGUID(), where the crash happens:

__inline BOOL  InlineIsEqualGUID(REFGUID rguid1, REFGUID rguid2)
   return (
      ((PLONG) &rguid1)[0] == ((PLONG) &rguid2)[0] &&
      ((PLONG) &rguid1)[1] == ((PLONG) &rguid2)[1] &&
      ((PLONG) &rguid1)[2] == ((PLONG) &rguid2)[2] &&
      ((PLONG) &rguid1)[3] == ((PLONG) &rguid2)[3]);


Looking at the disassembly, the crash is in the first of these
comparisons. The call stack is below for completeness.

As I say, any help appreciated!



ITMROWLIST! ATL::InlineIsEqualGUID(struct _GUID const &,struct _GUID
const &) + 12 bytes
ITMROWLIST! ATL::AtlModuleGetClassObject(struct ATL::_ATL_MODULE
*,struct _GUID const &,struct _GUID const &,void * *) + 103 bytes
ITMROWLIST! ATL::CComModule::GetClassObject(struct _GUID const
&,struct _GUID const &,void * *) + 28 bytes

OLE32! 77b4cedd()
OLE32! 77b4d37c()
OLE32! 77b4cfe3()
OLE32! 77b4ce0c()
OLE32! 77b27754()
OLE32! 77b2758b()
OLE32! 77b277cf()
LISTCONTROL! 02de72ab()
LISTCONTROL! 02de45aa()
LISTCONTROL! 02deb541()
LISTCONTROL! 02dee2c1()
USER32! 77e72211()
USER32! 77e7356c()
COMCTL32! 71703218()
COMCTL32! 7173e196()
COMCTL32! 7171afd0()
COMCTL32! 71708d75()
USER32! 77e72c6a()
USER32! 77e85946()
CWnd::DefWindowProcW(CWnd * const 0x00000ea2 {CWnd hWnd=???}, unsigned
int 0x00000203, unsigned int 0x00000001, long 0x01b40114) line 1006 +
19 bytes
CWnd::WindowProc(CWnd * const 0x00000ea2 {CWnd hWnd=???}, unsigned int
0x00000203, unsigned int 0x00000001, long 0x01b40114) line 1586 + 19
AfxCallWndProc(CWnd * 0x00000000 {CWnd hWnd=???}, HWND__ * 0x00060b42,
unsigned int 0x00000203, unsigned int 0x00000001, long 0x01b40114)
line 218
AfxWndProc(HWND__ * 0x00060b42, unsigned int 0x00000203, unsigned int
0x00000001, long 0x01b40114) line 368
USER32! 77e7124c()

Sat, 30 Apr 2005 02:11:51 GMT  
 [ 1 post ] 

 Relevant Pages 

1. my atl com crashes help ~~~

2. Confused by ATL documentation

3. Code problem - help appreciated

4. help would be appreciated

5. help would be appreciated

6. ***Any help appreciated*********

7. utter learner appreciate help

8. Some debugging help would be appreciated

9. would appreciate help with pointer abuse

10. Any help will be greatly appreciated once again....

11. Help appreciated.

12. Pls help, I wil really appreciate


Powered by phpBB® Forum Software