Results 1 to 16 of 16

Thread: [RESOLVED] [2008] Read Write error on Vista.

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    142

    Resolved [RESOLVED] [2008] Read Write error on Vista.

    Hi guys,

    I am running my application which in run on 64-bit vista machine. when the program is running somewhere near halfway, it throws an error:
    Attempted to read write protected memory.This is often an indication that other memory is corrupt.

    Can anybody suggest what could be the problem?

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [2008] Read Write error on Vista.

    Its a generic error which could mean that or a bad HD or bad code. Without seeing anything it would be hard to do anything more then a wild guess. Can you post your related code?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    142

    Re: [2008] Read Write error on Vista.

    actually its a GIS CODE with front end in .NET. the code works for small data but doesnt work for larger data.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2008] Read Write error on Vista.

    Quote Originally Posted by david_reinjal
    actually its a GIS CODE with front end in .NET. the code works for small data but doesnt work for larger data.
    That narrows it down to just about everything. You'll need to debug your code and determine where the exception is being thrown. One option is to handle the UnhandledException event of your app, which really should be being done in every VB app. It will provide you with the exception's call stack so you can see exactly where the issue occurred. You can then add code to that section and get even more information.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [2008] Read Write error on Vista.

    The spatial data can be quite large. You really need to add better error handling to identify the precise location of the offending code.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    142

    Re: [2008] Read Write error on Vista.

    ok guys. thanks a lot for the response. i will try doing that.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    142

    Re: [RESOLVED] [2008] Read Write error on Vista.

    this is the error i am getting:

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    at Test.XTNAPI.XtnGeom_Intersection(Int32 XGOGEOMETRY1, Int32 XGOGEOMETRY2)
    at Test.GridOfInterest.grid_processing(Int64 x1, Int64 y1, Int64 x2, Int64 y2) in C:\Users\Rohit\Desktop\Grid Formation Matrix_Finish\Test\Form1.vb:line 318
    at Test.GridOfInterest.btnProcess_Click(Object sender, EventArgs e) in C:\Users\Rohit\Desktop\Grid Formation Matrix_Finish\Test\Form1.vb:line 161
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    Test
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Documents%20and%20Settings/Narasimha/Desktop/Debug/Test.exe
    ----------------------------------------
    Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    ----------------------------------------
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------
    System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    AxInterop.OCXMAPLib
    Assembly Version: 1.22.0.0
    Win32 Version: 1.22.0.0
    CodeBase: file:///C:/Documents%20and%20Settings/Narasimha/Desktop/Debug/AxInterop.OCXMAPLib.DLL
    ----------------------------------------
    CircleOf
    Assembly Version: 1.0.3091.22268
    Win32 Version: 1.0.3091.22268
    CodeBase: file:///C:/Documents%20and%20Settings/Narasimha/Desktop/Debug/CircleOf.DLL
    ----------------------------------------
    Interop.OCXMAPLib
    Assembly Version: 1.22.0.0
    Win32 Version: 1.22.0.0
    CodeBase: file:///C:/Documents%20and%20Settings/Narasimha/Desktop/Debug/Interop.OCXMAPLib.DLL
    ----------------------------------------
    Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
    ----------------------------------------
    AddonWrap
    Assembly Version: 1.0.2462.17495
    Win32 Version: 1.1.0.0
    CodeBase: file:///C:/PROGRA~1/GEOCON~1/GEOCON~1/Widget_Locator.xgo
    ----------------------------------------
    System.Transactions
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
    ----------------------------------------
    System.EnterpriseServices
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
    <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    142

    Re: [RESOLVED] [2008] Read Write error on Vista.

    i tried my code on XP, then i got the above error.

  9. #9
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [RESOLVED] [2008] Read Write error on Vista.

    Form1 line 318 and btnProcess_Click. Can you post those code procedures?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  10. #10
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [RESOLVED] [2008] Read Write error on Vista.

    The call stack tells you where the error is occurring:
    at Test.XTNAPI.XtnGeom_Intersection(Int32 XGOGEOMETRY1, Int32 XGOGEOMETRY2)
    which is called from the line Rob mentioned. Have you investigated that code? This information is provided to you for a reason. Could it have anything to do with the fact that you have Int64 parameters in one method and then Int32 in the next?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    142

    Re: [RESOLVED] [2008] Read Write error on Vista.

    its a GIS code? shoudl i post that? or should i explain what it does?

  12. #12

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    142

    Re: [RESOLVED] [2008] Read Write error on Vista.

    Code:
    dim geom_intsct as long
    For i = 0 To geomlist.Count - 1
          geom_intsct = XtnGeom_Intersection(geomlist(i), geom_grid)
          geominstlist.Add(geom_intsct)
    Next

  13. #13

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    142

    Re: [RESOLVED] [2008] Read Write error on Vista.

    both geomlist(i) and geom_grid are declared as long. I will try to declare it as integer and run.

  14. #14
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [RESOLVED] [2008] Read Write error on Vista.

    What does the function " XtnGeom_Intersection" take as its arguments data types? If you reduce it to a Integer from the Long it may create other issues

    Place a breakpoint on

    For i = 0 To geomlist.Count - 1

    and step through the loop checking the values to see if they are correct and as expected. Step until you get the error. It may be related to some data value
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  15. #15
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [RESOLVED] [2008] Read Write error on Vista.

    Quote Originally Posted by david_reinjal
    both geomlist(i) and geom_grid are declared as long. I will try to declare it as integer and run.
    That's probably the issue. The call stack says that the method parameters are type Int32 and you're saying that you are passing Int64 values. That could be a problem. Do you have Option Strict turned On? If not that's the very first thing you should be fixing. If you did then the compiler wouldn't even let you pass Int64 value's where an Int32 is expected. It's better to catch these issues at design time than run time, yes?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  16. #16

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    142

    Re: [RESOLVED] [2008] Read Write error on Vista.

    thnxs jm..its working fine now. i changed api variables all to long. thnx u all for replying.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width