Infinity loop when loading the addon on IE8 with LoadOnMainProcess = true

Add-in Express™ Support Service
That's what is more important than anything else

Infinity loop when loading the addon on IE8 with LoadOnMainProcess = true
 
Omri Suissa


Guest


Hi,
On specific scenario (open ie by software) on specific computer (terminal server) we encounter an infinity loop in your code when loading our addon in ADXIEModule.cs line 3327:

while (!this.loaderInjected)
{
   if (!InjectLoader())
   {
       Thread.Sl eep(2000);
   }
}


The InjectLoader return false and the loading never end. From time to time it returns true after several tries (the user needs to wait a lot of time before he can use the IE).

We go deeper to the InjectLoader function and we found that in line 5419:

if (Convert.ToInt32(this.loaderDisp.GetType().InvokeMember(
   "InstallHooks", BindingFlags.InvokeMethod, null, this.loaderDisp, null)) == Win32.S_OK)


This If fails because the InstallHooks returns 258 (instead of 0).
The 258 value (0x102) represent WAIT_TIMEOUT (http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx)

If you know how you can solve this issue directly this will be great, otherwise you may not stop the IE from loading and retry it later (load the addon in delay but don't stop the user from working with the IE :)).

Thanks,
Omri
Posted 06 Jun, 2012 09:46:11 Top
Eugene Astafiev


Guest


Hi Omri,

I have just tried to reproduce the issue on my computer with Internet Explorer 9. Unfortunately I couldn't get any delay loading IE programmatically from a windows application. What code do you use for running Internet Explorer by software? Why did you set the LoadInMainProcess property to true?

BTW What IE version do you have installed on problematic PC? Could you please take a screenshot of the About dialog window?
Posted 07 Jun, 2012 04:49:24 Top
Omri Suissa


Guest


Hi Eugene,

The IE version is 8 (8.0.7601.17514).

We are using the LoadOnMainProcess = true to get the on tab activated event on IE 8.

The software opens the IE using shell execute, when i tried to reproduce it using winforms application everything is working, but using the customer ERP software (some legacy foxpro application) it stuck.

In a test we just did when we are using the loader from IE package of adx (adx for ie 7.2.4104) it stuck but when we replace it with the loader from the office package (adx for office 6.6.3059) everything is working. as far as i know both loaders are the same, right?

The machine is the same machine that we encounter the performance problems (the .net 2 certificate issue).

In any case its not a good idea to do a while that can take for ever in the loading process, it better to do it asynchronously (to let the use interact with the IE).

Omri
Posted 07 Jun, 2012 05:16:14 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Omri,

There is not any reliable way to inject the loader after IE starts. That is why I use 'while'.
Now I am trying to reproduce the issue on our PCs. In any case the 'LoadOnMainProcess' property will be marked as 'obsolete' in the new major version of Add-in Express. The new version will provide improved tab navigation based on some native IE interfaces.
Posted 07 Jun, 2012 06:12:54 Top
Omri Suissa


Guest


Hi Sergey,

Good to hear that, so in the next version we can use the OnTabActivated event on IE8 without the need to inject to the main process?

Do you have a release date to this version?

If you want i can arrange a vpn connection to the "problematic" machine.

Omri
Posted 07 Jun, 2012 07:55:49 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Omri,

No exactly so. It is not possible to do without injecting in IE8. This IE version is quite specific and requires handling events solely in the main process.

The release of the coming version is scheduled for the next week.

And thank you for the suggestion about a vpn conection, we will definitely use it if we do not find any other way to resolve this issue.

The new version of the loader was sent to your by email, hopefully it fixes the "infinitive loop in IE8" issue.
Posted 07 Jun, 2012 10:12:40 Top
Omri Suissa


Guest


Hi,
Thanks, it fixed it :)

Omri
Posted 10 Jun, 2012 01:42:25 Top