From efaab0096a5fc27debeb58a014bc0d1919b9322c Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Wed, 18 Feb 2009 15:19:11 +0100 Subject: fix crash at shutdown *** glibc detected *** vdr: free(): invalid pointer: 0xb7875f80 *** ======= Backtrace: ========= /lib/libc.so.6[0xb7d21986] /lib/libc.so.6(cfree+0x89)[0xb7d232b9] /usr/lib/gcc/i686-pc-linux-gnu/4.2.4/libstdc++.so.6(_ZdlPv+0x21)[0xb7ed9eb1] /usr/lib/vdr/plugins/libvdr-dxr3.so.1.6.0(_ZN11cDxr3DeviceD0Ev+0x85)[0xb7866695] vdr(_ZN7cDevice8ShutdownEv+0x33)[0x80a43b3] We do not need to delete created instance of cDxr3Device() not by our own, as it looks like vdr does it. So there are commented calls to Reset, but the plugin needs much love so this is only a workaround. --- dxr3.c | 10 +++++----- dxr3device.h | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dxr3.c b/dxr3.c index 999a6f2..96761f9 100644 --- a/dxr3.c +++ b/dxr3.c @@ -33,7 +33,7 @@ eOSState cDxr3OsdItem::ProcessKey(eKeys Key) { case DXR3_RESET_HARDWARE: cDxr3Interface::Instance().ResetHardware(); - cDxr3Device::Instance().Reset(); + //cDxr3Device::Instance().Reset(); break; case DXR3_FORCE_LETTER_BOX: @@ -43,12 +43,12 @@ eOSState cDxr3OsdItem::ProcessKey(eKeys Key) case DXR3_ANALOG_OUT: cDxr3ConfigData::Instance().SetUseDigitalOut(0); - cDxr3Device::Instance().Reset(); + //cDxr3Device::Instance().Reset(); break; case DXR3_DIGITAL_OUT: cDxr3ConfigData::Instance().SetUseDigitalOut(1); - cDxr3Device::Instance().Reset(); + //cDxr3Device::Instance().Reset(); break; } } @@ -120,7 +120,7 @@ void cMenuSetupDxr3::Store(void) cDxr3Interface::Instance().SetBrightness(newBrightness); cDxr3Interface::Instance().SetContrast(newContrast); cDxr3Interface::Instance().SetSaturation(newSaturation); - cDxr3Device::Instance().Reset(); + //cDxr3Device::Instance().Reset(); } // ================================== @@ -171,7 +171,7 @@ cPluginDxr3::~cPluginDxr3() // ================================== bool cPluginDxr3::Initialize() { - cDxr3Device::Instance(); + new cDxr3Device(); return true; } diff --git a/dxr3device.h b/dxr3device.h index 7206d35..9b43161 100644 --- a/dxr3device.h +++ b/dxr3device.h @@ -35,8 +35,7 @@ cDxr3Device is the interface for VDR devices. Is is the part, which VDR "talks" with our plugin. */ -class cDxr3Device : public cDevice, public Singleton -{ +class cDxr3Device : public cDevice { public: cDxr3Device(); cDxr3Device(cDxr3Interface& demuxDevice); -- cgit v1.2.3