LoadSoap inconsistent
A teammate used my program to create an XML file which includes several serialized diagrams. He emailed the XML file to a couple of us, both with Windows 7, 64-bit laptops.
Both of my teammates can load and display the diagram in the file. And I have created and loaded other diagrams on my laptop with no problem. When I tried to load the problem diagram, the diagram LoadSoap method generated a memory exception:
System.AccessViolationException
{"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."}
I've attached the diagram XML string that generated the error message. I also created a similar diagram on my own laptop, and attached it for comparison. But I don't really know what to look for.
Suggestions? I need a way to verify/correct/prevent this file problem.
Code snippets for save and load are below (syncfusion version 9.3):
***Save Snippet***
Using strm As IO.MemoryStream = New IO.MemoryStream()
Try
Canvas.SaveSoap(strm)
strm.Position = 0
Dim reader As New IO.StreamReader(strm)
mapString = reader.ReadToEnd
Catch ex As Exception
msgbox(ex.Message)
End Try
RaiseEvent Canvas_Changed(DiagramUID, mapString)
End Using
***Load Snippet***
Protected Friend Function LoadDiagram(ByVal diagramXML As String) As Boolean
Dim result As Boolean = False
Try
Dim buf() As Byte = Encoding.UTF8.GetBytes(diagramXML)
Dim strm As IO.MemoryStream = New IO.MemoryStream(buf)
If strm.Length = 0 Then Exit Try
Dim ex1 As New Exception
Canvas.LoadSoap(strm, ex1)
If IsNothing(ex1) Then
result = True
Else
msgbox(ex1.Message)
End If
Catch ex As Exception
msgbox(ex.Message)
End Try
Return result
End Function
loadsoapfile_6e2a4ab7.zip
Both of my teammates can load and display the diagram in the file. And I have created and loaded other diagrams on my laptop with no problem. When I tried to load the problem diagram, the diagram LoadSoap method generated a memory exception:
System.AccessViolationException
{"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."}
I've attached the diagram XML string that generated the error message. I also created a similar diagram on my own laptop, and attached it for comparison. But I don't really know what to look for.
Suggestions? I need a way to verify/correct/prevent this file problem.
Code snippets for save and load are below (syncfusion version 9.3):
***Save Snippet***
Using strm As IO.MemoryStream = New IO.MemoryStream()
Try
Canvas.SaveSoap(strm)
strm.Position = 0
Dim reader As New IO.StreamReader(strm)
mapString = reader.ReadToEnd
Catch ex As Exception
msgbox(ex.Message)
End Try
RaiseEvent Canvas_Changed(DiagramUID, mapString)
End Using
***Load Snippet***
Protected Friend Function LoadDiagram(ByVal diagramXML As String) As Boolean
Dim result As Boolean = False
Try
Dim buf() As Byte = Encoding.UTF8.GetBytes(diagramXML)
Dim strm As IO.MemoryStream = New IO.MemoryStream(buf)
If strm.Length = 0 Then Exit Try
Dim ex1 As New Exception
Canvas.LoadSoap(strm, ex1)
If IsNothing(ex1) Then
result = True
Else
msgbox(ex1.Message)
End If
Catch ex As Exception
msgbox(ex.Message)
End Try
Return result
End Function
loadsoapfile_6e2a4ab7.zip
SIGN IN To post a reply.
3 Replies
AA
Amsath Ali M
Syncfusion Team
December 20, 2011 01:34 PM UTC
Hi Linda,
Thanks for your interest in Syncfusion products.
Since we are not able to load the files provided by you, could you please provide loadable diagram files (in XML format) which reproduce the reported issue, which will be more helpful for us to investigate further on this and to provide a better solution to you?
Please let us know if you have any queries.
Regards,
Amsath Ali. M
Thanks for your interest in Syncfusion products.
Since we are not able to load the files provided by you, could you please provide loadable diagram files (in XML format) which reproduce the reported issue, which will be more helpful for us to investigate further on this and to provide a better solution to you?
Please let us know if you have any queries.
Regards,
Amsath Ali. M
LC
Linda Clemens
December 20, 2011 09:58 PM UTC
AA
Amsath Ali M
Syncfusion Team
December 21, 2011 01:10 PM UTC
Hi Linda,
Thanks for the update.
Since we are facing the below issues while loading the provided .xml file, could you please confirm that whether you have done any customization in your application, if so share us the dependency dlls which you have used to create those files, which will be more helpful for us to reproduce the reported issue and to provide a better solution you?
Here is the error, we are facing while opening the xml files:
ErrGoodDiagram1960991120.zip
Please let us know if you have any queries.
Regards,
Amsath Ali. M
Thanks for the update.
Since we are facing the below issues while loading the provided .xml file, could you please confirm that whether you have done any customization in your application, if so share us the dependency dlls which you have used to create those files, which will be more helpful for us to reproduce the reported issue and to provide a better solution you?
Here is the error, we are facing while opening the xml files:
ErrGoodDiagram1960991120.zip
Please let us know if you have any queries.
Regards,
Amsath Ali. M
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
LC Linda Clemens
- Dec 13, 2011 08:52 PM UTC
- Dec 21, 2011 01:10 PM UTC