Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Memory Exception in Windows 2008 (64 bit)   (Read 6448 times)
manu
YaBB Newbies
*
Offline


Manu bhai moter chale
pum pum pum...

Posts: 25
Location: Japan
Joined: May 25th, 2008
Memory Exception in Windows 2008 (64 bit)  
Aug 30th, 2010 at 4:58am
Print Post  
Hi,
I am using NetDiagram 3.0.1 and getting following exception when generating flowchart in Windows 2008 (64-Bit) Environment, whereas same code is working perfectly fine in Windows 2003 (32 bit).


Exception of type 'System.Web.HttpUnhandledException' was thrown.
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.


**Does NetDiagram has any issue with 64 bit environment or do you have a different 64-bit version of netdiagram?


Regards
Manu

  

Regards&&Manoj
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Memory Exception in Windows 2008 (64 bit)  
Reply #1 - Aug 30th, 2010 at 11:18am
Print Post  
Hi,

What Diagram or DiagramView methods are shown in the call stack? We build the project using the AnyCPU option, and it should run on both 32-bit and 64-bit versions of the framework. We haven't tried it on a 2008 server though, we'll check it later this week.

Regards,
Stoyan
  
Back to top
 
IP Logged
 
manu
YaBB Newbies
*
Offline


Manu bhai moter chale
pum pum pum...

Posts: 25
Location: Japan
Joined: May 25th, 2008
Re: Memory Exception in Windows 2008 (64 bit)  
Reply #2 - Aug 31st, 2010 at 1:10am
Print Post  

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:


[AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.]
   MindFusion.Diagramming.ShapeNode.SaveToXml(XmlElement xmlElement, XmlPersistContext context) +0
   MindFusion.Diagramming.XmlPersistContext.xcfee0917c3bf82cc(DiagramItem xccb63ca5f63dc470, XmlElement x1ea18269223b2a9c, String x121383aa64985888) +362
   MindFusion.Diagramming.Diagram.SaveToXml(XmlDocument document, Boolean includeUnalteredProperties) +869
   MindFusion.Diagramming.WebForms.DiagramView.SaveToXml(XmlDocument document, Boolean includeUnalteredProperties) +36
   MindFusion.Diagramming.WebForms.DiagramView.xa45b9f6fb2389318(SaveToStringFormat
x5786461d089b10a0, Boolean x359efee92cf48af2, Boolean x4acbb041c2d5f0a1) +414
   MindFusion.Diagramming.WebForms.DiagramView.SaveControlState() +57
   System.Web.UI.Page.SaveAllState() +275
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3864




--------------------------------------------------------------------------------

Version Information: Microsoft .NET Framework Version:2.0.50727.4206; ASP.NET Version:2.0.50727.4205
  

Regards&&Manoj
Back to top
 
IP Logged
 
manu
YaBB Newbies
*
Offline


Manu bhai moter chale
pum pum pum...

Posts: 25
Location: Japan
Joined: May 25th, 2008
Re: Memory Exception in Windows 2008 (64 bit)  
Reply #3 - Aug 31st, 2010 at 1:14am
Print Post  
Following is the sample code i am using to generate the diagram
#################################################

