I've been working on a video plugin that forces itself to always be active. As a result its render method is called every second. The Render method basically takes some Controls and paints them onto a bitmap to overlay on top of the video. I've noticed an error, and I'm wondering if maybe there's something in GBPVR that can be fixed, or if it's an underlying windows error, in which case it's hopeless. Any thoughts would be great. I'm attaching the stack trace exception:
8/25/2006 9:57:00 AM.491 ERROR [1] Encounter unexpected exception in timerRefresh_Tickarameter is not valid.
8/25/2006 9:57:00 AM.491 ERROR [1] at System.Drawing.Graphics.GetHdc()
at System.Windows.Forms.Control.DrawToBitmap(Bitmap bitmap, Rectangle targetBounds)
at Plugin.TTPlugin.ApplicationLogic.render(Boolean& requiresMoreRendering) in C:\Documents and Settings\tsohn\TTPlugin\ApplicationLogic.cs:line 140
at TTPlugin.TTPlugin.render(Boolean& requiresMoreRendering) in C:\Documents and Settings\tsohn\TTPlugin\TTPlugin.cs:line 304
at TTPlugin.TTPluginProxy.render(Boolean& requiresMoreRendering) in C:\Documents and Settings\tsohn\socialTV\TTPlugin\TTPluginProxy.cs:line 95
at GBPVR.xb3e61f7448c39547.RefreshOSD()
at GBPVR.xbb1566157f5f8b1f.xb1cbc922a07ef39b(Object xdf2e3583f942db7b, EventArgs xc4f45905cb1fc7ba)
8/25/2006 9:57:01 AM.351 ERROR [1] Encounter unexpected exception in timerRefresh_Tick:A generic error occurred in GDI+.
8/25/2006 9:57:01 AM.351 ERROR [1] at System.Drawing.Bitmap.GetHbitmap(Color background)
at System.Drawing.Bitmap.GetHbitmap()
at NativeUtilities.MediaHelper.overlayBitmap(Image image)
at GBPVR.xb3e61f7448c39547.RefreshOSD()
at GBPVR.xbb1566157f5f8b1f.xb1cbc922a07ef39b(Object xdf2e3583f942db7b, EventArgs xc4f45905cb1fc7ba)
8/25/2006 9:57:00 AM.491 ERROR [1] Encounter unexpected exception in timerRefresh_Tickarameter is not valid.
8/25/2006 9:57:00 AM.491 ERROR [1] at System.Drawing.Graphics.GetHdc()
at System.Windows.Forms.Control.DrawToBitmap(Bitmap bitmap, Rectangle targetBounds)
at Plugin.TTPlugin.ApplicationLogic.render(Boolean& requiresMoreRendering) in C:\Documents and Settings\tsohn\TTPlugin\ApplicationLogic.cs:line 140
at TTPlugin.TTPlugin.render(Boolean& requiresMoreRendering) in C:\Documents and Settings\tsohn\TTPlugin\TTPlugin.cs:line 304
at TTPlugin.TTPluginProxy.render(Boolean& requiresMoreRendering) in C:\Documents and Settings\tsohn\socialTV\TTPlugin\TTPluginProxy.cs:line 95
at GBPVR.xb3e61f7448c39547.RefreshOSD()
at GBPVR.xbb1566157f5f8b1f.xb1cbc922a07ef39b(Object xdf2e3583f942db7b, EventArgs xc4f45905cb1fc7ba)
8/25/2006 9:57:01 AM.351 ERROR [1] Encounter unexpected exception in timerRefresh_Tick:A generic error occurred in GDI+.
8/25/2006 9:57:01 AM.351 ERROR [1] at System.Drawing.Bitmap.GetHbitmap(Color background)
at System.Drawing.Bitmap.GetHbitmap()
at NativeUtilities.MediaHelper.overlayBitmap(Image image)
at GBPVR.xb3e61f7448c39547.RefreshOSD()
at GBPVR.xbb1566157f5f8b1f.xb1cbc922a07ef39b(Object xdf2e3583f942db7b, EventArgs xc4f45905cb1fc7ba)