Results 1 to 14 of 14

Thread: Random AccessViolationException's since upgrading

  1. #1

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Random AccessViolationException's since upgrading

    We recently upgraded VS 2005 to VS2010 and converted an application seemingly without any problems. But when deployed to the customer they are getting intermittent errors at seemingly random places in the program which force the application to close and AccessViolationExceptions being logged to the Application Event Log.

    The customer's site is a multi user environment with the application hosted on a server and users running the app via RDP.

    We get two errors in the event log:

    Code:
    Application: ContainerDepotSystem.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.AccessViolationException
    Stack:
       at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr)
       at System.Windows.Forms.NativeWindow.DefWndProc(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.ToolTip.WndProc(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
       at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
       at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int
    
    Faulting application name: ContainerDepotSystem.exe, version: 4.0.1.0, time stamp: 0x4d5e6085
    Faulting module name: comctl32.dll, version: 5.82.7600.16661, time stamp: 0x4c6f6f53
    Exception code: 0xc0000005
    Fault offset: 0x0000000000040377
    Faulting process id: 0x2920
    Faulting application start time: 0x01cbd7f51c53e0d3
    Faulting application path: C:\Program Files (x86)\Fargo Systems\Container Yard Manager\ContainerDepotSystem.exe
    Faulting module path: C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7600.16661_none_a44e1fc257f685f6\comctl32.dll
    Report Id: d358ca65-43f3-11e0-ac89-0022642b68da
    Like I said, everything used to work fine in framework 2.0. Looks like a problem with 4.0.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  2. #2
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Random AccessViolationException's since upgrading

    Have you tried handling the Unhandled exception to help track down the problem?

    Code:
            Private Sub MyApplication_UnhandledException(ByVal sender As Object, _
                                                         ByVal e As Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs) _
                                                     Handles Me.UnhandledException
    
            End Sub
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  3. #3

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Re: Random AccessViolationException's since upgrading

    No, I haven't...but I will try that, thank you. I'm not sure that it will work though because the user is just getting a windows message that the application has "stopped working" and it just closes. Not the usual kind of unhandled exception message you get. Looks like it's a deep down error occuring inside the framework but I'll try what you suggest and see what it turns up.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  4. #4

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Re: Random AccessViolationException's since upgrading

    This error is still occurring, desipte having global exception handling. It just crashes out and writes the above errors to the event log.

    Now we've upgraded another of our projects to .NET 4 and we're getting the same intermittent error. I just can't seem to find anything on this anywhere and I can't believe we're the only ones with the problem...
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  5. #5
    Junior Member
    Join Date
    Mar 2011
    Posts
    21

    Re: Random AccessViolationException's since upgrading

    I have the same error with my current application..
    Although not everywhere.
    My home computer , laptop and my best friends laptop can run it.
    However at school I keep getting that error.
    You should try to reinstall VB and .net framework

  6. #6

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Re: Random AccessViolationException's since upgrading

    Quote Originally Posted by 5u1c1d3 View Post
    I have the same error with my current application..
    Although not everywhere.
    My home computer , laptop and my best friends laptop can run it.
    However at school I keep getting that error.
    You should try to reinstall VB and .net framework
    We're getting this error on a variety of different machines with different operating systems.

    One way to generate this error fairly regularly is just to alt-tab to and from the application. Pretty soon I get another AccessViolation error.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  7. #7
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Random AccessViolationException's since upgrading

    Do you use calls to CallWindowProc?
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  8. #8

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Re: Random AccessViolationException's since upgrading

    Quote Originally Posted by dbasnett View Post
    Do you use calls to CallWindowProc?
    No. No unmanaged code that I am aware of.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  9. #9
    New Member
    Join Date
    May 2011
    Posts
    1

    Re: Random AccessViolationException's since upgrading

    Any update on this?
    We are getting the same problems (though on C#)

  10. #10

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Re: Random AccessViolationException's since upgrading

    No update from me. I've simply had to target framework 2.0 for now until I can find a solution.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  11. #11
    New Member
    Join Date
    Jun 2011
    Posts
    1

    Re: Random AccessViolationException's since upgrading

    Hi Simon
    I was wondering are you using a datagridview in your application ? How about xp visual styles?

    Regards
    Paul

  12. #12

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Re: Random AccessViolationException's since upgrading

    I am using a DataGridView but not using XP visual styles.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  13. #13

    Re: Random AccessViolationException's since upgrading

    Try attaching the debugger to your application and mess around with it until the AccessViolationException occurs.

  14. #14
    New Member
    Join Date
    Mar 2015
    Posts
    1

    Re: Random AccessViolationException's since upgrading

    I have ran into this same error, With .Net versions above 3.5.

    My symptoms were that I'd spawned a new process from a tooltip command, and often, but not always the tooltip message handler would throw the error shown above.

    Moving the tooltip command to a button stopped the error from occuring. This I deduce that there is a bug in the ToolTip WndProc procedure that causes this. For users seeing this issue, my recommendation is trying to move your command out of a tooltip and see if this fixes the problem. Only a workaround I know.

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