m_pMethTab can be NULL in a very small window between the time object is allocated in GC heap and its method table is set. Check FastAllocateObject in gcscan.cpp - the window I am talking about is between Alloc and SetMethodTable.
m_pMethTab of Object* should be correctly setup all the time otherwise. -Jan This posting is provided "AS IS" with no warranties, and confers no rights. -----Original Message----- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Chris Tavares Sent: Sunday, August 10, 2003 1:47 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET-ROTOR] !GCForbidden assertion: why? Jan, Thanks, you hit the nail on the head - it was a null pointer reference. Found that one and fixed it. However, I've hit another snag that's a little more complicated. In general, under what circumstances can you have an Object * where m_pMethTab is null? I'm hitting that - it's apparently getting to my assertion via EEClass::RunClassInit. Is the method table not yet set up at that point? Thanks, -Chris > -----Original Message----- > From: Discussion of the Rotor Shared Source CLI implementation > [mailto:[EMAIL PROTECTED] Behalf Of Jan Kotas > Sent: Sunday, August 10, 2003 8:00 AM > To: [EMAIL PROTECTED] > Subject: Re: [DOTNET-ROTOR] !GCForbidden assertion: why? > > > Since assertion you are seeing is in excepx86.cpp, my guess is that your > code hit access violation. You can verify it by running the program > under debugger with stop on exception set (in Visual Studio, go to Debug > / Exceptions and check break into debugger for "Win32 exceptions"). > > If this does not help, can you please send a full callstack for the > assertion? > > -Jan