TeletextPageRenderer crashes in Finalizer on MP-exit (1 Viewer)


New Member
July 7, 2008
Germany Germany
TV-Server Version: RC2
MediaPortal Version: RC2
MediaPortal Skin: Default
Windows Version: Windows Vista SP1
CPU Type: Intel Q6600@2400
HDD: Western Digital 500GB
Memory: 4GB PC6400 GEIL
Motherboard: Gigabyte P35-DS3R
Video Card: nVidia Geforce 8800GTX
Video Card Driver: 175.16
Sound Card: Creative Audigy 2 Value
Sound Card AC3: no AC3
Sound Card Driver: 2.12.002
1. TV Card: Pinnacle PCTV 300i
1. TV Card Type: DVB-T
1. TV Card Driver: 6.0.6000.16420 via Windows Update
Power Supply: Seasonic
Remote: Microsoft
TV - HTPC Connection: DVI


please have a look at this screenshot
It shows that the TeletextPageRenderer throws an Exception on exit, if Teletext is displayed, when you close MP.

- Start MP as Debug-Version in Visual Studio
- Start TV
- Start Teletext
- Click Exit
-> ArgumentException
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y, Int32 width, Int32 height)
at MediaPortal.TV.Teletext.TeletextPageRenderer.Clear()
at MediaPortal.TV.Teletext.DVBTeletext.ClearBuffer()
at MediaPortal.TV.Teletext.DVBTeletext.Finalize()

It looks like resources are disposed in the DVBTeletext-finalizer. Usage of the Dispose pattern should fix the error.
As far as I know, finalize should be used in very rare circumstances only, because you cannot rely on anything in the world around you. In this case it seems that the graphics context is already gone, when finalize is called.
Another workaround could be to call DisposeBitMap on close, which sets _renderGraphics to null.


Retired Team Member
  • Premium Supporter
  • January 7, 2005
    Looks like a valid bug. Can someone reproduce this? If yes then we need to add it into Mantis (currently I dont have access to the MP and most likely I'll forgot this error before morning so it would be good if someone could check this).


    Retired Team Member
  • Premium Supporter
  • April 20, 2008
    Finland Finland
    Country flag
    Yes, I can confirm this. I also did som investigation and found out that in TeletextPageRenderer.cs in TVPlugin and TVLibrary the method public void Clear() does exactly what public void DisposeBitMap() does in TeletextPageRenderer.cs in MP TVCapture source. Like this:

    public void Clear() {
    if (_pageBitmap != null)
    _pageBitmap = null;

    if (_renderGraphics != null)
    _renderGraphics = null;

    so maybe the code Clear() in mp source need to be changed to the above or commented out and replaced with a call to public void DisposeBitMap() which already does the above. I tried to change it and didn't se any side effects but someone else should probably also take a look at this.



    Retired Team Member
  • Premium Supporter
  • July 19, 2005
    Norway Norway
    Country flag
    I'm not able to confirm this using dvb-t & teletext & latest SVN


    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    L Service keeps crashing General 3
    U [solved] MediaPortal crashing on startup General Support 10
    RoChess Weird GPU crash -- possible cause: resizing media MediaPortal 1 Talk 8
    torone Dritter versuch mit Mediaportal 2 Allgemeines Support- und Diskussionsforum 1
    W [solved] MP suddenly Crashes when starting live TV on most channels and on recordings from the same channels General Support 20
    W [solved] MP suddenly Crashes when starting live TV on some channels and on some recordings Television (MyTV frontend and TV-Server) 1
    D [solved] Changed username in Win10, now TV Server config crashes on fresh install Installation, configuration support 1
    ajs Trakt error when start with MP crash Trakt 1
    R TV server crash with WintTV quadHD General 0
    Dark Eyes TVService locks up or fails to restart on resuming from sleep, and crashes when grabbing EPG Installation, configuration support 7
    atlantic [solved] MP1.24 Pre released crash in TV General Support 12
    RoChess Random GPU crash leads to MePo restart, but works fine afterwards MediaPortal 1 14
    R [fixed] [MP2-819] MP2 Server crashes on ATSC OTA channel scan Submit: Bug Reports 33
    doskabouter 1.23.0 Crash when skipping in a dvd Bugreports 3
    J [fixed] [MP2-833] 2.2.2 server crash during import Submit: Bug Reports 50
    P MP2 TV Server crashes when starting - throws error remoting exception General 2
    G MP Crashed during setting up recording. Newcomers Forum 1
    Rob Hexenmeister DVD Skip steps causing crash General Support 2
    badboyxx MP 1.22 final is crashing when jumping forward while playing DVD-Iso watch/edit Videos 26
    Terra Crash when opening ACTORS list My TVSeries 3
    Terra Crash when searching movies, reproducable Moving Pictures 2
    KlausWirn Music crash Bass crash no change to play music Installation, configuration support 2
    cladinshadows85 [solved] Audio playing mutiple times over video and crashing General 8
    joecrow Win 10 crash, hang and freeze with USB Tuner. General Support 13
    S Crashing on some IPTV channels General Support 21
    Similar threads

    Top Bottom