Hi Saman,
dann würde ich sagen...sch***ß der Hund drauf macht ja eh keiner, 20 Serientimer hintereinander anzulegen...
Wenn ich dazu komme, werde ich deinen Patch ins Git aufnehmen.
Ciao Louis
Hi Saman,
dann würde ich sagen...sch***ß der Hund drauf macht ja eh keiner, 20 Serientimer hintereinander anzulegen...
Wenn ich dazu komme, werde ich deinen Patch ins Git aufnehmen.
Ciao Louis
Super!
Mir ist bei meiner Serientimer-Orgie noch was aufgefalllen:
Im Gegensatz zu normalen Timern können Serientimer ja immer angelegt werden, egal ob schon ein Timer existiert oder nicht.
Am Server werden dann auch zwei Timer erstellt.
Sitzt man aber am Client, wird der erste Timer deaktiviert.
Damit das Verhalten gleich ist, sollten wir ihmo den Patch da noch anpassen:
cTimer *cRecManager::CreateSeriesTimer(cRecMenu *menu) {
bool active = menu->GetBoolValue(1);
int channelNumber = menu->GetIntValue(2);
int start = menu->GetIntValue(3);
int stop = menu->GetIntValue(4);
int weekdays = menu->GetIntValue(5);
time_t tday = menu->GetTimeValue(6);
int prio = menu->GetIntValue(7);
int lifetime = menu->GetIntValue(8);
cChannel *channel = Channels.GetByNumber(channelNumber);
cTimer *seriesTimer = new cTimer(false, false, channel);
seriesTimer->SetDay(tday);
seriesTimer->SetStart(start);
seriesTimer->SetStop(stop);
seriesTimer->SetPriority(prio);
seriesTimer->SetLifetime(lifetime);
seriesTimer->SetWeekDays(weekdays);
seriesTimer->SetFile("TITLE EPISODE");
if (active)
seriesTimer->SetFlags(tfActive);
else
seriesTimer->SetFlags(tfNone);
seriesTimer->SetEventFromSchedule();
if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
RemoteTimers_Timer_v1_0 rt;
rt.timer = seriesTimer;
if (pRemoteTimers->Service("RemoteTimers::NewTimer-v1.0", &rt)) {
isyslog("remotetimer %s added (active)", *rt.timer->ToDescr());
seriesTimer = rt.timer;
} else {
isyslog("%s", *rt.errorMsg);
}
cString errorMsg;
if (!pRemoteTimers->Service("RemoteTimers::RefreshTimers-v1.0", &errorMsg)) {
esyslog("tvguide: %s", *errorMsg);
}
} else {
Timers.Add(seriesTimer);
Timers.SetModified();
}
return seriesTimer;
}
Alles anzeigen
Seit ich das 'seriesTimer = rt.timer' drinn habe, ist er mir auch nicht mehr abgeschmiert.
Gruß S.
Moin!
Wird durch den Service-Aufruf "RemoteTimers::NewTimer" ein neues Timer-Objekt erstellt? Wenn ja, dann hast du da einen Memory-Leak, weil dein seriesTimer nicht gelöscht wird. Oder macht das der Aufruf auch?
Lars.
Moin Lars,
ich meine das passt so, aber hier mal der dazugehörige Code
remotetimers.h
/*
* RemoteTimers::NewTimer-v1.0
* Add a new timer.
* In case of an error, the service call returns false and the structure includes an error message.
* Data points to a RemoteTimers_Timer_v1_0 struct.
*
* RemoteTimers::ModTimer-v1.0
* Change an existing timer.
* In case of an error, the service call returns false and the structure includes an error message.
* Data points to a RemoteTimers_Timer_v1_0 struct.
*
* RemoteTimers::DelTimer-v1.0
* Delete an existing timer.
* In case of an error, the service call returns false and the structure includes an error message.
* Data points to a RemoteTimers_Timer_v1_0 struct.
*/
struct RemoteTimers_Timer_v1_0 {
//in+out
cTimer *timer;
//out
cString errorMsg;
};
Alles anzeigen
remotetimers.c
if (strcmp(Id, "RemoteTimers::NewTimer-v1.0") == 0) {
if (Data) {
RemoteTimers_Timer_v1_0 *data = (RemoteTimers_Timer_v1_0 *) Data;
PluginRemoteTimers::cMenuTimerItem::UpdateUser(*data->timer, MASK_FROM_SETUP(RemoteTimersSetup.defaultUser));
if (RemoteTimersSetup.addToRemote) {
if (svdrp->Connect()) {
cRemoteTimer *rt = new cRemoteTimer();
*(cTimer*) rt = *data->timer;
delete(data->timer);
data->timer = rt;
eRemoteTimersState state = RemoteTimers.New(rt);
if (state > rtsRefresh) {
DELETENULL(data->timer);
data->errorMsg = tr(RemoteTimers.GetErrorMessage(state));
}
}
else {
DELETENULL(data->timer);
data->errorMsg = tr(MSG_UNAVAILABLE);
}
svdrp->Disconnect();
}
else {
Timers.Add(data->timer);
Timers.SetModified();
}
if (data->timer)
isyslog("timer %s added (active)", *data->timer->ToDescr());
return *data->errorMsg == NULL;
}
return true;
}
Alles anzeigen
Ach meno,
jetzt habe ich nochmal alle Timer gelöscht und drei Serientimer angelegt und bums...
Vorschläge?
Debuggen
Debuggen
http://www.vdr-portal.de/board…de-0-0-6-git/#post1152481
Und noch ein aktueller ...
Crashlog from Tue Jul 16 10:40:20 CEST 2013
----------------------------------
Environment details:
TERM=linux
EXIT_SIGNAL=SEGV
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
PWD=/
JOB=vdr
RESULT=failed
SHLVL=1
PROCESS=main
UPSTART_INSTANCE=
UPSTART_EVENTS=stopped
UPSTART_JOB=vdr-dbg
INSTANCE=
_=/usr/bin/env
Backtrace:
----------
[New LWP 5547]
[New LWP 5832]
[New LWP 5598]
[New LWP 5603]
[New LWP 5602]
[New LWP 5643]
[New LWP 5599]
[New LWP 5606]
[New LWP 5834]
[New LWP 5833]
[New LWP 5645]
[New LWP 5597]
[New LWP 5596]
[New LWP 5608]
[New LWP 5644]
[New LWP 5605]
[New LWP 5642]
[New LWP 5607]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `vdr-dbg --lirc=/var/run/lirc/lircd -v /srv/vdr/video.00 -c /var/lib/vdr -L /usr'.
Program terminated with signal 11, Segmentation fault.
#0 0x000000000050d71e in cTimer::IncDay (t=2325348707497949753, Days=-1) at timers.c:377
#0 0x000000000050d71e in cTimer::IncDay (t=2325348707497949753, Days=-1) at timers.c:377
#1 0x000000000050eac6 in cTimer::Matches (this=0x337d4a0, t=1373964019, Directly=false, Margin=0) at timers.c:422
#2 0x000000000050f13b in cTimer::StopTime (this=0x337d4a0) at timers.c:512
#3 0x00007f5c78fe7f5d in cRecMenuConfirmSeriesTimer (seriesTimer=0x337d4a0, this=0x3437570) at recmenus.c:351
#4 cRecMenuManager::StateMachine (this=0x2f2dbb0, nextState=<optimized out>) at recmenumanager.c:216
#5 0x00007f5c78fe9baa in cRecMenuManager::ProcessKey (this=0x2f2dbb0, Key=kOk) at recmenumanager.c:545
#6 0x00007f5c78fe9cbe in cTvGuideOsd::ProcessKey (this=0x2e2b820, Key=<optimized out>) at tvguideosd.c:656
#7 0x000000000046dad6 in main (argc=<optimized out>, argv=<optimized out>) at vdr.c:1237
[New LWP 5547]
[New LWP 5832]
[New LWP 5598]
[New LWP 5603]
[New LWP 5602]
[New LWP 5643]
[New LWP 5599]
[New LWP 5606]
[New LWP 5834]
[New LWP 5833]
[New LWP 5645]
[New LWP 5597]
[New LWP 5596]
[New LWP 5608]
[New LWP 5644]
[New LWP 5605]
[New LWP 5642]
[New LWP 5607]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `vdr-dbg --lirc=/var/run/lirc/lircd -v /srv/vdr/video.00 -c /var/lib/vdr -L /usr'.
Program terminated with signal 11, Segmentation fault.
#0 0x000000000050d71e in cTimer::IncDay (t=2325348707497949753, Days=-1) at timers.c:377
#0 0x000000000050d71e in cTimer::IncDay (t=2325348707497949753, Days=-1) at timers.c:377
#1 0x000000000050eac6 in cTimer::Matches (this=0x337d4a0, t=1373964019, Directly=false, Margin=0) at timers.c:422
#2 0x000000000050f13b in cTimer::StopTime (this=0x337d4a0) at timers.c:512
#3 0x00007f5c78fe7f5d in cRecMenuConfirmSeriesTimer (seriesTimer=0x337d4a0, this=0x3437570) at recmenus.c:351
#4 cRecMenuManager::StateMachine (this=0x2f2dbb0, nextState=<optimized out>) at recmenumanager.c:216
#5 0x00007f5c78fe9baa in cRecMenuManager::ProcessKey (this=0x2f2dbb0, Key=kOk) at recmenumanager.c:545
#6 0x00007f5c78fe9cbe in cTvGuideOsd::ProcessKey (this=0x2e2b820, Key=<optimized out>) at tvguideosd.c:656
#7 0x000000000046dad6 in main (argc=<optimized out>, argv=<optimized out>) at vdr.c:1237
Detailed Backtrace with Threads
[New LWP 5547]
[New LWP 5832]
[New LWP 5598]
[New LWP 5603]
[New LWP 5602]
[New LWP 5643]
[New LWP 5599]
[New LWP 5606]
[New LWP 5834]
[New LWP 5833]
[New LWP 5645]
[New LWP 5597]
[New LWP 5596]
[New LWP 5608]
[New LWP 5644]
[New LWP 5605]
[New LWP 5642]
[New LWP 5607]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `vdr-dbg --lirc=/var/run/lirc/lircd -v /srv/vdr/video.00 -c /var/lib/vdr -L /usr'.
Program terminated with signal 11, Segmentation fault.
#0 0x000000000050d71e in cTimer::IncDay (t=2325348707497949753, Days=-1) at timers.c:377
Thread 18 (Thread 0x7f5c6d7fa700 (LWP 5607)):
#0 0x00007f5c847b2313 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x0000000000513b75 in cPoller::Poll (this=<optimized out>, TimeoutMs=<optimized out>) at tools.c:1380
#2 0x000000000048237a in cTSBuffer::Action (this=0x2c65690) at device.c:1853
#3 0x000000000050c41d in cThread::StartThread (Thread=0x2c65698) at thread.c:262
#4 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 17 (Thread 0x7f5c2f7fe700 (LWP 5642)):
#0 0x00007f5c847b2313 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f5c2d4625ff in ?? () from /usr/lib/vdpau/libvdpau_nvidia.so.1
#2 0x00007f5c2d455135 in ?? () from /usr/lib/vdpau/libvdpau_nvidia.so.1
#3 0x00007f5c2d45ab10 in ?? () from /usr/lib/vdpau/libvdpau_nvidia.so.1
#4 0x00007f5c2d45108c in ?? () from /usr/lib/vdpau/libvdpau_nvidia.so.1
#5 0x00007f5c8033884f in VdpauDisplayFrame () at video.c:8224
#6 0x00007f5c8033afc1 in VdpauSyncDisplayFrame () at video.c:8526
#7 VdpauDisplayHandlerThread () at video.c:8765
#8 0x00007f5c8033f8e1 in VideoDisplayHandlerThread (dummy=<optimized out>) at video.c:9593
#9 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#10 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x0000000000000000 in ?? ()
Thread 16 (Thread 0x7f5c6e7fc700 (LWP 5605)):
#0 0x00007f5c85d8a0fe in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000000000050ba28 in cCondWait::Wait (this=0x25b2190, TimeoutMs=<optimized out>) at thread.c:71
#2 0x00007f5c78cf4aa1 in cConflictCheckThread::Action() () from /usr/lib/vdr/plugins/libvdr-epgsearch.so.2.0.0
#3 0x000000000050c41d in cThread::StartThread (Thread=0x25b2120) at thread.c:262
#4 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 15 (Thread 0x7f5c2effd700 (LWP 5644)):
#0 0x00007f5c847b2313 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x0000000000513b75 in cPoller::Poll (this=<optimized out>, TimeoutMs=<optimized out>) at tools.c:1380
#2 0x000000000048237a in cTSBuffer::Action (this=0x7f5c28000a80) at device.c:1853
#3 0x000000000050c41d in cThread::StartThread (Thread=0x7f5c28000a88) at thread.c:262
#4 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 14 (Thread 0x7f5c6cff9700 (LWP 5608)):
#0 0x00007f5c85d8a0fe in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000000000050ba28 in cCondWait::Wait (this=0x25b3868, TimeoutMs=<optimized out>) at thread.c:71
#2 0x00000000004e599a in cRingBufferLinear::Get (this=0x25b3800, Count=@0x7f5c6cff8d50: 0) at ringbuffer.c:366
#3 0x0000000000482266 in cTSBuffer::Get (this=0x2c65690) at device.c:1876
#4 0x00007f5c80e30b7d in cStreamdevFilters::Action() () from /usr/lib/vdr/plugins/libvdr-streamdev-client.so.2.0.0
#5 0x000000000050c41d in cThread::StartThread (Thread=0x2554b50) at thread.c:262
#6 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x0000000000000000 in ?? ()
Thread 13 (Thread 0x7f5c772a0700 (LWP 5596)):
#0 0x00007f5c85d8964d in pthread_rwlock_timedwrlock () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000000000050bd25 in cRwLock::Lock (this=0x7831a0, Write=true, TimeoutMs=10) at thread.c:164
#2 0x000000000049fd78 in cSchedulesLock::cSchedulesLock (this=0x7f5c7729ed7e, WriteLock=<optimized out>, TimeoutMs=<optimized out>) at epg.c:1206
#3 0x000000000049b1d7 in cEitFilter::Process (this=0x2544980, Pid=18, Tid=80 'P', Data=0x7f5c7729ee30 "P\373\331D\266\365P\370\004S", Length=<optimized out>) at eit.c:389
#4 0x00000000004e791c in cSectionHandler::Action (this=0x2554bd0) at sections.c:211
#5 0x000000000050c41d in cThread::StartThread (Thread=0x2554bd0) at thread.c:262
#6 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x0000000000000000 in ?? ()
Thread 12 (Thread 0x7f5c76a9f700 (LWP 5597)):
#0 0x00007f5c847b2313 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00000000004e7786 in cSectionHandler::Action (this=0x255a2c0) at sections.c:183
#2 0x000000000050c41d in cThread::StartThread (Thread=0x255a2c0) at thread.c:262
#3 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#4 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#5 0x0000000000000000 in ?? ()
Thread 11 (Thread 0x7f5c6effd700 (LWP 5645)):
#0 0x00007f5c847b2313 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f5c8007ac31 in ?? () from /usr/lib/x86_64-linux-gnu/libasound.so.2
#2 0x00007f5c80341b81 in AlsaThread () at audio.c:947
#3 0x00007f5c8034344a in AudioPlayHandlerThread (dummy=<optimized out>) at audio.c:2074
#4 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 10 (Thread 0x7f5c74a9b700 (LWP 5833)):
#0 0x00007f5c7a62e3d6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1 0x00007f5c7a62cefe in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x0000000000000000 in ?? ()
Thread 9 (Thread 0x7f5c2dffb700 (LWP 5834)):
#0 0x00007f5c7a62e3d6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1 0x00007f5c7a62cefe in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x0000000000000000 in ?? ()
Thread 8 (Thread 0x7f5c6dffb700 (LWP 5606)):
#0 0x00007f5c847b7033 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x0000000000514db4 in cFile::FileReady (FileDes=21, TimeoutMs=<optimized out>) at tools.c:1560
#2 0x00000000004a873f in cLircRemote::Action (this=0x25b2d70) at lirc.c:72
#3 0x000000000050c41d in cThread::StartThread (Thread=0x25b2d90) at thread.c:262
#4 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 7 (Thread 0x7f5c75a9d700 (LWP 5599)):
#0 0x00007f5c847b2313 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f5c81d30036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007f5c81d3049a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007f5c827db965 in cDBusMainLoop::do_loop(void*) () from /usr/lib/vdr/plugins/libvdr-dbus2vdr.so.2.0.0
#4 0x00007f5c81d519e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7 0x0000000000000000 in ?? ()
Thread 6 (Thread 0x7f5c2ffff700 (LWP 5643)):
#0 0x00007f5c85d8a0fe in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000000000050ba28 in cCondWait::Wait (this=0x7f5c28000b68, TimeoutMs=<optimized out>) at thread.c:71
#2 0x00000000004e599a in cRingBufferLinear::Get (this=0x7f5c28000b00, Count=@0x7f5c2fffecc0: 0) at ringbuffer.c:366
#3 0x0000000000482266 in cTSBuffer::Get (this=0x7f5c28000a80) at device.c:1876
#4 0x00007f5c80e2fb84 in cStreamdevDevice::GetTSPacket(unsigned char*&) () from /usr/lib/vdr/plugins/libvdr-streamdev-client.so.2.0.0
#5 0x0000000000485dd5 in Action (this=<optimized out>) at device.c:1673
#6 cDevice::Action (this=0x2541110) at device.c:1667
#7 0x000000000050c41d in cThread::StartThread (Thread=0x2541110) at thread.c:262
#8 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#9 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000000000 in ?? ()
Thread 5 (Thread 0x7f5c6ffff700 (LWP 5602)):
#0 0x00007f5c85d8a0fe in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000000000050ba28 in cCondWait::Wait (this=0x2518900, TimeoutMs=<optimized out>) at thread.c:71
#2 0x00007f5c7bb0565d in cUpdateWatcher::Action (this=0x25188a0) at watcher.c:105
#3 0x000000000050c41d in cThread::StartThread (Thread=0x25188a0) at thread.c:262
#4 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 4 (Thread 0x7f5c6f7fe700 (LWP 5603)):
#0 0x00007f5c847b2313 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f5c81d30036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007f5c81d3049a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007f5c822f5406 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4 0x00007f5c81d519e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7 0x0000000000000000 in ?? ()
Thread 3 (Thread 0x7f5c7629e700 (LWP 5598)):
#0 0x00007f5c847b2313 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f5c81d30036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007f5c81d3049a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007f5c827db965 in cDBusMainLoop::do_loop(void*) () from /usr/lib/vdr/plugins/libvdr-dbus2vdr.so.2.0.0
#4 0x00007f5c81d519e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7 0x0000000000000000 in ?? ()
Thread 2 (Thread 0x7f5c77aa1700 (LWP 5832)):
#0 0x00007f5c7a62e3d6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1 0x00007f5c7a62cefe in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2 0x00007f5c85d85e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x00007f5c847bdccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x0000000000000000 in ?? ()
Thread 1 (Thread 0x7f5c863f7740 (LWP 5547)):
#0 0x000000000050d71e in cTimer::IncDay (t=2325348707497949753, Days=-1) at timers.c:377
#1 0x000000000050eac6 in cTimer::Matches (this=0x337d4a0, t=1373964019, Directly=false, Margin=0) at timers.c:422
#2 0x000000000050f13b in cTimer::StopTime (this=0x337d4a0) at timers.c:512
#3 0x00007f5c78fe7f5d in cRecMenuConfirmSeriesTimer (seriesTimer=0x337d4a0, this=0x3437570) at recmenus.c:351
#4 cRecMenuManager::StateMachine (this=0x2f2dbb0, nextState=<optimized out>) at recmenumanager.c:216
#5 0x00007f5c78fe9baa in cRecMenuManager::ProcessKey (this=0x2f2dbb0, Key=kOk) at recmenumanager.c:545
#6 0x00007f5c78fe9cbe in cTvGuideOsd::ProcessKey (this=0x2e2b820, Key=<optimized out>) at tvguideosd.c:656
#7 0x000000000046dad6 in main (argc=<optimized out>, argv=<optimized out>) at vdr.c:1237
Alles anzeigen
Da beschwert er sich jetzt darüber: #0 0x000000000050d71e in cTimer::IncDay (t=2325348707497949753, Days=-1) at timers.c:377
Hi Saman,
mini hat recht, du erzeugst auf jeden Fall ein Memory Leak.
Ich erzeuge den Seriestimer mit new und übergebe diesen Timer dann mit Timers.Add(seriesTimer) an den VDR. Der kümmert sich dann um diesen Timer...
Du hingegen erzeugst den Seriestimer mit new und übergibst dann diesen Timer an den Server...auf dem Client existiert dieses Objekt aber immer noch und hängt quasi in der Luft. Das ist ein bisschen blöd, da du den ja auch nicht mit delete löschen kannst, weil man die Infos vom Timer ja später noch für die Bestätigungsnachricht benötigt.
Vor dem
muss auf jeden Fall ein
Aber auch danach musst du dich darum kümmern, dass seriesTimer wieder gelöscht wird...vielleicht hängt das mit deinen Crashs zusammen?!
Ciao Louis
Btw: Auf dieses Problem solltest du alle deine Funktionen nochmal prüfen
Moin!
remotetimers macht schon ein delete, wenn kein Fehler auftritt, siehe Zeile 10.
Wenn vor dem "seriesTimer = rt.timer" noch mal ein delete aufgerufen wird, wird's doppelt gelöscht, das ergibt dann auch einen Fehler.
Da hilft nichts, man muss alle möglichen Pfade einmal durchchecken, wer was wann löscht. Das hängt ja auch noch an der Konfigurationsoption "RemoteTimersSetup.addToRemote" und auch, ob ein Fehler aufgetreten ist oder nicht.
Soweit ich das überblicke, wird beim Fehler das Timer-Objekt gelöscht und der Pointer in data auf NULL gesetzt (DELETENULL-Aufruf). Scheint also so, dass remotetimers die Verantwortung über das timer-Objekt übernimmt.
Im Endeffekt heißt es eigentlich, dass "cRecManager::CreateSeriesTimer" ggf. NULL zurückgeben kann, berücksichtigt ihr das?
Lars.
Jo Lars das klingt vernünftg
Die Frage ist, ob DELETENULL das Objekt dann auch explizit auf NULL setzt, es klingt schwer danach...falls nicht müsstest du im Falle eines Remotetimers explizit NULL in der Funktion CreateSeriesTimer zurückgeben.
In der recmenus.c müsste das Objekt cRecMenuConfirmSeriesTimer ab Zeile 320 dann wiefolgt aussehen:
class cRecMenuConfirmSeriesTimer: public cRecMenu {
public:
cRecMenuConfirmSeriesTimer(cTimer *seriesTimer) {
SetWidthPercent(50);
cString message = tr("Series Timer created");
cString infoText = message;
if (seriesTimer) {
cString days = cTimer::PrintDay(seriesTimer->Day(), seriesTimer->WeekDays(), true);
infoText = cString::sprintf("%s\n%s, %s: %s, %s: %s", *message, *days, tr("Start"), *TimeString(seriesTimer->StartTime()), tr("Stop"), *TimeString(seriesTimer->StopTime()));
}
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
infoItem->CalculateHeight(width - 2 * border);
AddMenuItem(infoItem);
AddMenuItem(new cRecMenuItemButton(tr("OK"), rmsClose, true, true));
CalculateHeight();
CreatePixmap();
Arrange();
};
Alles anzeigen
So wird bei einem remotetimers Seriestimer keine genaue Info über den Timer ausgegeben...aber damit sollte man leben können.
Ciao Louis
Moin!
So sieht DELETENULL in vdr/tools.h aus:
Der Pointer wird temporär gemerkt, der ursprüngliche auf NULL gesetzt und dann das Objekt gelöscht. rt.timer müsste also NULL enthalten, der wird dann auch durch die Zuweisung nach seriesTimer kopiert.
Zu der Bemerkung "Seit ich das 'seriesTimer = rt.timer' drinn habe, ist er mir auch nicht mehr abgeschmiert." wird es auch klar: seriesTimer hat auf ein ungültiges Objekt gezeigt, dann kann alles passieren. Wenn der Speicher noch nicht überschrieben wurde, sieht der Code ein Timer-Objekt. Wenn der Speicher in der Zwischenzeit allerdings neu benutzt wurde, steht da irgendwas drin. Ein Wunder, dass er nicht immer abgeschmiert ist...
Lars.
Ich hab jetzt in den letzten Tagen wirklich viiiiele Timer gesetzt, gelöscht, deaktiviert und wieder aktiviert. Probleme macht nur das setzen der Serientimer.
cRecMenuConfirmSeriesTimer habe ich bei mir geändert und werde testen.
Bums...
Crashlog from Tue Jul 16 12:47:07 CEST 2013
----------------------------------
Environment details:
TERM=linux
EXIT_SIGNAL=SEGV
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
PWD=/
JOB=vdr
RESULT=failed
SHLVL=1
PROCESS=main
UPSTART_INSTANCE=
UPSTART_EVENTS=stopped
UPSTART_JOB=vdr-dbg
INSTANCE=
_=/usr/bin/env
Backtrace:
----------
[New LWP 1060]
[New LWP 1340]
[New LWP 1344]
[New LWP 1349]
[New LWP 1392]
[New LWP 1583]
[New LWP 1918]
[New LWP 1917]
[New LWP 1395]
[New LWP 1337]
[New LWP 1336]
[New LWP 1916]
[New LWP 1676]
[New LWP 1355]
[New LWP 1660]
[New LWP 1391]
[New LWP 1396]
[New LWP 1584]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `vdr-dbg --lirc=/var/run/lirc/lircd -v /srv/vdr/video.00 -c /var/lib/vdr -L /usr'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f24a93688e0 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#0 0x00007f24a93688e0 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f24a936a796 in strftime_l () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x0000000000513425 in TimeString (t=5784064778432694612) at tools.c:1124
#3 0x00007f249dbcffc8 in cRecMenuConfirmSeriesTimer (seriesTimer=0x373d070, this=0x3646060) at recmenus.c:353
#4 cRecMenuManager::StateMachine (this=0x2c6b4b0, nextState=<optimized out>) at recmenumanager.c:216
#5 0x00007f249dbd1bda in cRecMenuManager::ProcessKey (this=0x2c6b4b0, Key=kOk) at recmenumanager.c:545
#6 0x00007f249dbd1cee in cTvGuideOsd::ProcessKey (this=0x2bf3c10, Key=<optimized out>) at tvguideosd.c:656
#7 0x000000000046dad6 in main (argc=<optimized out>, argv=<optimized out>) at vdr.c:1237
[New LWP 1060]
[New LWP 1340]
[New LWP 1344]
[New LWP 1349]
[New LWP 1392]
[New LWP 1583]
[New LWP 1918]
[New LWP 1917]
[New LWP 1395]
[New LWP 1337]
[New LWP 1336]
[New LWP 1916]
[New LWP 1676]
[New LWP 1355]
[New LWP 1660]
[New LWP 1391]
[New LWP 1396]
[New LWP 1584]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `vdr-dbg --lirc=/var/run/lirc/lircd -v /srv/vdr/video.00 -c /var/lib/vdr -L /usr'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f24a93688e0 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#0 0x00007f24a93688e0 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f24a936a796 in strftime_l () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x0000000000513425 in TimeString (t=5784064778432694612) at tools.c:1124
#3 0x00007f249dbcffc8 in cRecMenuConfirmSeriesTimer (seriesTimer=0x373d070, this=0x3646060) at recmenus.c:353
#4 cRecMenuManager::StateMachine (this=0x2c6b4b0, nextState=<optimized out>) at recmenumanager.c:216
#5 0x00007f249dbd1bda in cRecMenuManager::ProcessKey (this=0x2c6b4b0, Key=kOk) at recmenumanager.c:545
#6 0x00007f249dbd1cee in cTvGuideOsd::ProcessKey (this=0x2bf3c10, Key=<optimized out>) at tvguideosd.c:656
#7 0x000000000046dad6 in main (argc=<optimized out>, argv=<optimized out>) at vdr.c:1237
Detailed Backtrace with Threads
[New LWP 1060]
[New LWP 1340]
[New LWP 1344]
[New LWP 1349]
[New LWP 1392]
[New LWP 1583]
[New LWP 1918]
[New LWP 1917]
[New LWP 1395]
[New LWP 1337]
[New LWP 1336]
[New LWP 1916]
[New LWP 1676]
[New LWP 1355]
[New LWP 1660]
[New LWP 1391]
[New LWP 1396]
[New LWP 1584]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `vdr-dbg --lirc=/var/run/lirc/lircd -v /srv/vdr/video.00 -c /var/lib/vdr -L /usr'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f24a93688e0 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
Thread 18 (Thread 0x7f24927fc700 (LWP 1584)):
#0 0x00007f24a939a313 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x0000000000513b75 in cPoller::Poll (this=<optimized out>, TimeoutMs=<optimized out>) at tools.c:1380
#2 0x000000000048237a in cTSBuffer::Action (this=0x7f2468000a80) at device.c:1853
#3 0x000000000050c41d in cThread::StartThread (Thread=0x7f2468000a88) at thread.c:262
#4 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 17 (Thread 0x7f2493fff700 (LWP 1396)):
#0 0x00007f24aa9720fe in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000000000050ba28 in cCondWait::Wait (this=0x1e69678, TimeoutMs=<optimized out>) at thread.c:71
#2 0x00000000004e599a in cRingBufferLinear::Get (this=0x1e69610, Count=@0x7f2493ffed50: 0) at ringbuffer.c:366
#3 0x0000000000482266 in cTSBuffer::Get (this=0x251db40) at device.c:1876
#4 0x00007f24a5a18b7d in cStreamdevFilters::Action() () from /usr/lib/vdr/plugins/libvdr-streamdev-client.so.2.0.0
#5 0x000000000050c41d in cThread::StartThread (Thread=0x1e116f0) at thread.c:262
#6 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x0000000000000000 in ?? ()
Thread 16 (Thread 0x7f249c689700 (LWP 1391)):
#0 0x00007f24aa9720fe in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000000000050ba28 in cCondWait::Wait (this=0x1e69cc0, TimeoutMs=<optimized out>) at thread.c:71
#2 0x00007f249d8dcaa1 in cConflictCheckThread::Action() () from /usr/lib/vdr/plugins/libvdr-epgsearch.so.2.0.0
#3 0x000000000050c41d in cThread::StartThread (Thread=0x1e69c50) at thread.c:262
#4 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 15 (Thread 0x7f2499e84700 (LWP 1660)):
#0 0x00007f24a937184d in nanosleep () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f24a939f784 in usleep () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007f24a4f2303e in VdpauDisplayHandlerThread () at video.c:8747
#3 0x00007f24a4f278e1 in VideoDisplayHandlerThread (dummy=<optimized out>) at video.c:9593
#4 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 14 (Thread 0x7f2499683700 (LWP 1355)):
#0 0x00007f24aa9720fe in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000000000050ba28 in cCondWait::Wait (this=0x1dcf940, TimeoutMs=<optimized out>) at thread.c:71
#2 0x00007f24a06ed65d in cUpdateWatcher::Action (this=0x1dcf8e0) at watcher.c:105
#3 0x000000000050c41d in cThread::StartThread (Thread=0x1dcf8e0) at thread.c:262
#4 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 13 (Thread 0x7f2492ffd700 (LWP 1676)):
#0 0x00007f24a939a313 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f24a4c62c31 in ?? () from /usr/lib/x86_64-linux-gnu/libasound.so.2
#2 0x00007f24a4f29b81 in AlsaThread () at audio.c:947
#3 0x00007f24a4f2b44a in AudioPlayHandlerThread (dummy=<optimized out>) at audio.c:2074
#4 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 12 (Thread 0x7f2491ffb700 (LWP 1916)):
#0 0x00007f249f2163d6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1 0x00007f249f214efe in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x0000000000000000 in ?? ()
Thread 11 (Thread 0x7f249d68b700 (LWP 1336)):
#0 0x00007f24aa97164d in pthread_rwlock_timedwrlock () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000000000050bd25 in cRwLock::Lock (this=0x7831a0, Write=true, TimeoutMs=10) at thread.c:164
#2 0x000000000049fd78 in cSchedulesLock::cSchedulesLock (this=0x7f249d689d7e, WriteLock=<optimized out>, TimeoutMs=<optimized out>) at epg.c:1206
#3 0x000000000049b1d7 in cEitFilter::Process (this=0x1e11640, Pid=18, Tid=78 'N', Data=0x7f249d689e30 "N\361\020Dc\313\001\001\004S", Length=<optimized out>) at eit.c:389
#4 0x00000000004e791c in cSectionHandler::Action (this=0x1e11770) at sections.c:211
#5 0x000000000050c41d in cThread::StartThread (Thread=0x1e11770) at thread.c:262
#6 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x0000000000000000 in ?? ()
Thread 10 (Thread 0x7f249ce8a700 (LWP 1337)):
#0 0x00007f24a939a313 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00000000004e7786 in cSectionHandler::Action (this=0x1e083e0) at sections.c:183
#2 0x000000000050c41d in cThread::StartThread (Thread=0x1e083e0) at thread.c:262
#3 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#4 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#5 0x0000000000000000 in ?? ()
Thread 9 (Thread 0x7f2498d81700 (LWP 1395)):
#0 0x00007f24a939a313 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x0000000000513b75 in cPoller::Poll (this=<optimized out>, TimeoutMs=<optimized out>) at tools.c:1380
#2 0x000000000048237a in cTSBuffer::Action (this=0x251db40) at device.c:1853
#3 0x000000000050c41d in cThread::StartThread (Thread=0x251db48) at thread.c:262
#4 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 8 (Thread 0x7f2490dd7700 (LWP 1917)):
#0 0x00007f249f2163d6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1 0x00007f249f214efe in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x0000000000000000 in ?? ()
Thread 7 (Thread 0x7f24915d8700 (LWP 1918)):
#0 0x00007f249f2163d6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1 0x00007f249f214efe in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x0000000000000000 in ?? ()
Thread 6 (Thread 0x7f24937fe700 (LWP 1583)):
#0 0x00007f24aa9720fe in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000000000050ba28 in cCondWait::Wait (this=0x7f2468000b68, TimeoutMs=<optimized out>) at thread.c:71
#2 0x00000000004e599a in cRingBufferLinear::Get (this=0x7f2468000b00, Count=@0x7f24937fdcc0: 0) at ringbuffer.c:366
#3 0x0000000000482266 in cTSBuffer::Get (this=0x7f2468000a80) at device.c:1876
#4 0x00007f24a5a17b84 in cStreamdevDevice::GetTSPacket(unsigned char*&) () from /usr/lib/vdr/plugins/libvdr-streamdev-client.so.2.0.0
#5 0x0000000000485dd5 in Action (this=<optimized out>) at device.c:1673
#6 cDevice::Action (this=0x1df81c0) at device.c:1667
#7 0x000000000050c41d in cThread::StartThread (Thread=0x1df81c0) at thread.c:262
#8 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#9 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000000000 in ?? ()
Thread 5 (Thread 0x7f249ae86700 (LWP 1392)):
#0 0x00007f24a939f033 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x0000000000514db4 in cFile::FileReady (FileDes=5, TimeoutMs=<optimized out>) at tools.c:1560
#2 0x00000000004a873f in cLircRemote::Action (this=0x1e69510) at lirc.c:72
#3 0x000000000050c41d in cThread::StartThread (Thread=0x1e69530) at thread.c:262
#4 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 4 (Thread 0x7f249a685700 (LWP 1349)):
#0 0x00007f24a939a313 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f24a6918036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007f24a691849a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007f24a6edd406 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4 0x00007f24a69399e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7 0x0000000000000000 in ?? ()
Thread 3 (Thread 0x7f249b687700 (LWP 1344)):
#0 0x00007f24a939a313 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f24a6918036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007f24a691849a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007f24a73c3965 in cDBusMainLoop::do_loop(void*) () from /usr/lib/vdr/plugins/libvdr-dbus2vdr.so.2.0.0
#4 0x00007f24a69399e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7 0x0000000000000000 in ?? ()
Thread 2 (Thread 0x7f249be88700 (LWP 1340)):
#0 0x00007f24a939a313 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f24a6918036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007f24a691849a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007f24a73c3965 in cDBusMainLoop::do_loop(void*) () from /usr/lib/vdr/plugins/libvdr-dbus2vdr.so.2.0.0
#4 0x00007f24a69399e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007f24aa96de9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00007f24a93a5ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7 0x0000000000000000 in ?? ()
Thread 1 (Thread 0x7f24aafdf740 (LWP 1060)):
#0 0x00007f24a93688e0 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f24a936a796 in strftime_l () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x0000000000513425 in TimeString (t=5784064778432694612) at tools.c:1124
#3 0x00007f249dbcffc8 in cRecMenuConfirmSeriesTimer (seriesTimer=0x373d070, this=0x3646060) at recmenus.c:353
#4 cRecMenuManager::StateMachine (this=0x2c6b4b0, nextState=<optimized out>) at recmenumanager.c:216
#5 0x00007f249dbd1bda in cRecMenuManager::ProcessKey (this=0x2c6b4b0, Key=kOk) at recmenumanager.c:545
#6 0x00007f249dbd1cee in cTvGuideOsd::ProcessKey (this=0x2bf3c10, Key=<optimized out>) at tvguideosd.c:656
#7 0x000000000046dad6 in main (argc=<optimized out>, argv=<optimized out>) at vdr.c:1237
[New LWP 10093]
[New LWP 10146]
[New LWP 10149]
[New LWP 10190]
[New LWP 10189]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `vdr-dbg --lirc=/var/run/lirc/lircd -v /srv/vdr/video.00 -c /var/lib/vdr -L /usr'.
Program terminated with signal 6, Aborted.
#0 0x00007f8c03306425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#0 0x00007f8c03306425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f8c03309b8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007f8c0334439e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007f8c0334eb96 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x00007f8bf801501e in cPluginChannellists::~cPluginChannellists (this=0xa89b00, __in_chrg=<optimized out>) at channellists.c:219
#5 0x00007f8bf8015039 in cPluginChannellists::~cPluginChannellists (this=0xa89b00, __in_chrg=<optimized out>) at channellists.c:220
#6 0x00000000004d56c5 in cDll::~cDll (this=0x9b9590, __in_chrg=<optimized out>) at plugin.c:193
#7 0x00000000004d5719 in cDll::~cDll (this=0x9b9590, __in_chrg=<optimized out>) at plugin.c:205
#8 0x0000000000515af4 in cListBase::Del (this=0x7fff47a23310, Object=0x9b9590, DeleteObject=true) at tools.c:1988
#9 0x00000000004d6ac6 in cPluginManager::Shutdown (this=0x7fff47a232f0, Log=<optimized out>) at plugin.c:524
#10 0x000000000046c77a in main (argc=<optimized out>, argv=<optimized out>) at vdr.c:1438
[New LWP 10093]
[New LWP 10146]
[New LWP 10149]
[New LWP 10190]
[New LWP 10189]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `vdr-dbg --lirc=/var/run/lirc/lircd -v /srv/vdr/video.00 -c /var/lib/vdr -L /usr'.
Program terminated with signal 6, Aborted.
#0 0x00007f8c03306425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#0 0x00007f8c03306425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f8c03309b8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007f8c0334439e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007f8c0334eb96 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x00007f8bf801501e in cPluginChannellists::~cPluginChannellists (this=0xa89b00, __in_chrg=<optimized out>) at channellists.c:219
#5 0x00007f8bf8015039 in cPluginChannellists::~cPluginChannellists (this=0xa89b00, __in_chrg=<optimized out>) at channellists.c:220
#6 0x00000000004d56c5 in cDll::~cDll (this=0x9b9590, __in_chrg=<optimized out>) at plugin.c:193
#7 0x00000000004d5719 in cDll::~cDll (this=0x9b9590, __in_chrg=<optimized out>) at plugin.c:205
#8 0x0000000000515af4 in cListBase::Del (this=0x7fff47a23310, Object=0x9b9590, DeleteObject=true) at tools.c:1988
#9 0x00000000004d6ac6 in cPluginManager::Shutdown (this=0x7fff47a232f0, Log=<optimized out>) at plugin.c:524
#10 0x000000000046c77a in main (argc=<optimized out>, argv=<optimized out>) at vdr.c:1438
Detailed Backtrace with Threads
[New LWP 10093]
[New LWP 10146]
[New LWP 10149]
[New LWP 10190]
[New LWP 10189]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `vdr-dbg --lirc=/var/run/lirc/lircd -v /srv/vdr/video.00 -c /var/lib/vdr -L /usr'.
Program terminated with signal 6, Aborted.
#0 0x00007f8c03306425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
Thread 5 (Thread 0x7f8bed7fa700 (LWP 10189)):
#0 0x00007f8c0338f84d in nanosleep () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f8c033bd784 in usleep () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007f8bfef4103e in VdpauDisplayHandlerThread () at video.c:8747
#3 0x00007f8bfef458e1 in VideoDisplayHandlerThread (dummy=<optimized out>) at video.c:9593
#4 0x00007f8c0498be9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00007f8c033c3ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 4 (Thread 0x7f8b9ffff700 (LWP 10190)):
#0 0x00007f8c0498fd84 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007f8bfef492b8 in AudioPlayHandlerThread (dummy=<optimized out>) at audio.c:2030
#2 0x00007f8c0498be9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x00007f8c033c3ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x0000000000000000 in ?? ()
Thread 3 (Thread 0x7f8bedffb700 (LWP 10149)):
#0 0x00007f8c033b8313 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f8c00936036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007f8c0093649a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007f8c00efb406 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4 0x00007f8c009579e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007f8c0498be9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00007f8c033c3ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7 0x0000000000000000 in ?? ()
Thread 2 (Thread 0x7f8bef7fe700 (LWP 10146)):
#0 0x00007f8c049900fe in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007f8c00971925 in g_cond_wait_until () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007f8c0090c1c1 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007f8c0090c7da in g_async_queue_timeout_pop () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007f8c00958164 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007f8c009579e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007f8c0498be9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7 0x00007f8c033c3ccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x0000000000000000 in ?? ()
Thread 1 (Thread 0x7f8c04ffd740 (LWP 10093)):
#0 0x00007f8c03306425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f8c03309b8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007f8c0334439e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007f8c0334eb96 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x00007f8bf801501e in cPluginChannellists::~cPluginChannellists (this=0xa89b00, __in_chrg=<optimized out>) at channellists.c:219
#5 0x00007f8bf8015039 in cPluginChannellists::~cPluginChannellists (this=0xa89b00, __in_chrg=<optimized out>) at channellists.c:220
#6 0x00000000004d56c5 in cDll::~cDll (this=0x9b9590, __in_chrg=<optimized out>) at plugin.c:193
#7 0x00000000004d5719 in cDll::~cDll (this=0x9b9590, __in_chrg=<optimized out>) at plugin.c:205
#8 0x0000000000515af4 in cListBase::Del (this=0x7fff47a23310, Object=0x9b9590, DeleteObject=true) at tools.c:1988
#9 0x00000000004d6ac6 in cPluginManager::Shutdown (this=0x7fff47a232f0, Log=<optimized out>) at plugin.c:524
#10 0x000000000046c77a in main (argc=<optimized out>, argv=<optimized out>) at vdr.c:1438
Alles anzeigen
Mir ist jetzt noch aufgefallen, das Tage und Zeiten im Bestätigungsfenster manchmal nicht korrekt sind.
Im Timermenü passt dann aber alles.
Das würde auch dazu passen:
Ist eigentlich klar, der seriesTimer Pointer ist nicht explizit auf NULL gesetzt, sonst würde dieser Codeblock mit dem TimeString() aus dem Crashlog doch gar nicht ausgeführt.
Setze doch mal in der recmanager.c in der CreateSeriesTimer am Ende deines "if (tvguideConfig.useRemoteTimers && pRemoteTimers)" Zweigs ein
seriesTimer = NULL;
Dann sollte es eigentlich passen.
Ciao Louis
Habe ich gemacht:
if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
RemoteTimers_Timer_v1_0 rt;
rt.timer = seriesTimer;
if (pRemoteTimers->Service("RemoteTimers::NewTimer-v1.0", &rt)) {
isyslog("remotetimer %s added (active)", *rt.timer->ToDescr());
seriesTimer = rt.timer;
} else {
isyslog("%s", *rt.errorMsg);
}
cString errorMsg;
if (!pRemoteTimers->Service("RemoteTimers::RefreshTimers-v1.0", &errorMsg)) {
esyslog("tvguide: %s", *errorMsg);
}
seriesTimer = NULL;
} else {
Timers.Add(seriesTimer);
Timers.SetModified();
}
return seriesTimer;
Alles anzeigen
Damit gibt es am Client natürlich nur noch ein 'Serientimer wurde angelegt', dafür bis jetzt aber noch keinen Absturz.
Für mich wäre das ein brauchbarer Kompromis. Ich teste aber noch ein bisschen.
Zeile 6 kannst du dann entfernen.
Lars.
Ja, die kann dann natürlich noch raus.
der Vollständikeit halber noch mal komplett
cTimer *cRecManager::CreateSeriesTimer(cRecMenu *menu) {
bool active = menu->GetBoolValue(1);
int channelNumber = menu->GetIntValue(2);
int start = menu->GetIntValue(3);
int stop = menu->GetIntValue(4);
int weekdays = menu->GetIntValue(5);
time_t tday = menu->GetTimeValue(6);
int prio = menu->GetIntValue(7);
int lifetime = menu->GetIntValue(8);
cChannel *channel = Channels.GetByNumber(channelNumber);
cTimer *seriesTimer = new cTimer(false, false, channel);
seriesTimer->SetDay(tday);
seriesTimer->SetStart(start);
seriesTimer->SetStop(stop);
seriesTimer->SetPriority(prio);
seriesTimer->SetLifetime(lifetime);
seriesTimer->SetWeekDays(weekdays);
seriesTimer->SetFile("TITLE EPISODE");
if (active)
seriesTimer->SetFlags(tfActive);
else
seriesTimer->SetFlags(tfNone);
seriesTimer->SetEventFromSchedule();
if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
RemoteTimers_Timer_v1_0 rt;
rt.timer = seriesTimer;
if (pRemoteTimers->Service("RemoteTimers::NewTimer-v1.0", &rt))
isyslog("remotetimer %s added (active)", *rt.timer->ToDescr());
else
isyslog("%s", *rt.errorMsg);
cString errorMsg;
if (!pRemoteTimers->Service("RemoteTimers::RefreshTimers-v1.0", &errorMsg))
esyslog("tvguide: %s", *errorMsg);
seriesTimer = NULL;
} else {
Timers.Add(seriesTimer);
Timers.SetModified();
}
return seriesTimer;
}
Alles anzeigen
30 Serientimer später habe ich immer noch keinen Absturz.
Allerdings intressiert es mich schon, warum das mit der Rückgabe von seriesTimer nicht funktioniert... aber gut.
Saman: na dann passt es doch. Ich denke auch dass man mit der eingeschränkten Bestätigung leben kann. Sicherlich könnte man das auch noch einbauen, aber schlimm finde ich es nicht.
Warum es nicht funktioniert ist eigentlich klar: mit "rt.timer = seriesTimer;" zeigen beide Timer-Pointer auf das ursprüngliche seriesTimer Objekt. Du übergibst dem remotetimers Plugin den rt.timer Pointer, und das remotetimers Plugin führt intern ein delete auf diesen Pointer aus. Nach Zeile 30 zeigt also der seriesTimer Pointer auf freigegebenen Speicher. Wie Lars schon geschrieben hat, solange der Speicher nicht überschrieben wird, funktioniert alles, wird aber in der Zeit, bis das Confirmation Fenster ausgegeben wird, dieser Speicherbereich von jemand anderem überschrieben, dann kann da sonstwas stehen und es kracht gewaltig. Das setzen des "seriesTimer = NULL" ist notwendig, da der Pointer ja immer noch auf den ursprünglichen Speicherbereich zeigt...
Wenn du die ursprüngliche Ausgabe des Confirmation Fensters erhalten willst, müsstest du eigentlich nur ein zweites Timer Objekt als eine Kopie des seriesTimer Objekts erzeugen (also wirklich neu, in einem eigenen Speicherbereich auf dem Heap) und das dann zurückgeben. Das müsstest du dann allerdings auch selbstständig wieder per delete Löschen, nachdem das Confirmation Fenster angezeigt worden ist.
Ciao Louis
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!