Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic NullReferenceException when displaying diagram (Read 3284 times)
AT
YaBB Newbies
*
Offline



Posts: 7
Joined: Dec 21st, 2012
NullReferenceException when displaying diagram
Aug 7th, 2014 at 4:18pm
Print Post  
Hello,

I have a diagram that is being rendered to an image and that is working fine. I tried to convert it to a live diagram and found that the rendering process resulted in a null reference error:

[[NullReferenceException: Object reference not set to an instance of an object.]
   MindFusion.Diagramming.Mvc.x630bd14d2b59afbd.Serialize(Object obj, JavaScriptSerializer serializer) +998
   System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat, MemberInfo currentMember) +196
   System.Web.Script.Serialization.JavaScriptSerializer.SerializeEnumerable(IEnumer
able enumerable, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +194
   System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Obje
ct o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat, MemberInfo currentMember) +1922
   System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat, MemberInfo currentMember) +165
   System.Web.Script.Serialization.JavaScriptSerializer.SerializeDictionary(IDictio
nary o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +671
   System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Obje
ct o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat, MemberInfo currentMember) +1857
   System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat, MemberInfo currentMember) +165
   System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat) +51
   System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat, MemberInfo currentMember) +320
   System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, SerializationFormat serializationFormat) +113
   MindFusion.Diagramming.Mvc.DiagramViewExtensions.x5462b8fe5a6241c8(DiagramView xc42c7c2f5b14bb4d, String xeaf1b27180c0557b) +346]

After some investigation I found that this error is tied to use of the ArrowHeads.None link head shape. My diagram works when the following line is removed:

diagram.LinkHeadShape = ArrowHeads.None;

I have tried using a custom, empty shape and the diagram appears to ignore this setting and defaults to one of the standard arrows.

I am currently using version 1.3, which I purchased and downloaded last January and never updated. Is there a newer version that fixes this issue, that I could download under my previous 1 year upgrade license?

Is there a workaround to get the same effect as ArrowHeads.None?

Thanks,



  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: NullReferenceException when displaying diagram
Reply #1 - Aug 7th, 2014 at 6:14pm
Print Post  
Hi,

The exception seems fixed in version 1.6. Register here to get access to it:
http://clientsarea.eu/CommonForms/CreateAccount.aspx

That's not all however, you will also need this fix for showing null arrowheads on client side:
http://mindfusion.eu/Forum/YaBB.pl?num=1403529196/1#1

That should be fixed in latest 2.* versions of the control.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
AT
YaBB Newbies
*
Offline



Posts: 7
Joined: Dec 21st, 2012
Re: NullReferenceException when displaying diagram
Reply #2 - Aug 7th, 2014 at 8:26pm
Print Post  
Thanks. That worked.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint