473,406 Members | 2,816 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,406 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 3175

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...
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
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
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 project—planning, coding, testing,...
0
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...

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.