连续创建/销毁图形后DirectShow泄漏 [英] DirectShow leak after continuous creation/destruction of graph

查看:55
本文介绍了连续创建/销毁图形后DirectShow泄漏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



基本上,经过数百次启动/停止序列后,DirectShow应用程序发生崩溃.

我开发了一个简单的应用程序来重现该问题,并且在某些时候出现了一些奇怪的行为.

如有必要,我可能会在其他帖子中包含应用程序代码,但这是基于

-OpenStartClip:创建所有VMR9素材,包括RenderFile和Run.
-StopCloseClip:停止图形并释放所有接口
-GraphEvent处理程序:接收EC_COMPLETE或EC_USERABORT时,将私有WM_RESTART消息发布到应用程序


因此,测试应用程序应该通过在完成后再次启动来连续播放文件.

该剪辑是6英寸WMV剪辑.

在大约1200个回放会话中可以正常使用,但是在某些时候,它不再起作用:不再重新开始回放.
此外,最后一次尝试会话显示我在GraphEvent Handler中收到一条意外消息,该代码为0x201并且未记录(除非它是WM_LBUTTONDOWN消息,该消息不应由Callback中的DirectShow触发).
请注意,此消息是在OpenClip处理期间触发的,因为在那种情况下,我没有得到通常的EC_PAUSED,当应用程序开始播放时,EC_PAUSED是我在应用程序运行良好时得到的.
请注意,我可以适当退出该应用程序,但是在启动该应用程序时无法再次开始任何新的播放:我需要重新启动计算机才能使其再次运行.

该测试是在XP上完成的,但我认为它与七"相同,因为一段时间后我的常规应用程序在两个OS上都停止了.

所以最初的线索是我知道的
-如果在DirectShow实施过程中已知一些泄漏
-为什么在数百次启动/停止后遇到此0x201错误

我可以在必要时提供测试代码,但为了避免污染,在第一篇文章中将避免使用它.

在此先感谢.

Hi,

Bascially, I get a crash in a DirectShow application after hundreds of start/stop sequences.

I developed a simple application aiming to reproduce the problem and I get some strange behaviour at some point.

I may include the application code in a further post if necessary, but it based on

- OpenStartClip : Creates all the VMR9 stuff, including RenderFile and Run.
- StopCloseClip : Stops the graph and releases all interfaces
- The GraphEvent Handler : When receiving EC_COMPLETE or EC_USERABORT, posts a private WM_RESTART message to the application


Hence, the test application is supposed to play a file continuously by starting it again when finished.

The clip is a 6" WMV clip.

This works whell for about 1200 playback sessions, but at some point, it does not work anymore : playback is never started again.
Moreover, the last try session shows I got an unforeseen message in the GraphEvent Handler which code is 0x201 and is not documented (unless it is the WM_LBUTTONDOWN message which is not supposed to be triggered by DirectShow in the Callback).
Note that this message is triggered during the OpenClip treatment, as in that case I do not get the usuall EC_PAUSED I got when the application runs fine when starting playback.

Notice that I can exit the application propely, but I cannot start any new playback again while launching the application : I need to reboot the computer to get it work again.

This test was done with XP but I suppose it it the same with Seven as my general application stops on both OS after a while.

So the first clues are for me to know
- if some leaks are known in the DirectShow implementation process
- why I encounter this 0x201 error after hundreds of start/stop

I may provide the test code if necessary, but will avoid it in this first post in order not to pollute.

Thanks in advance.

推荐答案

0x201可能是SNDDEV_ERROR_Open

(来自evcode.h-> audevcod.h)
0x201 could be SNDDEV_ERROR_Open

(from evcode.h -> audevcod.h)


感谢您的回答.
实际上,我只收到一次此错误.

但是,经过几个小时的顺序播放后,我总是会崩溃.
而崩溃发生在XP中,而最终不会发生在7中,该文件播放2s文件的次数超过20000次.
似乎是某个地方的大泄漏,我怀疑它是在DirectShow图形过滤器之一中,我无法控制它.
Thanks for the answer.
As a matter of fact, I only got this error once.

Nevertheless, I always get a crash after a couple of hours of sequenced playback.
And the crash occurs with XP, and finally not with 7 which played a 2s file more than 20000 times.
Looks like a big leak somewhere, and I suspect it to be in one of the DirectShow graph filter, where I have no control.


这篇关于连续创建/销毁图形后DirectShow泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