Sign in to follow this  
jor1980

[SlimDX] datastream.writerange problem

Recommended Posts

Hi, i am trying to solce an error that i have when my code runs this line: datsre.writerange(vertices) the error says: Error al crear el formulario. Consulte Exception.InnerException para obtener más detalles. Error: Operación no válida dado el estado actual del objeto. Invalid operation because of the actual state of the object. If could be a clue i am also using physx.net in the project The code where i create the vertexbuffer and the datastream is this:
Private Sub FillResources()
        Dim debugrenderables As DebugRenderable = gscene.GetDebugRenderable
        Dim triangles As DebugTriangle() = debugrenderables.GetDebugTriangles
        Dim Points As DebugPoint() = debugrenderables.GetDebugPoints
        lines = debugrenderables.GetDebugLines

        vb = New VertexBuffer(device, lines.Length * 2 * 16, Usage.WriteOnly, VertexFormat.Position Or VertexFormat.Diffuse, Pool.Default)
        Dim datStre As SlimDX.DataStream = vb.Lock(0, 0, LockFlags.None)


        Dim verticesss As MyOwnVertexFormat() = New MyOwnVertexFormat((lines.Length * 2) - 1) {}

        For i = 0 To lines.Length - 1
            verticesss((i * 2)) = New MyOwnVertexFormat(lines(i).Point0, Color.Lime)

            verticesss((i * 2) + 1) = New MyOwnVertexFormat(lines(i).Point1, Color.Lime)

        Next


        datStre.WriteRange(verticesss)
        vb.Unlock()
    End Sub

