Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Exception in LoadFromStream - shouldn't get here (Read 1968 times)
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 125
Location: England
Joined: Oct 23rd, 2006
Exception in LoadFromStream - shouldn't get here
Feb 17th, 2016 at 4:51pm
Print Post  
I'm getting an exception in LoadFromStream. An extract from my log file is as follows:

Message : shouldn't get here
Source : MindFusion.Diagramming
Extra Information :
Stack Trace :
at MindFusion.Diagramming.Diagram.ccc999bde743d844a328c0d563096a0a5(Int32 c9032810cedddb2d062072f957c344013)
at MindFusion.Diagramming.PersistContext.cd997653317d7027e1c915f4668a895f2(Int32 c9032810cedddb2d062072f957c344013)
at MindFusion.Diagramming.PersistContext.LoadObject()
at MindFusion.Diagramming.Diagram.LoadFromStream(Stream stream)
at HierarchicalTaskAnalysis.HTAForm.ReadFromHtanFile(String pathname)

Possibly the file has just got corrupted (as they do sometimes), but I thought that I would post the issue as they may be a problem with your code. I'm using version 6.3.3

Regards
DavidL
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3148
Joined: Oct 19th, 2005
Re: Exception in LoadFromStream - shouldn't get here
Reply #1 - Feb 17th, 2016 at 5:06pm
Print Post  
Hello David,

It gets there if an integer identifier of diagram element class is not recognized. We haven't been using these identifiers for new classes since a long time but use the RegisterItemClass method instead for newly added types, and the load code would throw FileLoadException if the class id is not recognized. So this does not sound as a version compatibility problem, but either the file stream current position is wrong or the file is corrupted.

We are not aware of anyone getting corrupted files in normal circumstances, maybe check if the file wasn't saved on a full disk, or over slow/unreliable network - that might have cut off the file or thrown some exception.

For the other possibility - wrong stream position - if you use any custom node types, or handling serialization of DiagramItem.Tag or ControlNode.Control instances, ensure your code always reads as many bytes from the stream as it writes. If you believe the problem is in our serialization code, please attach the file for us to inspect.

Regards,
Slavcho
Mindfusion
« Last Edit: Feb 18th, 2016 at 5:34am by Slavcho »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint