PDA

View Full Version : [ViX_Misc] Crash when recording IPTV from G-EPG



dsayers
03-02-18, 23:36
Hi I posted about EPG in channel selection screen using reference 5002 http://www.world-of-satellite.com/showthread.php?58875-IPTV-EPG-(5002)-In-channel-selection-screen so im not sure if this is related.

When I try recording IPTV via Graphical EPG pressing the record button I get a crash see attached log. I was using a modified EpgSelection.py so I changed it back to the original from here https://raw.githubusercontent.com/OpenViX/enigma2/master/lib/python/Screens/EpgSelection.py the attached crash log is from using the EpgSelection.py from GitHub.

abu baniaz
04-02-18, 00:40
Posting fore reference/search pruposes


< 29363.537> [InfoBarGenerics] KEY: 167 RECORD
< 29363.537> [ActionMap] InfobarInstantRecord ShortRecord
< 29363.541> [Skin] processing screen RecordTimerQuestion:
< 29363.544> Traceback (most recent call last):
< 29363.544> File "/usr/lib/enigma2/python/Components/ActionMap.py", line 48, in action
< 29363.544> File "/usr/lib/enigma2/python/Screens/EpgSelection.py", line 1012, in recButtonPressed
< 29363.544> self.RecordTimerQuestion()
< 29363.545> File "/usr/lib/enigma2/python/Screens/EpgSelection.py", line 1004, in RecordTimerQuestion
< 29363.545> posy = self['list'].getSelectionPosition(serviceref)
< 29363.545> File "/usr/lib/enigma2/python/Components/EpgList.py", line 1125, in getSelectionPosition
< 29363.545> TypeError: int() argument must be a string or a number, not 'NoneType'
< 29363.545> [ePyObject] (CallObject(<bound method HelpableActionMap.action of <Components.ActionMap.HelpableActionMap instance at 0x8b896fd0>>,('InfobarInstantRecord', 'ShortRecord')) failed)

dsayers
04-02-18, 01:18
Just seen this post http://www.world-of-satellite.com/showthread.php?58644-Crash-log-attached-re-recording-crashes and the issues are similar apart from mine are set to 5002

dsayers
04-02-18, 02:06
Just seen this post http://www.world-of-satellite.com/showthread.php?58644-Crash-log-attached-re-recording-crashes and the issues are similar apart from mine are set to 5002

To add I get no crash when pressing green button but when pressing green again it says "error you didn't select a channels to record from" I then press exit and this brings up bouquet list the bouquet list when pressing TV button so I open the iptv bouquet and choose the channel and I get the same error. This is making me think it's related to no EPG data displayed in channel selection screen issues.

dsayers
04-02-18, 12:00
I'm starting to think enigma2 isn't good for ref 5002 at the minute as I'm also having issues with live bouquets disappearing on ABM scan but keeping VOD that uses 4097. Live bouquets stay if I use 1:0:1

duoduo
04-02-18, 13:43
How are you producing epg and bouquets?

dsayers
04-02-18, 14:05
How are you producing epg and bouquets?

With IPTV bouquet Maker but modified to all IPTV type to use ref 5002. And importing data via EPG Import.

birdman
04-02-18, 14:31
Just seen this post http://www.world-of-satellite.com/showthread.php?58644-Crash-log-attached-re-recording-crashes and the issues are similar apart from mine are set to 5002They are, in fact, identical to the extent that both are having an issue determining which service(channel) your selection is on in the Graphical EPG. It's trying to look up the serviceref in a list to get an index number, but can't find the serviceref.

bbbuk
04-02-18, 16:11
I can re-create this...

I use ABM and it's feature of replacing DVB stream with an IPTV stream for those channels that are dark. Recording, etc works fine because in the bouquets the service type is is 1: (ie start with 1: )

However, I specifically edited one channel within bouquets and renamed it to 4097: (ie use gstreamer) and if you press <rec> from within GEPG it crashes.

It doesn't do this when trying to record this one channel whilst in live TV mode (rather than GEPG), nor does it crash when trying to use <rec> within GEPG for other channels (that have 1: service reference).

I also noticed that whilst watching a channel with service type other than 1: and I press the EPG button to bring up GEPG, the channel it defaults to on GEPG is the first channel rather than the channel I'm actually viewing.

However, if I switch to any channel with service type of 1:, then it defaults to current channel I'm watching when GEPG is displayed.

It has trouble parsing the serviceref because it isn't a service type of 1:

dsayers
05-02-18, 01:08
Ok flashed OpenATV as I know EPG data is displayed in channel selection screen, I still cant record when pressing record but it does come up with Add Timer/ Add Auto Timer I choose Add Timer and I get: Timer sanity error channel not in service list.

55984

I still cant record but atleast I get an error instead of a crash. Hopefully the makefile changes will sort this.

birdman
05-02-18, 03:21
I use ABM and it's feature of replacing DVB stream with an IPTV stream for those channels that are dark. Could you post an example of such a line from a bouquet file? Then I could try to reproduce the bug.

duoduo
05-02-18, 08:37
I have asked others on a different forum that use wooshbuild about the record facility and they gave no issues? I thought WB uses openatv image.

dsayers
05-02-18, 11:31
I have asked others on a different forum that use wooshbuild about the record facility and they gave no issues? I thought WB uses openatv image.

Using iptv type's 5002 or 4097?

dsayers
05-02-18, 12:16
Could you post an example of such a line from a bouquet file? Then I could try to reproduce the bug.

This is from ABM CustomMix feature I just replaced the first 1 with 5002 for Sky Atlantic HD on 108 in the userbouquet.abm.sat_282_sky_uk.101.tv file.


#SERVICE 5002:0:19:f0d:7f1:2:11a0000:0:0:0:http%3a//host.net%3a80/live/email/password/11.ts:Sky Atlantic HD