Public Class Type
       Public Const CHECKLIST As String = "CHECKLIST"
       Public Const PROCESS As String = "PROCESS"
       Public Const START As String = "START"
       Public Const [END] As String = "END"
       Public Const [STEP] As String = "STEP"
    End Class


    Private Function GetBrush(ByVal sShapeType As String) As MindFusion.Drawing.Brush
       Dim myBrush As MindFusion.Drawing.Brush
       Select Case sShapeType
           Case Type.CHECKLIST
               myBrush = New MindFusion.Drawing.SolidBrush(Color.FromArgb(255, 170, 42))
           Case Type.PROCESS
               myBrush = New MindFusion.Drawing.SolidBrush(Color.FromArgb(102, 204, 255))
           Case Type.START, Type.END
               myBrush = New MindFusion.Drawing.SolidBrush(Color.FromArgb(158, 183, 211))
           Case Type.STEP
               myBrush = New MindFusion.Drawing.SolidBrush(Color.FromArgb(178, 195, 70))
           Case Else
               myBrush = New MindFusion.Drawing.SolidBrush(Color.Red)
       End Select
       Return myBrush
    End Function

    Private Function GetDiagramLink(ByVal DG As Diagram, ByVal parentNode As DiagramNode, ByVal childNode As DiagramNode) As DiagramLink
       Dim myLink As New DiagramLink(DG, parentNode, childNode)

       myLink.HeadShape = ArrowHead.BowArrow
       myLink.Pen = New MindFusion.Drawing.Pen(Color.SteelBlue, 0.2)
       myLink.Brush = New MindFusion.Drawing.SolidBrush(Color.SteelBlue)
       myLink.Dynamic = True
       myLink.ShadowOffsetX = 0
       myLink.ShadowOffsetY = 0
       myLink.Locked = False

       Return myLink
    End Function


    Public Sub DrawFlowChart()

       dgv.ImageFormat = "image/jpeg"
       dgv.ImageQuality = 75
       dgv.MaxImageSize = New Size(1000, 1000)
       dgv.Behavior = Diagramming.Behavior.DoNothing
       dgv.BorderWidth = 0.2
       dgv.BorderStyle = BorderStyle.Solid
       dgv.BorderColor = Color.Gray

       Dim DG As Diagram = dgv.Diagram
       If DG Is Nothing Then Exit Sub

       DG.ClearAll()
       DG.BackBrush = New MindFusion.Drawing.SolidBrush(Color.White)
       DG.SelectAfterCreate = False
       DG.LinkHeadShape = ArrowHead.BowArrow
       DG.LinkHeadShapeSize = 2

       Dim dt As DataTable = GetData()

       If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
           dgv.Diagram.DefaultShape = Shapes.Rectangle
           Dim factory As Factory = dgv.Diagram.Factory

           Dim PRVNODE As ShapeNode = Nothing
           For Each dr As DataRow In dt.Rows
               Dim newNode As ShapeNode = factory.CreateShapeNode(0, 0, 50, 25)
               newNode.EnableStyledText = True
               newNode.Brush = GetBrush(dr("TYPE"))
               newNode.ShadowOffsetX = 1
               newNode.ShadowOffsetY = 1
               newNode.ZTop()
               newNode.Obstacle = True

               Select Case dr("type").ToString
                   Case Type.START
                       newNode.Shape = Shapes.Start
                       newNode.Text = "START"
                       newNode.Resize(40, 20)
                   Case Type.END
                       newNode.Shape = Shapes.Terminator
                       newNode.Text = "END"
                       newNode.Resize(40, 20)
                   Case Type.PROCESS
                       newNode.Shape = Shapes.Procedure
                       newNode.Text = "Process"
                   Case Type.STEP
                       newNode.Shape = Shapes.RoundRect
                       newNode.Text = "Step"
                   Case Type.CHECKLIST
                       newNode.Shape = Shapes.BpmnIntermediateRule
                       newNode.Text = "Checklist"
               End Select
               DG.Nodes.Add(newNode)

               If PRVNODE IsNot Nothing Then
                   Dim nodeLink As DiagramLink = GetDiagramLink(DG, PRVNODE, newNode)
                   DG.Links.Add(nodeLink)
               End If
               PRVNODE = newNode
           Next

           Dim flowChart As New MindFusion.Diagramming.Layout.FlowchartLayout
           flowChart.Arrange(DG)
           DG.ResizeToFitItems(10)
       End If
    End Sub

    Protected Sub btnGenerate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnGenerate.Click
       DrawFlowChart()
    End Sub
  

Regards&&Manoj
Back to top
 
IP Logged
 
manu
YaBB Newbies
*
Offline


Manu bhai moter chale
pum pum pum...

Posts: 25
Location: Japan
Joined: May 25th, 2008
Re: Memory Exception in Windows 2008 (64 bit)  
Reply #4 - Sep 3rd, 2010 at 8:09am
Print Post  
Hi,
I am still waiting for the solution.........
Cry Cry
  

Regards&&Manoj
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Memory Exception in Windows 2008 (64 bit)  
Reply #5 - Sep 3rd, 2010 at 8:23am
Print Post  
Sorry, we are waiting for the delivery of our new test system to install Win2k8. We could try it on VPC, but working with VS and debugging under virtualization is awfully slow.
  
Back to top
 
IP Logged
 
manu
YaBB Newbies
*
Offline


Manu bhai moter chale
pum pum pum...

Posts: 25
Location: Japan
Joined: May 25th, 2008
Re: Memory Exception in Windows 2008 (64 bit)  
Reply #6 - Sep 8th, 2010 at 4:40am
Print Post  
still waiting... Cry Cry Cry

Could you please let me know how much more time it may take to test this issue...
  

Regards&&Manoj
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Memory Exception in Windows 2008 (64 bit)  
Reply #7 - Sep 8th, 2010 at 7:05am
Print Post  
We'll be setting up the system today. What ASP.NET runtime version are you using?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Memory Exception in Windows 2008 (64 bit)  
Reply #8 - Sep 8th, 2010 at 8:05am
Print Post  
In addition, are you getting this problem on Windows Server 2008 or Windows Server 2008 R2?
  
Back to top
 
IP Logged
 
manu
YaBB Newbies
*
Offline


Manu bhai moter chale
pum pum pum...

Posts: 25
Location: Japan
Joined: May 25th, 2008
Re: Memory Exception in Windows 2008 (64 bit)  
Reply #9 - Sep 9th, 2010 at 5:36am
Print Post  
We are using:

Web Server Machine:
ASP.NET 3.5
Windows Server 2008 (64-bit)

Development Machine:
Windows XP SP3


Regards
Manoj
  

Regards&&Manoj
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Memory Exception in Windows 2008 (64 bit)  
Reply #10 - Sep 9th, 2010 at 1:38pm
Print Post  
The exception happens with version 3.0.1 indeed, but not with the latest 3.1.1, so I suppose it's time for you to upgrade.

Regards,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint