Yes. And it makes sense now. I just wasn't thinking along those lines until the MS guy said something about it and I had time to think about it for a while. It's always something. LOL. I didn't equate the GC having issues with debugger and the size of the struct.
On 6/21/07, Paul van Brenk <[EMAIL PROTECTED]> wrote:
Uh.. A struct is always passed by value (ie. Copied). A class is passed by reference (just the pointer)... So yeah, I can imagine copying a struct with the size you describe could be a problem for the GC. -----Original Message----- From: Discussion of advanced .NET topics. [mailto: [EMAIL PROTECTED] On Behalf Of Mike Andrews Sent: Thursday, June 21, 2007 17:47 To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM Subject: Re: [ADVANCED-DOTNET] PRB: Cannot evaluate expression because a thread is stopped at a point where garbage collection is impossible... I think I've discovered the issue and after talking with a Microsoft technical support rep. The rep didn't have an answer, but made a reference to the number of parameters which led me to look further. The issue seems to be the total size of all parameters passed in to the method. The "details" parameter in the _groups.Load(...) method is a struct. The struct itself is quite large in size with about 30 fields that contain DataTables, DataRelations and DataRows. When I converted the struct to a class, the problem disappeared. It seems to be that the struct cannot be passed byval like a class when the size of the struct is greater than some [unknown] value. A very weird problem indeed. Thanks, Mike On 6/21/07, J. Merrill <[EMAIL PROTECTED]> wrote: > > Well, the class referenced by _groups must have a method called > Load. What's in it? Have you tried commenting out different lines in the > Load method to see what no longer "keeps the ability to display values > working"? > > At 04:33 PM 6/20/2007, Mike Andrews wrote (in part) > > > private void Load(Guid guid, MarType type, DateTime startDate, > >TransactionContext transaction){ > > //Nothing is readable in here except intrinsic data types > > ... > > //This is the line, that when commented out, keeps the ability to > >display values working > > _groups.Load(details, type, startDate); > > } > > > >} > > > >_groups is a variable that references a custom class (that inherits > directly > >from System.Object) that has no "special" functionality in it whatsoever. > > > > > > > > > > > > > > > > > > > > > > J. Merrill / Analytical Software Corp > > =================================== > This list is hosted by DevelopMentor(r) http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com > =================================== This list is hosted by DevelopMentor(r) http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor(r) http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
=================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com