ddtung / winforms-geplugin-control-library

Automatically exported from code.google.com/p/winforms-geplugin-control-library
0 stars 0 forks source link

IGEPlugin getStreamingPercent() always throw the COMException #70

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open a local kml
2. Hit refresh button several times
3. Google plugin will throw COMException at the getStreamingPercent()

What is the expected output? What do you see instead?
Should not throw the com exception

What version of the product are you using? On what operating system?
I have upgrade to Plugin 6.2.0.5905, on WIndows 7

Please provide any additional information below.

This might be a google issue, but I've search google forum, and don't see much 
people report this error

Another thought is that the use of timer which might cause this issue during 
the refresh process.

Original issue reported on code.google.com by hefe...@gmail.com on 27 Jan 2012 at 3:56

GoogleCodeExporter commented 8 years ago
Yes this is an issue with constantly refreshing the plugin, the polling of 
getStreamingPercent needs to be wrapped in an exception handler as sometimes 
the referenced com object is not in memory when the call is made. Thanks.

Original comment by fraser.c...@gmail.com on 27 Jan 2012 at 6:35

GoogleCodeExporter commented 8 years ago
Thanks, Fraser!

I found out that if I kill the plugin (like ge.Kill_(), where ge is IPlugin) 
during the browser refresh, I won't get the COMException.

Original comment by hefe...@gmail.com on 31 Jan 2012 at 3:24

GoogleCodeExporter commented 8 years ago
Hey,

calling kill_ is a possible workaround, although as it is not part of the 
public api so it could get removed... You could also try calling - 
KillAllPluginProcesses() from the GEWebBrowser - this will terminate the plugin 
instance via managed code (rather than via the non public api) although you 
need elevated privileges for this to work.

I plan to look at the whole timer set up in that control to see if I can't 
manage the calls better as to avoid the COMException being raised without 
having to nuke the plugin...

Thanks for the feedback, I will post this as fixed if and when I come up with 
something workable.

Regards,

Fraser

Original comment by fraser.c...@gmail.com on 5 Feb 2012 at 10:29

GoogleCodeExporter commented 8 years ago
Refresh issue...

Original comment by fraser.c...@gmail.com on 6 Feb 2012 at 8:01