new ActiveXObject crashes IE6 upon exit

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

new ActiveXObject crashes IE6 upon exit
new ActiveXObject crashes IE6 upon exit 
Justin C




Posts: 6
Joined: 2009-12-15
Greetings.

I'm using AddInExpress for IE version 502-b261.

I've created a toolbar and a web page that edits the buttons on that toolbar. I'm using the ActiveXObject IE method to execute methods from within the IEModule object. All of this works swimmingly.

Unfortunately, every time a window browser is closed, I get the following message (from debugging within visual studios 2008):
Managed Debugging Assistant 'LoaderLock' has detected a problem in 'C:\Program Files\Internet Explorer\iexplore.exe'.
Additional Information: Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.


Now, this only happens when I visit the page that creates the ActiveXObject that connects to my toolbar. It does not occur if I do not go to that page.

I have not tested this issue in any other browser except for IE 6 because we need it to work in IE6.

I also don't have any debugging symbols for IE6. I downloaded a bunch from microsoft, but I can't get visual studios to load them.

Any help would be greatly appreciated.

Thanks!

j
Posted 15 Dec, 2009 17:34:43 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Justin.

Is the ActiveX component written in managed code?
Posted 16 Dec, 2009 10:00:44 Top
Justin C




Posts: 6
Joined: 2009-12-15
Thanks for the reply.

There is no actual ActiveX component. It's the ActiveXObject javascript method I'm calling to connect to the add-on toolbar I've created with addin express.
Posted 16 Dec, 2009 10:10:38 Top
Justin C




Posts: 6
Joined: 2009-12-15
I've created a test project that has everything needed to reproduce this error.

It's a basic toolbar project with only a simple label in the toolbar and one public function declared in the IEModule.
There is a test.htm file in the testToolbar/testToolbar directory. If you install the toolbar in IE6, load the file and click the button you should get a messagebox popup. When you close the browser window, you should get an application fault.

Here's the link:
http://www.getplaylists.com/static/testToolbar.zip

thanks!
Posted 16 Dec, 2009 12:11:10 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Justin.

Please try to change the script as shown below:

<script>
function test()
{
tb = new ActiveXObject("testToolbar.IEModule");
alert("Doing Test");
tb.testFunc();
tb.Dispose(); }
</script>
Posted 18 Dec, 2009 10:48:47 Top
Justin C




Posts: 6
Joined: 2009-12-15
Hi Sergey,

Yes I had noticed that in previous examples and had tried it myself.

Problem being: If I call dispose() on the toolbar, I am henceforth unable to connect to the toolbar through javascript until all instances of the browser are closed and started up again.

Furthermore, in our actual code (not the example I posted), calling dispose() either through the javascript or on the onQuit or onDisconnect events does not prevent the crash anymore.

I'm at a loss.
Posted 18 Dec, 2009 12:36:52 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Justin.

You just need to create an instance of IEModule whenever you want to connect to the toolbar.
Posted 22 Dec, 2009 10:47:22 Top