Error using WebBrowser control inside PowerBuilder app when select an item in <select> tag

2

I'm using WebBrowser control in a window inside a PowerBuilder 11.5 application. Everything works fine on IE7 and IE8 but the application crashes in IE9 under Windows 7 when you select an item in a tag.

In IE7 and IE8 I added my application to registry key FEATURE_USE_WINDOWEDSELECTCONTROL. In IE9 under Windows 7 64bits did the same and if the REG_DWORD value that corresponds to my application is 1, the application crashes. If the value is 0, the application does not crashes but item selection with mouse is impossible.

Analyzing errors and dump file, error occurs in the mshtml.dll file with an exception code 0xc0000005, including:

mshtml!CDOMMouseEvent::PrepareEvent

Any ideas?.

Update: My app is a 32bit app developed in Windows XP SP3.

Update 2: Exception code is 0xC0000005 (I think it's a memory access violation.

Update 3: Seeking the reason for the error, I've developed an ActiveX control in C# based on the .NET WebBrowser control and I've replaced the Microsoft Web Browser of my PB app with the new one. It also crashes and only in PB, because in a WinForm application (with the same WebBrowser) everything works fine.

Using windbg to analyze dump file:

FAULTING_IP: 
mshtml!CDOMMouseEvent::PrepareEvent+39
62b40195 8b39            mov     edi,dword ptr [ecx]

EXCEPTION_RECORD:  00185f70 -- (.exr 0x185f70)
ExceptionAddress: 62b40195 (mshtml!CDOMMouseEvent::PrepareEvent+0x00000039)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000000
   Parameter[1]: 00000000
Attempt to read from address 00000000

PROCESS_NAME:  PB115.EXE    
ERROR_CODE: (NTSTATUS) 0xc0000005 - La instrucci n en "0x%08lx" hace referencia a la memoria en "0x%08lx". La memoria no se puede "%s".    
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - La instrucci n en "0x%08lx" hace referencia a la memoria en "0x%08lx". La memoria no se puede "%s".

EXCEPTION_CODE_STR:  c0000005
EXCEPTION_PARAMETER1:  00000000
EXCEPTION_PARAMETER2:  00000000
READ_ADDRESS:  00000000 

FOLLOWUP_IP: 
mshtml!CDOMMouseEvent::PrepareEvent+39
62b40195 8b39            mov     edi,dword ptr [ecx]

WATSON_BKT_PROCVER:  11.5.0.2506
WATSON_BKT_PROCSTAMP:  489933bc
WATSON_BKT_MODULE:  mshtml.dll
WATSON_BKT_MODVER:  9.0.8112.16446
WATSON_BKT_MODSTAMP:  4fb58407
WATSON_BKT_MODOFFSET:  230195
BUILD_VERSION_STRING:  6.1.7601.17514 (win7sp1_rtm.101119-1850)

There may be some incompatibility between PB11.5 and Windows 7 64 bit + IE9?.

Thanks in advance.

internet-explorer-9
activex
webbrowser-control
powerbuilder
html-select
asked on Stack Overflow Jun 27, 2012 by Merrin • edited Jun 28, 2012 by Merrin

2 Answers

0

Setting this registry value appears to be a workaround for a bug in Internet Explorer 7 (MS KB Article, eHow Description). My guess is that since the root cause lies in the Microsoft codebase, your only option is to work around it by toggling that registry value according to which version of IE is installed. You can use this CodeProject article to help you determine that. If IE7 or IE8 is installed, set the value to 1, otherwise, set it to 0.

GL!

answered on Stack Overflow Jun 27, 2012 by Jason 'Bug' Fenter
0

Is it crashing when you're running the compiled .exe or when you're running from the PB IDE?

We are doing a similar thing and it is working for us.

We're having a different issue with the dropdowns and the FEATURE_USE_WINDOWEDSELECTCONTROL. When we set that DWORD value = 1, the dropdowns are selectable, but in some of our HTML screens, we use DIV panels and set z-indexes to overlay content/popups. The dropdowns "bleed through" and show above the panels. Trying to find a solution...

answered on Stack Overflow Jun 27, 2012 by Chris

User contributions licensed under CC BY-SA 3.0