Bug #765
closedvdrmanager-plugin failed if none channel into recording defined
Added by anbr about 13 years ago. Updated about 13 years ago.
0%
Description
Hello,
the VDR-part (vdrmanager-plugin) failed, if none channel into recording defined.
#0 __strlen_sse2_bsf () at ../sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S:52 #1 0xb75df702 in std::string::operator+=(char const*) () from /usr/lib/i386-linux-gnu/libstdc++.so.6 #2 0xb53e2f1b in cHelpers::ToText (recording=0x9ce5ef8) at helpers.cpp:366 #3 0xb53e175d in cHelpers::GetRecordingsIntern () at helpers.cpp:92 #4 0xb53e43cd in cHelpers::Trim (text=...) at helpers.cpp:596 #5 0xb53e0ddb in cHelpers::GetRecordings (args=...) at helpers.cpp:19 #6 0xb53e08d6 in cHandler::HandleClientRequest (this=0x9bc9110, sock=0x9cd6948) at handler.cpp:84 #7 0xb53e00d0 in cSelect::Poll (this=0x9ee1cc8) at select.cpp:172 #8 0xb53dfe97 in cSelect::Action (this=0x9ee1cc8) at select.cpp:118 #9 0xb53dfa10 in cAndroVdrThread::Action (this=0xb3ca0360) at vdrmanagerthread.cpp:30 #10 0x0814e973 in cThread::StartThread (Thread=0xb3ca0360) at thread.c:257 #11 0xb7719c39 in start_thread (arg=0xae8f5b70) at pthread_create.c:304 #12 0xb747496e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
In my sample is info->channelName defined with 0x0.
(gdb) print *info $1 = {channelID = {source = 1409286144, nid = 8468, tid = 514, sid = 514, rid = 0, static InvalidID = {source = 0, nid = 0, tid = 0, sid = 0, rid = 0, static InvalidID = <same as static member of an already seen type>}}, channelName = 0x0, event = 0x9ce6f00, ownEvent = 0x9ce6f00, aux = 0x9cbdd80 "#~AT[204]", framesPerSecond = 25, priority = 99, lifetime = 99,
Me help at moment help follow small patch:
--- a/vdr-vdrmanager/helpers.cpp +++ b/vdr-vdrmanager/helpers.cpp @@ -363,7 +363,10 @@ string cHelpers::ToText(cRecording * recording){ result += buf; result += ":"; - result += info -> ChannelName(); + if(info->ChannelName()) + result += info -> ChannelName(); + else + result += "-"; result += ":"; result += MapSpecialChars(event->Title());
Andreas
Files
logging.diff (962 Bytes) logging.diff | herrlado, 11/11/2011 10:52 PM | ||
recordings.diff (2.83 KB) recordings.diff | anbr, 11/12/2011 02:58 PM |
Updated by herrlado about 13 years ago
- Status changed from New to Assigned
- Assignee set to anbr
Done, Please check.
Updated by anbr about 13 years ago
It's should work, but at moment there none recording reported from vdr-manager-plugin.
TIMERS and EPG work without problems.
I do not know why, but telnet query does not work.
#~ telnet vdr 6420 Connected to vdr.local. Escape character is '^]'. RECORDINGS DRECORDING 1 START END DRECORDING 1 START END DRECORDING 3 START END TIMERS START T0:5:21:arte:1320181200:1320184200:50:99:Breaking Bad ...
My VDR contains 1929 recordings, there i try to limit the data size like
string cHelpers::GetRecordingsIntern() { string result = "START\r\n"; // iterate through all recordings cRecording* recording = NULL; for (int i = 0; i < Recordings.Count() && i < 500; i++) { recording = Recordings.Get(i); result += ToText(recording); } return result + "END\r\n"; }
and I get the first 500 recordings ...
Updated by anbr about 13 years ago
herrlado wrote:
What is the current status?
Currently, no recordings shown. Only "Connection finished abnormal".
Updated by herrlado about 13 years ago
Can you provide logs? Try to refresh recorings view and then attach what the logcat says?
Updated by anbr about 13 years ago
herrlado wrote:
Can you provide logs? Try to refresh recorings view and then attach what the logcat says?
The vdr-manager-plugin deliver none data ...
Logcat hasen't any error-message.
[2011-11-11 19:13:32 - vdrmanager] Android Launch! [2011-11-11 19:13:32 - vdrmanager] adb is running normally. [2011-11-11 19:13:32 - vdrmanager] Performing de.bjusystems.vdrmanager.gui.VdrManagerActivity activity launch [2011-11-11 19:13:32 - vdrmanager] Automatic Target Mode: launching new emulator with compatible AVD 'Emulator_2_1' [2011-11-11 19:13:32 - vdrmanager] Launching a new emulator with Virtual Device 'Emulator_2_1' [2011-11-11 19:13:33 - vdrmanager] New emulator found: emulator-5554 [2011-11-11 19:13:33 - vdrmanager] Waiting for HOME ('android.process.acore') to be launched... [2011-11-11 19:13:55 - vdrmanager] HOME is up on device 'emulator-5554' [2011-11-11 19:13:55 - vdrmanager] Uploading vdrmanager.apk onto device 'emulator-5554' [2011-11-11 19:13:56 - vdrmanager] Installing vdrmanager.apk... [2011-11-11 19:14:13 - vdrmanager] Success! [2011-11-11 19:14:13 - vdrmanager] Starting activity de.bjusystems.vdrmanager.gui.VdrManagerActivity on device emulator-5554 [2011-11-11 19:14:15 - vdrmanager] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=de.bjusystems.vdrmanager/.gui.VdrManagerActivity }
~$ telnet vdr 6420
Trying 192.168.0.2...
Connected to vdr.
Escape character is '^]'.
RECORDINGS <--------------------- Here are none data transmitted
QUIT
Good bye! :-)
Connection closed by foreign host.
Updated by herrlado about 13 years ago
- File logging.diff logging.diff added
Could you limit recordings on say 10-20 on the server and then try? May be it takes too long? Which vdr version do you have?
Try compile the plugin with this patch (should enable logging to syslog) for records and look at logs after you try list recordings.
Updated by anbr about 13 years ago
herrlado wrote:
Could you limit recordings on say 10-20 on the server and then try? May be it takes too long? Which vdr version do you have?
Yes, i think it a runtime bug. But the bug is inside vdr-manager-plugin.
I've vdr 1.7.21 running. I have already posted that a limit to 100 recordings work.
Try compile the plugin with this patch (should enable logging to syslog) for records and look at logs after you try list recordings.
~$ telnet vdr 6420 Trying 192.168.0.2... Connected to vdr. Escape character is '^]'. RECORDINGS quit Good bye! :-) Connection closed by foreign host.
Here a reduced log ...
~$ cat /var/log/vdr.log | grep vdrmanager | head
Nov 12 11:32:16 ion vdr: [3091] loading plugin: /opt/vdr-1.7/lib/libvdr-vdrmanager.so.1.7.21 Nov 12 11:32:17 ion vdr: [3091] initializing plugin: vdrmanager (0.3): VDR-Manager support plugin Nov 12 11:32:18 ion vdr: [3091] starting plugin: vdrmanager Nov 12 11:32:36 ion vdr: [3109] vdrmanager: serialize a recording Wanted added Nov 12 11:32:36 ion vdr: [3109] vdrmanager: serialized recording 0:1303676100:1303683000:RTL Television:Wanted::Wesley Gibson ist 25 Jahre alt und eigentlich ein unscheinbarer Mitbürger, dessen Leben allerdings aus den Fugen gerät, als er plötzlich, nach dem Mord an seinem Vater die atemberaubende Fox kennenlernt, die ihm die Pforten zu einer völlig neuen Welt öffnet. Doch Fox ist nicht die, die sie vorgibt zu sein.:/var/lib/video/Wanted/2011-04-24.22.12.4-0.rec:2786#015 Nov 12 11:32:36 ion vdr: [3109] vdrmanager: serialize a recording Planet der Affen added Nov 12 11:32:36 ion vdr: [3109] vdrmanager: serialized recording 1:1313091600:1313098740:kabel eins:Planet der Affen::Sieben Monate lang ist Kommandant Taylor im Weltraum unterwegs, als er auf einem fremden Planeten notlanden muss. Auf der Erde, von der er 1978 aufgebrochen ist, sind allerdings inzwischen 2000 Jahre vergangen. Der fremde Planet wird von sprechenden Affen beherrscht, für die menschliche Wesen lediglich Versuchsobjekte sind. Das Leben von Taylor und seiner Crew ist in Gefahr. Als sie von den Affen gefangen werden, gelingt nur Taylor die Flucht ...:/var/lib/video/Planet_der_Affen/Planet_der_Affen/2011-08-11.21.37.6-0.rec:3033#015 Nov 12 11:32:36 ion vdr: [3109] vdrmanager: serialize a recording Eroberung vom Planet der Affen added Nov 12 11:32:36 ion vdr: [3109] vdrmanager: serialized recording 2:1313110740:1313115720:kabel eins:Eroberung vom Planet der Affen::1990|## Die Erde steht kurz vor einer atomaren Katastrophe. Vor zwanzig Jahren wurde das sprechende Schimpansenpaar Dr. Cornelius und Dr. Zira ermordet - nun sinnt ihr Sohn Caesar, der damals von Zirkusdirektor Armando gerettet wurde, auf Rache. Zusammen mit anderen versklavten Artgenossen plant er den Aufstand gegen die diktatorischen Menschen. Um einen Einblick in die Schaltzentrale der Macht zu erhalten, tarnt er sich als "gewöhnlicher" Affe ...:/var/lib/video/Planet_der_Affen/Eroberung_vom_Planet_der_Affen/2011-08-12.02.56.6-0.rec:2143#015 Nov 12 11:32:36 ion vdr: [3109] vdrmanager: serialize a recording Flucht vom Planet der Affen added .... Nov 12 11:32:37 ion vdr: [3109] vdrmanager: serialized recording 1235:0:0:<unknown>:Action:Außer Kontrolle:Ein Forschungslabor, in dem eine umweltfreundliche Benzinalternative gewonnen werden soll, wird in die Luft gejagt, der Projektleiter ermordet. Hauptverdächtiger ist der junge Maschinenbaustudent Eddie, der an dem Projekt mitgearbeitet hat. Auf der Flucht vor Polizei und FBI versucht er, die wahren Schuldigen zu finden und kommt dabei einer weitreichenden Verschwörung auf die Spur.:/var/lib/video/Action/Außer_Kontrolle/2010-04-09.01.54.50.99.rec:1969#015 Nov 12 11:32:37 ion vdr: [3109] vdrmanager: serialize a recording Action added Nov 12 11:32:37 ion vdr: [3109] vdrmanager: serialized recording 1236:0:0:<unknown>:Action:Der Schakal (1973):Die vorwiegend aus Ex-Militärs und Fremdenlegionären bestehende rechtsextreme französische Untergrundorganisation OAS sieht im französischen Staatspräsidenten einen Verräter, weil er Algerien nach dem Krieg in die Unabhängigkeit entließ. Zum wiederholten Male scheitert ein Attentat auf De Gaulle. Der Verschwörer Bastien-Thiry wird zum Tode verurteilt und endet vor dem Erschießungskommando. Daraufhin zieht sich die dreiköpfige Organisationsspitze um Colonel Marc Rodin in die österreichischen Berge zurück. Ein neuer Anschlag soll vorbereitet werden. Der Gruppe ist klar, dass sie auch deswegen versagt hat, weil ihre Gruppe von Spitzeln unterwandert ist und deshalb Planungen von vornherein zum Scheitern verurteilt sind.||#||#Daher beschließen die führenden Köpfe, einen Außenstehenden zu beauftragen. Rodins Wahl fällt auf einen englischen Berufskiller, der sich selbst Der Schakal nennt – ein eiskalter Profi, quasi die Verkörperung von Nietzsches „blonder Bestie“. Er taucht drei Wochen später bei der Extremistengruppe in Wien auf. Der Engländer scheint auch deswegen so geeignet, weil er über ausgezeichnete „Referenzen“ verfügt und noch nie in Frankreich tätig gewesen ist.:/var/lib/video/Action/Der_Schakal_(1973)/2008-05-31.23.10.80.99.rec:4059#015 Nov 12 11:32:37 ion vdr: [3109] vdrmanager: serialize a recording Action added Nov 12 11:32:37 ion vdr: [3109] vdrmanager: serialized recording 1237:1198980900:1198986000:<unknown>:Action:Taxi:Daniel Morales hat gerade erst seine Lizenz als Taxifahrer in Marseille erhalten. Doch der ehemalige Pizzabote fühlt sich eher zum Rennfahrer berufen.:/var/lib/video/Action/Taxi/2007-12-30.03.15.50.99.rec:2265#015 Nov 12 11:32:37 ion vdr: [3109] vdrmanager: serialize a recording Das Mercury Puzzle added
With logging it collect only 392 lines, but result stay empty.
(= ~ 180 recording there are two lines per one recording)
~$ cat /var/log/vdr.log | grep vdrmanager | wc -l 392
This should be 1964 recordings.
~$ svdrpsend.pl LSTR | grep -e ^250 | wc -l 1964
Every request got different count of logging lines, therefore should this a runtime bug.
Updated by herrlado about 13 years ago
I may be know what is the problem.
http://msdn.microsoft.com/en-us/library/sx08afx2.aspx
This is msdn but I think it may be a problem of a too long string. I will research.
Your ~2000 recordings are
Updated by anbr about 13 years ago
herrlado wrote:
I may be know what is the problem.
This MSDN article describe a preprocessor limit. I don't think that is a compiler limit !
Strings merged by standard template library (STL), this memory are dynamic allocated.
there only limited to Heap-Memory (I believe around 4GB )
See also http://www.cplusplus.com/reference/string/string/append/
Updated by anbr about 13 years ago
- File recordings.diff recordings.diff added
Hi,
i found the point, event->Title() was NULL, but SafeCall catch and hide the segfault
diff --git a/vdr-vdrmanager/helpers.cpp b/vdr-vdrmanager/helpers.cpp index f806c5f..c9578f5 100644 --- a/vdr-vdrmanager/helpers.cpp +++ b/vdr-vdrmanager/helpers.cpp @@ -479,7 +386,14 @@ string cHelpers::ToText(cRecording * recording) { } result += ":"; - result += MapSpecialChars(event->Title()); + if (event->Title()) { + result += MapSpecialChars(event->Title()); + } else { + if (info->Title()) + result += MapSpecialChars(info->Title()); + else + result += "<unnamed>"; + } result += ":"; result += MapSpecialChars(event->ShortText() ? event->ShortText() : "");
Remind, if recording moved on filesystem, event->Title() outdated ...
event->Title() come from recording/info(.vdr)
info->Title() come from Recording~Filename
Mayed is better to use info->Title().
I attach a patch with a overflow-proof sprint(buf...
Updated by herrlado about 13 years ago
- Target version changed from vdr-plugin-vdrmanager-0.2.x to vdr-plugin-vdrmanager-0.5
Updated by anbr about 13 years ago
herrlado wrote:
OK, check the repo.
Yes it's work.
But why is event->TableID() used inside 346111b6 - helpers.cpp:482 instead if(event->Title() != NULL) ?
I think it should better :
if(event->TableID() && event->Title() != NULL){ result += MapSpecialChars(event->Title());
Updated by herrlado about 13 years ago
- Target version changed from vdr-plugin-vdrmanager-0.5 to vdr-plugin-vdrmanager-0.6
This is just a typo :( Thanks. Already in the repository.
But what is better as first choice? info Title or event Title? May be we do not need event->Title() at all?
Updated by anbr about 13 years ago
herrlado wrote:
But what is better as first choice? info Title or event Title? May be we do not need event->Title() at all?
info->Title has current file name like Raumschiff Enterprise~Kennen Sie Tribbles?
event->Title has EPG-Name at recording time Raumschiff Enterprise
event->ShortText EPG-Shorttext, like Kennen Sie Tribbles? Science Fiction USA/1967
after manual edit of recording names, only info->Title has the Real-Title,
In my humble opinion, i would prefer info->Title.
Updated by herrlado about 13 years ago
Ok I'll check change it as a first choice.