|
-
Mar 2nd, 2011, 05:36 AM
#1
Thread Starter
Fanatic Member
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. 
-
Mar 2nd, 2011, 07:59 AM
#2
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
-
Mar 2nd, 2011, 08:03 AM
#3
Thread Starter
Fanatic Member
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. 
-
Apr 1st, 2011, 07:36 AM
#4
Thread Starter
Fanatic Member
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. 
-
Apr 1st, 2011, 08:59 AM
#5
Junior Member
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
-
Apr 1st, 2011, 09:01 AM
#6
Thread Starter
Fanatic Member
Re: Random AccessViolationException's since upgrading
 Originally Posted by 5u1c1d3
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. 
-
Apr 2nd, 2011, 08:06 AM
#7
Re: Random AccessViolationException's since upgrading
Do you use calls to CallWindowProc?
-
Apr 4th, 2011, 02:45 AM
#8
Thread Starter
Fanatic Member
Re: Random AccessViolationException's since upgrading
 Originally Posted by dbasnett
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. 
-
May 19th, 2011, 04:32 AM
#9
New Member
Re: Random AccessViolationException's since upgrading
Any update on this?
We are getting the same problems (though on C#)
-
May 19th, 2011, 04:34 AM
#10
Thread Starter
Fanatic Member
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. 
-
Jun 23rd, 2011, 07:00 AM
#11
New Member
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
-
Jun 27th, 2011, 02:32 AM
#12
Thread Starter
Fanatic Member
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. 
-
Jun 27th, 2011, 10:35 AM
#13
Re: Random AccessViolationException's since upgrading
Try attaching the debugger to your application and mess around with it until the AccessViolationException occurs.
-
Mar 14th, 2015, 06:51 AM
#14
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|