Skip to content

Crash connecting to graph containing filter supporting IVideoWindow interface #333

Closed
@mikecopperwhite

Description

Steps

  • Open a 32-bit instance of GraphStudioNext (instance A)
  • In instance A render a video file. The graph should contain a video renderer filter supporting IVideoWindow
  • Open a 64-bit instance of GraphStudioNext (instance B)
  • In instance B connect to remote graph in instance A

Expected : Connects to remote graph in instance A
Actual : Sometimes succeeds connecting, sometimes crashes. Stopping on a breakpoint before the crash almost always avoids the crash.

The crashing call stack is inside a call to put_Caption with crash occur in marshalling code for BSTR (see code extract below).

Probably caused by passing a raw pointer to the string data in the local variable vw_name to put_Caption rather than a proper BSTR parameter. Works in local graphs by chance but call timing is different calling a remote graph.

  CComPtr<IVideoWindow>		vw;
	hr = f->QueryInterface(IID_IVideoWindow, (void**)&vw);
	if (SUCCEEDED(hr)) {
		CString		vw_name;
		vw_name = _T("ActiveMovie Window: ") + display_name;
		vw->put_Caption(vw_name.GetBuffer());
		vw = NULL;
	}

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions