View Full Version : Overlay Display problem, crash or not crash

August 22, 2007, 14:20:33
I have been trying to write texts in a timer onto the live video. It works fine for a while but after some from five to 20 minutes (or even longer, it varies) the function of drawText() stops work, and as a result, there is no any further overlay updating on the live video. The other part of the program seems continuing without being affected.
Another problem which may be related is that if I put the beginPaint(), and endPaint() in the front and back of the text drawing functions (I know from the document it is not necessary), the program crash after a similar random period, with an Assertion failed error message window saying: “Expression: dc!=0 && “You didn’t call beginPaint(). So the HDC returned is 0.”. However in fact beginPaint() was called each time. In this case, the updating problem did not happen (or not happens because it chash).
I would be very grateful if any could help.

Sascha Schmidt
August 22, 2007, 14:38:00
Hallo anxyl,

please send me a small sample program, which shows the problem.
Then I can see where the problem is and I can help you n a more efficient way.

August 22, 2007, 15:41:54
Hi, Sascha
Thank you very much. I will do what you suggested.

October 4, 2007, 10:28:28
Hi, Sascha,
Sorry I could not provide a small sample program. The problem appears randomly and depends on the video input so that even I send you my real program it won't show the problem without specific camera input. I changed the codes and went around the problem now. Thank you any way.

Stefan Geissler
October 4, 2007, 13:54:51

I would like you to post the drawing code. Which C++ version do you use?