Click here to Skip to main content
Sign Up to vote bad
good
See more: C++directshow
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.
Posted 11 Nov '12 - 4:51


2 solutions

0x201 could be SNDDEV_ERROR_Open
 
(from evcode.h -> audevcod.h)
  Permalink  
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.
  Permalink  
Comments
Nelek - 25 Nov '12 - 7:38
Please don't post solutions to add information, to ask something or to comment another user. - To add information to your message, you can use the widget "Improve question" / "Improve solution" at the bottom of your text. - To ask/answer a user, you can use the widget "Have a question or comment?" (as I am doing right now with you) or the widget "reply" in another comment.
mOOmOOn_ - 25 Nov '12 - 8:04
OK. Sorry for that. I'll be aware next time.
Nelek - 25 Nov '12 - 8:06
No problem, thank you :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 353
1 OriginalGriff 345
2 Arun Vasu 315
3 Maciej Los 208
4 Aarti Meswania 180
0 Sergey Alexandrovich Kryukov 9,680
1 OriginalGriff 7,539
2 CPallini 4,018
3 Rohan Leuva 3,362
4 Maciej Los 2,951


Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 24 Nov 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid