473,385 Members | 1,861 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,385 software developers and data experts.

Hang in Dispose with ActiveX control

Banging my head against the wall trying to figure this out. I have a
'sometimes' hang while disposing a form which contains an ActiveX
control (Flash.ocx version 7). The form's Dispose() method generated by
the form designer

protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

However, it never puts anything in 'components'. Anyway, the hang is
inside the base.Dispose
mscorlib.dll!System.GC.GetTotalMemory(bool forceFullCollection = true) + 0x23 bytes


system.windows.forms.dll!System.Windows.Forms.Appl ication.CollectAllGarbage()
+ 0xd bytes

system.windows.forms.dll!System.Windows.Forms.AxHo st.ReleaseAxControl()
+ 0x2a6 bytes

system.windows.forms.dll!System.Windows.Forms.AxHo st.TransitionDownTo(int
state = 0) + 0x151 bytes

system.windows.forms.dll!System.Windows.Forms.AxHo st.DisposeAxControls()
+ 0x30 bytes

system.windows.forms.dll!System.Windows.Forms.Cont rol.DisposeAxControls()
+ 0x54 bytes
system.windows.forms.dll!System.Windows.Forms.Cont rol.Dispose(bool
disposing = true) + 0x1ce bytes

system.windows.forms.dll!System.Windows.Forms.Cont ainerControl.Dispose(bool
disposing = true) + 0x2b bytes
system.windows.forms.dll!System.Windows.Forms.Form .Dispose(bool
disposing = true) + 0x2b0 bytes
TestDisposeAx.exe!TestDisposeAx.Form2.Dispose(bool disposing = true)
Line 48 C#
The stack trace leaves me with several questions.
1. GetTotalMemory(true). One reference says this will call garbage
collection repeatedly until memory usage stabilizes within 5% - which
sounds like it blocks some indefinite period of time. Other references
say this just means it might wait 'a short time'.
2. Why would ReleaseAxControl call CollectAllGarbage??
3. Why, after I try Controls.Remove(player), does that base.Dispose()
still wind up down in ReleaseAxControl?
4. And of course, what could be blocking that GetTotalMemory? All other
threads which I can see are merely waiting for an event. The form and
the player were created on that main thread, the same one making the
dispose call. I'm not aware that we've coded any of our own finalizers
anywhere.

It doesn't always hang. I do have a repeatable way to get my whole app
to hang, and a repeatable way where it doesn't hang, but at the point
of the call to dispose they aren't any different! My only guess as to
why that would happen is that one way churns more memory than the
other, maybe forces more garbage collections or something.

For reference, we are stuck back on 1.1 and I have little hope of being
able to change that any time soon.

Any suggestions?

May 4 '06 #1
0 3174

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

Similar topics

1
by: wang xiaoyu | last post by:
Hello: i want use activex in wxpython program,but when i use MakeActiveXClass an exception occurs. this is my source code dealing the DICOM ocx.I must note that in this program "hwtxcontrol" is...
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: Jeffery Franzen | last post by:
Anyone know where the documentation is regarding Activex controls in asp web forms? I'm using VS.NET 2002 enterprise and am trying to use Activex controls in vb.net web form app. I do the add...
9
by: Charles Law | last post by:
I have a form on which user controls are placed at runtime. When a control is added to the form a handler is added for an event that a high-level object raises, which must be handled by the new...
7
by: Peter Proost | last post by:
Hi group, Here at work they've got an activeX control which is used on a usercontrol, and this usercontrol is one of the standard controls in the framework, so this user controls get's used a...
3
by: Weston Fryatt | last post by:
Simple question I hope.... How do I send data to and from an ASP.Net (server side) web page to a ActiveX Control (client side) embedded in a web browser??? What I need to do, is I have image...
7
by: Jarod_24 | last post by:
I just downloaded a activex control that was written in C# and tried to view it on my PDA's Internet Explorer. At my regular PC it displayed just fine, but nothing showed up on the pda. Do...
2
by: Wilfried Mestdagh | last post by:
Hi, If I add programatically a Panel to a control, and a Label add to that Panel. Then when I Dispose the Panel do I have to Dispose the Label also, or does the Panel take care of that ? And if...
6
by: hufaunder | last post by:
I have an ActiveX component that I want to use in a library that I am writing. As a first test I used the ActiveX component in a windows form application. Adding the component created: Ax.dll...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.