and the debug log is this:
[2612] Direct3D9: :====> ENTER: DLLMAIN(5ab5a170): Process Attach: 00000a34, tid=000015e8
[2612] 
[2612] Direct3D9: :====> EXIT: DLLMAIN(5ab5a170): Process Attach: 00000a34
[2612] 
[2612] Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.
[2612] 
[2612] Direct3D9: (INFO) :======================= Hal SWVP device selected 
[2612] 
[2612] Direct3D9: (INFO) :HalDevice Driver Style b 
[2612] 
[2612] Direct3D9: :DoneExclusiveMode
[2612] 
[2612] Direct3D9: (INFO) :Using FF to PS converter 
[2612] 
[2612] Direct3D9: (WARN) :Athlon32Compiler: CPU does not meet minimum requirements 
[2612] 
[2612] Direct3D9: (INFO) :Using P4 PSGP 
[2612] 
[2612] Direct3D9: (INFO) :Using FF to VS converter in software vertex processing 
[2612] 
[2612] D3D9 Helper: Warning: Default value for D3DRS_POINTSIZE_MAX is 2.19902e+012f, not 6.14414e-316f.  This is ok. 
[2612] Direct3D9: :====> ENTER: DLLMAIN(5ab5a170): Process Detach 00000a34, tid=000015e8
[2612] 
[2612] Direct3D9: (INFO) :MemFini!
[2612] 
[2612] Direct3D9: (ERROR) :Memory still allocated!  Alloc count = 120
[2612] 
[2612] Direct3D9: (ERROR) :Current Process (pid) = 00000a34
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073e07e4 lAllocID=1 dwSize=00004bc4, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073e53cc lAllocID=2 dwSize=0000031c, ReturnAddr=5ab5c90a (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073e570c lAllocID=3 dwSize=00000c28, ReturnAddr=5ab629d1 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075b77bc lAllocID=5 dwSize=00017734, ReturnAddr=5ab6a268 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075cef14 lAllocID=6 dwSize=00001cb0, ReturnAddr=5ab5b244 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073e635c lAllocID=7 dwSize=000006e0, ReturnAddr=5ab5b2d1 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075d0bec lAllocID=8 dwSize=00000014, ReturnAddr=5ab5b32a (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075a0064 lAllocID=13 dwSize=00001a28, ReturnAddr=5ab4fd1b (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075a1ab4 lAllocID=14 dwSize=000006e0, ReturnAddr=5ab4fd61 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075d0c74 lAllocID=15 dwSize=00000014, ReturnAddr=5ab4fdb1 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075d0cac lAllocID=16 dwSize=00000044, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075d0d14 lAllocID=18 dwSize=00000050, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075a21bc lAllocID=20 dwSize=00000c28, ReturnAddr=5ab629d1 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073e6da4 lAllocID=21 dwSize=00000020, ReturnAddr=5ab6c32c (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075a2e0c lAllocID=22 dwSize=00001cb0, ReturnAddr=5ab5b244 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075a4ae4 lAllocID=23 dwSize=000006e0, ReturnAddr=5ab5b2d1 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073e6dec lAllocID=24 dwSize=00000014, ReturnAddr=5ab5b32a (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075a51ec lAllocID=26 dwSize=00003ea8, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075d0d8c lAllocID=27 dwSize=00000198, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075d0f4c lAllocID=28 dwSize=00000030, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075a90bc lAllocID=29 dwSize=00001020, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075aa104 lAllocID=30 dwSize=00000858, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073e6e24 lAllocID=31 dwSize=00000098, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073e6a64 lAllocID=32 dwSize=0000007c, ReturnAddr=5ab6d617 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075d0fa4 lAllocID=33 dwSize=00000024, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073e6b04 lAllocID=34 dwSize=00000098, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073e6bc4 lAllocID=35 dwSize=0000007c, ReturnAddr=5ab6d617 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073e6ee4 lAllocID=36 dwSize=00000044, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073e6c64 lAllocID=37 dwSize=00000024, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073e6cac lAllocID=38 dwSize=000000a8, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075aa984 lAllocID=39 dwSize=00000098, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075aaa44 lAllocID=40 dwSize=0000007c, ReturnAddr=5ab6d617 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075d0fec lAllocID=41 dwSize=0002b330, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075fc344 lAllocID=42 dwSize=0000002c, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075fc394 lAllocID=43 dwSize=00000028, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075fc3e4 lAllocID=44 dwSize=00000420, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075fc82c lAllocID=45 dwSize=00000030, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075fc884 lAllocID=46 dwSize=00000030, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075fc8dc lAllocID=47 dwSize=00020020, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075aaae4 lAllocID=48 dwSize=00008020, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075b2b2c lAllocID=49 dwSize=00002020, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0761c924 lAllocID=50 dwSize=00000e20, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0761d76c lAllocID=51 dwSize=00000120, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0761d8b4 lAllocID=52 dwSize=00000060, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0761d93c lAllocID=53 dwSize=000003ec, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0761dd4c lAllocID=54 dwSize=00000050, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0761ddc4 lAllocID=55 dwSize=00000050, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0761de3c lAllocID=56 dwSize=00000050, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0761deb4 lAllocID=57 dwSize=00000050, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0761df2c lAllocID=58 dwSize=00000048, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075b4b74 lAllocID=59 dwSize=00000054, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075b4bec lAllocID=60 dwSize=00000048, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075b4c5c lAllocID=63 dwSize=000000b8, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0761df9c lAllocID=64 dwSize=00010020, ReturnAddr=5ab59a1a (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762dfe4 lAllocID=65 dwSize=0000007c, ReturnAddr=5ab6d617 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762e084 lAllocID=66 dwSize=000000c0, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762e16c lAllocID=67 dwSize=0000007c, ReturnAddr=5ab6d617 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762e20c lAllocID=68 dwSize=000000c0, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762e2f4 lAllocID=69 dwSize=0000007c, ReturnAddr=5ab6d617 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762e394 lAllocID=70 dwSize=000000b0, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762e46c lAllocID=71 dwSize=0000007c, ReturnAddr=5ab6d617 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762e50c lAllocID=72 dwSize=00000050, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762e584 lAllocID=73 dwSize=0000002c, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762e5d4 lAllocID=74 dwSize=00000028, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762e624 lAllocID=75 dwSize=0000002c, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762e674 lAllocID=76 dwSize=00000140, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762e7dc lAllocID=77 dwSize=0000003c, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073e7004 lAllocID=78 dwSize=00004020, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762e83c lAllocID=79 dwSize=0000003c, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075b4d3c lAllocID=80 dwSize=0000183c, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762e89c lAllocID=81 dwSize=0000021c, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762eadc lAllocID=82 dwSize=00000224, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762ed24 lAllocID=83 dwSize=0000003c, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762ed84 lAllocID=84 dwSize=00000060, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762ee0c lAllocID=85 dwSize=0000009c, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762eecc lAllocID=86 dwSize=00000050, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762ef44 lAllocID=87 dwSize=00000038, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073eb04c lAllocID=88 dwSize=00000080, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762efa4 lAllocID=89 dwSize=0000002c, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073eb0f4 lAllocID=90 dwSize=00000040, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073eb15c lAllocID=91 dwSize=00000040, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073eb1c4 lAllocID=92 dwSize=00000040, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073eb22c lAllocID=93 dwSize=00000060, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073eb2b4 lAllocID=94 dwSize=00000030, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073eb30c lAllocID=95 dwSize=00000b38, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0762eff4 lAllocID=96 dwSize=00020020, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0764f03c lAllocID=97 dwSize=00008020, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073ebe6c lAllocID=98 dwSize=00002020, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 07657084 lAllocID=99 dwSize=00020020, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 076770cc lAllocID=100 dwSize=00008020, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073edeb4 lAllocID=101 dwSize=00002020, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075b659c lAllocID=102 dwSize=00000420, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073efefc lAllocID=112 dwSize=00000030, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073eff54 lAllocID=113 dwSize=00000030, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 073effac lAllocID=114 dwSize=0000002c, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075b69e4 lAllocID=115 dwSize=00000030, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0767f114 lAllocID=116 dwSize=0000517c, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 09eb0064 lAllocID=117 dwSize=00020020, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075b6a3c lAllocID=118 dwSize=0000003c, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 076842b4 lAllocID=119 dwSize=00004020, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 076882fc lAllocID=120 dwSize=0000003c, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 09ed00ac lAllocID=121 dwSize=0000183c, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 0768835c lAllocID=122 dwSize=0000fab8, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 09ed190c lAllocID=123 dwSize=00000068, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 07697e3c lAllocID=124 dwSize=0000101f, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 07698e84 lAllocID=125 dwSize=000000e4, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 07698f8c lAllocID=126 dwSize=00000038, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 09ed199c lAllocID=127 dwSize=00000048, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 09ed1a0c lAllocID=128 dwSize=00000070, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 09ed1aa4 lAllocID=129 dwSize=00000028, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 07698fec lAllocID=130 dwSize=000053c0, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 09ed1af4 lAllocID=131 dwSize=00000420, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075b6a9c lAllocID=132 dwSize=00000420, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075b6ee4 lAllocID=133 dwSize=000000b8, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075b6fc4 lAllocID=134 dwSize=000003e0, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 09ed1f3c lAllocID=135 dwSize=0000007c, ReturnAddr=5ab6d617 (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075b73cc lAllocID=136 dwSize=0000005c, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075b744c lAllocID=137 dwSize=00000044, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075b74b4 lAllocID=138 dwSize=00000024, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Memory Address: 075b74fc lAllocID=139 dwSize=00000112, ReturnAddr=5ab599aa (pid=00000a34)
[2612] 
[2612] Direct3D9: (ERROR) :Total Memory Unfreed From Current Process = 1238569 bytes
[2612] 
[2612] Direct3D9: :====> EXIT: DLLMAIN(5ab5a170): Process Detach 00000a34

Share this post


Link to post
Share on other sites

Hy Jor.

You fogot the type-declaration for the call of "writetrange".
Try this instead :

datsre.writerange( of MyOwnVertexFormat)(vertices)

Hope, this may help.

Share this post


Link to post
Share on other sites
The compiler should infer the right method from the type of the parameter, otherwise you might get a compilation error. I don't know if this applies to VB, too, but C# it works well.

I'm more concerned about the allocation of the temporary array. Aren't you actually off by one?
Dim verticesss As MyOwnVertexFormat() = New MyOwnVertexFormat((lines.Length * 2) - 1)

Why the -1 there ? Are you sure you get the exception at the datsre.writerange call and not "one line" earlier, i.e. at
verticesss((i * 2) + 1) =...

Though the exception is strange, because if that was really the problem, the error should rather be IndexOutOfRangeException.

Hope that helps

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this