birdman
05-02-18, 14:19
This is from ABM CustomMix feature I just replaced the first 1 with 5002 for Sky Atlantic HD on 108 in the userbouquet.abm.sat_282_sky_uk.101.tv file.


#SERVICE 5002:0:19:f0d:7f1:2:11a0000:0:0:0:http%3a//host.net%3a80/live/email/password/11.ts:Sky Atlantic HDThanks. Not what I was expecting, but it's pointed me in the right direction.
I actually need a channel that I can not only stream, but also have EPG data for (otherwise the Record button does nothing).
I've managed to set this up for BBC Radio Four, and have reproduced the crash....

birdman
05-02-18, 16:01
OK. Clearly haven't been engaging brain here...

The issue is (and has been noted for a while) that it looks up the service ref in a list (should be the currently displayed list) and fails to find it.

def getIndexFromService(self, serviceref):
if serviceref is not None:
for x in range(len(self.list)):
if str(self.list[x][0]).startswith('1:'): # check for Graphical EPG
if CompareWithAlternatives(self.list[x][0], serviceref.toString()):
return x
elif str(self.list[x][1]).startswith('1:'): # check for Multi EPG
if CompareWithAlternatives(self.list[x][1], serviceref.toString()):
return x
else:
return None
return None
It doesn't take much to see that entries are only checked if they start with "1:". So if your entry starts with anything else (such as "4097:"...) it won't be found, None will be returned and the caller will crash trying to convert this to an integer. Also note that it will crash if any entry before the one you are on starts with something other than "1:".

I can't see why the "1:" test is there. I've added debug statements and the list just contains the full service entry in [0], and the final element (channel name) in [1].

I'll see what happens if I remove that part of the test.. Will have to wait, as I've actually got a recording about to start - just happens to be on the "real" version of the IPTV entry I managed to set -up.

dsayers
05-02-18, 16:34
OK. Clearly haven't been engaging brain here...

The issue is (and has been noted for a while) that it looks up the service ref in a list (should be the currently displayed list) and fails to find it.

def getIndexFromService(self, serviceref):
if serviceref is not None:
for x in range(len(self.list)):
if str(self.list[x][0]).startswith('1:'): # check for Graphical EPG
if CompareWithAlternatives(self.list[x][0], serviceref.toString()):
return x
elif str(self.list[x][1]).startswith('1:'): # check for Multi EPG
if CompareWithAlternatives(self.list[x][1], serviceref.toString()):
return x
else:
return None
return None
It doesn't take much to see that entries are only checked if they start with "1:". So if your entry starts with anything else (such as "4097:"...) it won't be found, None will be returned and the caller will crash trying to convert this to an integer. Also note that it will crash if any entry before the one you are on starts with something other than "1:".

I can't see why the "1:" test is there. I've added debug statements and the list just contains the full service entry in [0], and the final element (channel name) in [1].

I'll see what happens if I remove that part of the test.. Will have to wait, as I've actually got a recording about to start - just happens to be on the "real" version of the IPTV entry I managed to set -up.

Fixed crash I just had a quick look at what OpenATV has replaced none with 0



def getIndexFromService(self, serviceref):
if serviceref is not None:
for x in range(len(self.list)):
if str(self.list[x][0]).startswith('1:'):
if CompareWithAlternatives(self.list[x][0], serviceref.toString()):
return x
elif str(self.list[x][1]).startswith('1:'):
if CompareWithAlternatives(self.list[x][1], serviceref.toString()):
return x
else:
return 0

return 0


Now I get the same Timer sanity error with 5002 but would be good to get around the '1:' check

55985

birdman
05-02-18, 17:13
Fixed crash I just had a quick look at what OpenATV has replaced none with 0Not necessarily a good idea. I hope they also changed moveToService(), which in ViX checks for None being returned and changes it to 0.

Anyway, the odd thing is that the caller is in a block of 5 if statements whose code differ according to the type of EPG view you are in.
The first two call:
indx = int(self.getIndexFromService(serviceref))but the other three call:
indx = int(self.l.getCurrentSelectionIndex())From what I can see the SelectionIndex is always set, and always has the correct value. So I can't see why the lookup of serviceref is there at all!

So my fix would be to simplify the if block (since indx setting is now common) and change getIndexFromService() to not check for "1:" (it has other callers...).

birdman
05-02-18, 17:51
So my fix would be to simplify the if block (since indx setting is now common) and change getIndexFromService() to not check for "1:" (it has other callers...).If anyone wishes to try it (seems to work for me..) here's the changed source file:
55986
It needs to be put into /usr/lib/enigma2/python/Components (and keep a copy of the current EpgList.pyo file that is there so you can revert if you need to - you'll have to delete the source file after testing anyway).

dsayers
05-02-18, 18:21
If anyone wishes to try it (seems to work for me..) here's the changed source file:
55986
It needs to be put into /usr/lib/enigma2/python/Components (and keep a copy of the current EpgList.pyo file that is there so you can revert if you need to - you'll have to delete the source file after testing anyway).

Thanks thats solved the crash I just get the same Timer sanity error as in post 17. Ill try 4097 ref tomorrow

birdman
05-02-18, 18:44
Thanks thats solved the crash I just get the same Timer sanity error as in post 17. Ill try 4097 ref tomorrowOK. I'll submit a PR to get it into the default image.

duoduo
05-02-18, 19:01
Thank you for trying to sort this guys, very much appreciated

birdman
05-02-18, 19:03
OK. I'll submit a PR to get it into the default image.EDIT:

https://github.com/OpenViX/enigma2/pull/215

PS: This code isn't to do with working out what to record; it's just working out where to post the Add Timer/Add Autotimer overlay.