Emulyator / open-webkit-sharp

Automatically exported from code.google.com/p/open-webkit-sharp
GNU Lesser General Public License v3.0
0 stars 0 forks source link

AccessViolationException when cancelling backwards navigation #172

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. wire up event handler to WebKitBrowser.Navigating
2. set e.Cancel = true when e.Url is the previous url visited
3. attempt to navigate backwards by using the backspace key or selecting 'Back' 
in the default context menu

What is the expected output? What do you see instead?
Expect the navigation to be cancelled and for the navigation attempt to be 
ignored by WebKitBrowser; throws AccessViolationException instead.

What version of the product are you using? On what operating system?
OpenWebKitSharp v3.0.0, Windows 7 Professional

Please provide any additional information below.
setting e.Cancel = true in the handler for WebKitBrowser.Navigating works 
correctly in every other scenario I've tested; it's only when navigating 
backwards (using the context menu or backspace) that the exception is thrown.

stack trace of the exception:

System.AccessViolationException was unhandled
  Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
  Source=System.Windows.Forms
  StackTrace:
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at InternetExplorerWrapper.Program.Main() in C:\Development\Bryce Apps\Bryce Wizard\Internet Explorer Wrapper\v1.2 add setting to use OpenWebKitSharp browser instead of IE browser\InternetExplorerWrapper\Program.cs:line 20
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

Original issue reported on code.google.com by jbir...@gmail.com on 8 Mar 2013 at 10:53