473,395 Members | 1,341 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Bad memory leak in C# ActiveX control in Internet Explorer

We have created an ActiveX control (a series of them actually) which can be
loaded into Internet Explorer and accessed via Javascript using the
techniques described here:
http://support.microsoft.com/kb/555687/en-us

Functionally, everything is working as we expect. We can access the C# data
we need from Javascript, including firing C# events which invoke Javascript
code.

However, we started seeing that, should we leave the application open for a
substantial amount of time (for example: overnight), that in the morning IE
will have crashed (with the Windows Error Reporting Dialog popping up).
Also - memory usage of iexplore.exe (per task manager) will be on the order
of gigabytes. Now, I understand that with regards to managed code task
manager is a bad measure of memory usage, but this seems a bit extreme.
During normal usage (when not having been open for some number of hours),
our application shows (again in task manager) between 100-200mb of memory
usage.

There is an additional wrinkle in this in that the Javascript is also making
use of the Adobe SVG viewer to display data.

I know this is a very "vague" description of the problem, but I'm honestly
not sure where to start. I tried attaching debuggers overnight, but it
crashed even through that, no additional useful information in the debugger
(had one attached in managed mode, unmanaged mode, and script mode).

Any thoughts on what kind of memory concerns I should given this
interaction? How does garbage collection hold when objects are exposed via
COM and accessed via Javascript?
--
Adam Clauss

Apr 11 '07 #1
1 4072
On 11 Apr, 15:45, "Adam Clauss" <caba...@tamu.eduwrote:
We have created an ActiveX control (a series of them actually) which can be
loaded into Internet Explorer and accessed via Javascript using the
techniques described here:http://support.microsoft.com/kb/555687/en-us

Functionally, everything is working as we expect. We can access the C# data
we need from Javascript, including firing C# events which invoke Javascript
code.

However, we started seeing that, should we leave the application open for a
substantial amount of time (for example: overnight), that in the morning IE
will have crashed (with the Windows Error Reporting Dialog popping up).
Also - memory usage of iexplore.exe (per task manager) will be on the order
of gigabytes. Now, I understand that with regards to managed code task
manager is a bad measure of memory usage, but this seems a bit extreme.
During normal usage (when not having been open for some number of hours),
our application shows (again in task manager) between 100-200mb of memory
usage.

There is an additional wrinkle in this in that the Javascript is also making
use of the Adobe SVG viewer to display data.

I know this is a very "vague" description of the problem, but I'm honestly
not sure where to start. I tried attaching debuggers overnight, but it
crashed even through that, no additional useful information in the debugger
(had one attached in managed mode, unmanaged mode, and script mode).

Any thoughts on what kind of memory concerns I should given this
interaction? How does garbage collection hold when objects are exposed via
COM and accessed via Javascript?

--
Adam Clauss
Have a look here: http://msdn2.microsoft.com/en-us/library/ms979205.aspx

and here's another good guide.

http://www.developerland.com/DotNet/General/125.aspx

Also look into sysinternals process explorer which gives a good over
view of where memory is used, even if you're just looking at COM user
objects and GDI objects.

Hope that helps

Apr 11 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jeff M | last post by:
For my application an activeX refers to "program displayed within Internet Explorer" After looking over the docs for VB.NET it looks impossible. ---START--- USERCONTROL CHANGES IN VISUAL...
2
by: Fie Fie Niles | last post by:
This one XP machine (with IE 6) is having a problem viewing any ActiveX controls (created on VB6) on the Internet Explorer browser. I put the same ActiveX control in a VB program, and when I run...
3
by: EJ1003 | last post by:
Hello I would like to create Activex Control uisng C# and use it in ASP.Net webform. User Control is not solving my requirement so I am going for Activex Control. Please guide me on this, how...
2
by: Loic | last post by:
A Memory leak in the dotnet UserControl ? Hi All, I’ve tried to use the following “Host Secure, Lightweight Client-Side Controls in Microsoft Internet Explorer” sample (I’d like to use a...
0
by: fergaloc | last post by:
Hi there. Our .net framework 1.1 application is a complex media player that plays back video, flash, web, TV and pictures full screen. It runs on Windows XP SP2. It has 12 DLLs and runs to about...
2
by: Robert | last post by:
Hello javascript group readers, I have a question regarding how to prevent memory leaks in Internet Explorer when using closures. I already knew about the circular reference problem, and until...
4
by: Henrik Dahl | last post by:
Hello! Is it possible to use Visual Studio 2005 or, secondarily, Visual Studio .NET 2003 to create ActiveX controls which may be consumed by VB 6.0 programs, i.e. dealt with on forms in the...
8
by: BillE | last post by:
I have an existing asp.net 2.0 webforms app using master/content pages, and it works fine. I added some Ajax elements, including some UpdatePanels and modal PopUp panels which contain asp.net...
1
by: cdmsenthil | last post by:
I have an Infragistics UltrawebGrid . Each Row in the grid is attached to a context menu using Infragistics CSOM Upon click on the menu, I am creating an Iframe dynamically which points to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.