1

I just got some feedback of some users of our application, they have got issues on windows XP with our application. This application works fine on Windows 7, but not on Windows XP.

One other strange thing: If I build this on a Windows XP workstation(with VS2010), it works on my local workstations, and if I put this build on another XP workstation, it doesn't work anymore.

When running on XP, I just got an error telling me that XXXXX has encountered a problem and needs to close. We are sorry for the inconvenience.

I found in the EventViewer Application's log this stacktrace:

Application: MyApplication.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+IOleObject.DoVerb(Int32, IntPtr, IOleClientSite, Int32, IntPtr, COMRECT)
   at System.Windows.Forms.WebBrowserBase.DoVerb(Int32)
   at System.Windows.Forms.WebBrowserBase.TransitionFromRunningToInPlaceActive()
   at System.Windows.Forms.WebBrowserBase.TransitionUpTo(AXState)
   at System.Windows.Forms.WebBrowserBase.OnParentChanged(System.EventArgs)
   at System.Windows.Forms.Control.AssignParent(System.Windows.Forms.Control)
   at System.Windows.Forms.Control+ControlCollection.Add(System.Windows.Forms.Control)
   at My.NameSpace.Here.Controls.LearningCenterControl.InitializeComponent()
   at My.NameSpace.Here.Controls.LearningCenterControl..ctor()
   at My.NameSpace.Here.MainForm.InitializeComponent()
   at My.NameSpace.Here.MainForm..ctor()
   at My.NameSpace.Here.MainForm.get_Instance()
   at My.NameSpace.Here.Program.Main(System.String[])


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

This happens on the InitializeComponent of the designer of one of my userControl:

this.m_learingResourceBrowser = new System.Windows.Forms.WebBrowser();

I guess there a Security issue with XP, but what?

I found this:

REM Mark project as DEP Noncompliant
call "$(DevEnvDir)..\..\VC\bin\vcvars32.bat"
call "$(DevEnvDir)..\..\VC\bin\editbin.exe" /NXCOMPAT:NO "$(TargetPath)"

I've put this Post-build event on the exe project, but I didn't saw any improvement

I've also tried to run directly the command with my exe:

editbin.exe /NXCOMPAT:NO YourProgram.exe

Any idea about what could cause this issue?

EDIT I found this answer which states:

To test if its a DEP issue do this.

Right click on "My Computer" Select "Properties" and "Advanced" Under "Startup and Recovery, click Settings Now click on "Edit" The notepad has just begun. Simply replace the line: Code: noexecute optionn by AlwaysOff Restart your PC to complete the transaction.

And I after this I don't have this error anymore. So my question is: currently I've done the previous operation only on the main exe. Should I do this operation on all dll? Because my project is composed of more than 230 projects, so it would be hard to test everything.

Community
  • 1
  • 1
J4N
  • 19,480
  • 39
  • 187
  • 340

0 Answers0