Closed Bug 149926 Opened 23 years ago Closed 23 years ago

ActiveX control will crash on Visible property change

Categories

(Core Graveyard :: Embedding: ActiveX Wrapper, defect)

x86
Windows ME
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: hardrequest, Assigned: adamlock)

Details

(Keywords: crash, stackwanted)

Attachments

(3 files)

When the control has a page loaded and the Visible property is set to False, then to True, the control will lockup and the following error message displays: Run-time error '-2147417848 (80010108)': Method 'Visible' of object 'IWebBrowser2' failed This is both in the VB IDE and compiled.
Reporter: Could you specify your Mozilla build ID and provide TalkBack incident ID?
Severity: normal → critical
Keywords: crash, stackwanted
Mozilla Build ID: 2002053012 I don't have a TalkBack ID; the error was displayed in a messagebox.
This is a weird one. I don't actually implement Visible at all in the control, but I wrote a test VB app and setting Visible does toggle the control on and off. Therefore something else is implementing the window hiding and showing. I think this something is VB itself. For example if I do this: Dim i as IWebBrowser2 Set i = MozillaBrowser1 i.Visible = Not i.Visible The effect should be nothing at all since I don't implement Visible. But it does toggle. The error 80010108 means "The object invoked has disconnected from its clients. ". The control is definitely not sending this, so again I reckon VB is messing around with marshaling or something which is putting some kind of proxy in the middle. What version of VB is this?
This is using Visual Basic 6. It only gives the error if a page is loaded into the control. And you are correct... Visual Basic adds a few properties, including Visible. You should be able to fix this by adding your own Visible property. Doing so would force VB to use your property instead of whatever VB does.
I tested with VB 6 and I had a page loaded and I couldn't reproduce the issue. Is it a particular page or any page? I'll attach my sample form. The IWebBrowserApp interface has a Visible property, but my impl does nothing except return S_OK, which is what I meant when I said I don't implement it. I have no idea why VB isn't using my impl and choosing to use its own.
Attached file 149926.frm
Attached file 149926.frx
Attached file 149926.vbp
This is a sample test app. Works for me in VB 6 Service Pack 5
Hmm... well, the test app you posted does the same thing (locks up and crashes VB). I'm also using VB 6 with service pack 5, and it doesn't matter what page is loaded. I can't think of what could be causing this, but a simple workaround is to leave the control visible. I can live with that.
I'll mark this WORKSFORME.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: