DebugVisualizers does not support FastSerialization?

Posts   
 
    
Barry
User
Posts: 232
Joined: 17-Aug-2005
# Posted on: 17-Sep-2007 06:23:31   

If I enable FastSerialization and open DebugVisualizers for an entity collection in VS2005, it throw a SerializationException.


See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.Serialization.SerializationException: Member 'AmountEntitiesInList' was not found.
   at System.Runtime.Serialization.SerializationInfo.GetElement(String name, Type& foundType)
   at System.Runtime.Serialization.SerializationInfo.GetInt32(String name)
   at SD.LLBLGen.Pro.ORMSupportClasses.CollectionCore`1..ctor(SerializationInfo info, StreamingContext context)
   at SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase2`1..ctor(SerializationInfo info, StreamingContext context)

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 17-Sep-2007 10:21:07   

Which LLBLGen Pro runtime library version are you using?

Barry
User
Posts: 232
Joined: 17-Aug-2005
# Posted on: 17-Sep-2007 10:22:53   

v2.5.7.907

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 17-Sep-2007 11:04:49   

The problem is this: FastSerialization is set as a static property of a class. This has to be done before deserialization takes place. The data arrives at the visualizer AFTER deserialization takes place. It also can't set the fast serialization always, because it depends on the application's setting.

What I find strange is that I did test this and it worked. I was surprised that it did (I tested this in vs.net 2005) because I was under the assumption that the debugger visualizer was a completely different appdomain and no static setting of the application (a different appdomain) was bleeding through the appdomain the debugger visualizer is running in.

However, when I try to reproduce that successful run, I can't... I get the same error as you.

Anyway, if a solution is possible it has to be implemented, but I have a bit of a hard time finding one. I've to see if I can pull some info from the original appdomain into the debugger visualizer...

(the config file of the application isn't accessable, so no config file setting can help. The appdomain of the debugger visualizer is started as a separate appdomain without access to the config file of the running app. At least, I can't find a way to access that at the moment).

(edit) I could solve it the lame way: a try catch and then switch on fast serialization and try again.

(edit) ok, the try/catch worked OK. simple_smile Fixed in next build.

Frans Bouma | Lead developer LLBLGen Pro