ORMGeneral Trace Switch causes NullReferenceException

Posts   
 
    
Posts: 1268
Joined: 10-Mar-2006
# Posted on: 15-Mar-2007 07:19:28   

Using LLBLGen 2.0.7.226, SelfServicing

If I set the ORMGeneral trace switch to anything but level 4, everything works fine. However, setting it to 4, I get the following error:

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 58: /// <param name="info"></param> Line 59: /// <param name="context"></param> Line 60: protected WebMembershipCollection(SerializationInfo info, StreamingContext context) : base(info, context) Line 61: { Line 62: }

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.] SD.LLBLGen.Pro.ORMSupportClasses.EntityBase.GetEntityDescription(Boolean switchFlag, IEntity entity) +200 SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase1.GetEntityDescription(TEntity entity, Boolean switchFlag) +17 SD.LLBLGen.Pro.ORMSupportClasses.CollectionCore1.PerformAdd(T item) +95 SD.LLBLGen.Pro.ORMSupportClasses.CollectionCore1..ctor(SerializationInfo info, StreamingContext context) +403 SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase1..ctor(SerializationInfo info, StreamingContext context) +39 NameSpace.DAL.CollectionClasses.WebMembershipCollection..ctor(SerializationInfo info, StreamingContext context) .....

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 15-Mar-2007 08:26:46   

We will have a look at it and get back to you. Thanks.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 16-Mar-2007 10:15:57   

Looks indeed like an issue which needs a fix (in this case: remove the trace clause) because the data isn't there yet at that point in the case of deserialization)

Frans Bouma | Lead developer LLBLGen Pro
Posts: 1268
Joined: 10-Mar-2006
# Posted on: 16-Mar-2007 15:18:03   

Yeah, I just removed the switch and went on working. Just wanted to notify you so you can fix it in your spare time. wink

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 17-Mar-2007 17:25:23   

Fixed in 2.0.07.0317 build of runtime libs.

Frans Bouma | Lead developer LLBLGen Pro