Re: !GCForbidden assertion: why?

Jan Kotas <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.rotor
Message-ID <DD12668590C9274E9B2226FDBD02B9880807A2CF@red-msg-08.redmond.corp.microsoft.com>
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]]On 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.