473,545 Members | 1,878 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4091
On 11 Apr, 15:45, "Adam Clauss" <caba...@tamu.e duwrote:
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
2209
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 BASIC .NET In Visual Basic 6.0, UserControl projects (also known as ActiveX Control projects) were used to create ActiveX controls. After they were...
2
7557
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 the VB program on that same machine, I can view the ActiveX control fine. He is using Citrix. The same ActiveX controls can be viewed on other...
3
22840
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 to do it, if any sample is provided will be of great help Thanks EJ
2
2407
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 C# User Control for a project): http://msdn.microsoft.com/msdnmag/issues/02/01/userctrl/ Everything seams working fine (the control is...
0
1737
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 30,000 lines of code. We're 100% .net except for two activeX controls. These are 1) Internet Explorer (ActiveX) 2) Flash Control (ActiveX) ...
2
2353
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 now was able to prevent memory leak problems. But I needed to store DOM elements and can't solve it anymore. So I search the group archive to see if...
4
2496
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 usual way? If yes, may you provide a hint/link for getting started? Best regards,
8
4162
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 controls like gridviews with selectable rows, buttons, textboxes. I'm using Ajax 1.0, and the users are still using IE 6. Some heavy users reported...
1
4880
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 another page in the same domain which also contains infragistics datagid populated with default data retrieved from Data Base. After creating the frame I...
0
7486
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main...
0
7416
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7676
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7932
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7442
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7776
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6001
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5347
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
1032
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.