Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic unable to load the file (Read 3282 times)
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
unable to load the file
Jun 8th, 2012 at 9:22am
Print Post  
Hi,

when i am trying to load the file in diagram using diagram.LoadFromFile(loadfilename);
it is throwing the error message as "unable to read beyond the end of the stream"

kindly help
  

if you want something then go and grab it
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: unable to load the file
Reply #1 - Jun 8th, 2012 at 9:49am
Print Post  
Was this file created using SaveToFile?
  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: unable to load the file
Reply #2 - Jun 8th, 2012 at 11:22am
Print Post  
yes
  

if you want something then go and grab it
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: unable to load the file
Reply #3 - Jun 8th, 2012 at 12:40pm
Print Post  
Please attach it here.
  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: unable to load the file
Reply #4 - Jun 14th, 2012 at 10:42am
Print Post  
Dear stoyo,

i have attached the file..kindly check
  

01_pnr.rar (Attachment deleted)

if you want something then go and grab it
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: unable to load the file
Reply #5 - Jun 14th, 2012 at 12:37pm
Print Post  
This file was truncated somehow. The header shows there were 120 items in this diagram, but the loading code reaches the end of the file while reading the 58th item (a table). All data loaded before that seems correct, so if it's something important, we can extract the first 57 items for you. Most of them seem to be links though.

It's not likely SaveToFile to return successfully if it stopped writing at the middle of an item. It should have thrown an exception of some kind, say IOException("disk full"). You might check if you are not catching and ignoring exceptions, you should report them to users instead.

If SaveToFile completed successfully, the problem could have happened because of a system crash or power outage before the HDD cache was written, or say if the file was sent as email attachment and there was a transmission error.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: unable to load the file
Reply #6 - Jun 15th, 2012 at 5:04am
Print Post  
thanks stoyo.


  

if you want something then go and grab it
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint