kodi-pvr / pvr.vuplus

Kodi's Enigma2 client add-on
GNU General Public License v2.0
56 stars 55 forks source link

PVR manager is starting up at 0% forever #278

Open IcePlanet opened 4 years ago

IcePlanet commented 4 years ago

After installing enigma2 plugin and trying to run TV in the upper right corner there is

PVR manager is starting up 0%

and rotating circle forever. In the log I see message that channels have been loaded.

What I tried:

  1. Uninstall and install Kodi again, but the plugin is back also remembering all configuration.
  2. When I try to uninstall the plugin itself from Kodi UI it freezes and after killed by android the plugin is back with all configuration
  3. I deleted the cache from within Kodi settings (no change)

Phone used is Samsung S10 running on Android 10 Network is reachable, confirmed by opening webif Attached are logs from uninstall attempt and from the pvr manager is starting with 0% foreve

Log from PVR manager is starting up 0%: kodi_loading.log

Log from uninstall attempt: kodi_uninstall_enigma2.log

I'm not using it very often, but I'm sure some time ago (unfortunately I'm not sure how long the time is) it was working flawlessly.

phunkyfish commented 4 years ago

It looks like it's still reading the EPG data. Can you use a paste site and provide a full debug log? So a debug log from a restart until it's started up. You can use a GitHub gist of the file is large.

IcePlanet commented 4 years ago

@phunkyfish I'm not sure what are you missing in the logs. They are (as uploaded in my first message) complete. I have now downloaded them and checked sha. This is how I got them from kodi. In kodi I setup the debug log as following:

Out of curiosity I started now my notebook with Kodi, it was for sure working there, but I was long time not using it, and it has the same symptoms.

I also checked the last cca 3-5 links from the log and all are accessible and giving result.

phunkyfish commented 4 years ago

Sorry, my mistake!

phunkyfish commented 4 years ago

Can you try starting Kodi, leave it for 10 minutes and then post the debug log?

IcePlanet commented 4 years ago

This is problematic (I have already tried multiple times) because when I leave the TV screen on it freezes hard and windows kills it, I can leave it max cca 30s to 1min then I must move to another screen in kodi. On android the behavior is the same, if I have the TV screen open for long it seems on, but it's dead and I'm not even able to open the 3 buttons down, the only option that works is reboot of device via power button.

For each freeze I got this screen twice (if it helps). WerFault_2020-03-23_23-50-14

phunkyfish commented 4 years ago

That is very strange. Are you able to try a kodi 19 nightly?

IcePlanet commented 4 years ago

Yes, no problem tried: KodiSetup-20200322-6b1585df-master-x64.exe the result is still the same + new issue, kodi can not be switched off with the enigma2 plugin (seems like it is really trying to do something in background), it hangs and windows shoots it down.

BUT I have downloaded kodi-17.0-Krypton.exe (yes I know it is old but I remembered that it was working previously so wanna try), which is bringing the vu+/enigma plugin within install file and it works on first attempt flawlessly (configured IP and port that was all). TV was on in cca 10 seconds with all channels.

Is it possible to trace the changes in meantime or it is too many changes? Or is there any other way to trace the change causing this strange behavior?

phunkyfish commented 4 years ago

It’s because it never finishes starting up. Have you tried clearing the PVR database?

phunkyfish commented 4 years ago

Or deleting all setting and starting up from scratch?

IcePlanet commented 4 years ago

On Windows tried to delete everything found (The nightly and 17.0 have been both installed the same way: uninstall previous one, in total commander delete everything what 'looks like kodi' and then install), everything works until the enigma 2 is activated (situation is the same in 18 and 19).

On android as I have written previously there I'm not aware how to do clean install as the enigma2 client has survived everything tried until now.

Cleaning PVR database via 2 approaches found:

  1. Delete TV.db and epg.db (not sure about this 2nd file name)
  2. In Kodi go to setup, pvr & live, General, Clear data

None of the 2 deletions above worked in nightly or in actual stable 18.

IcePlanet commented 4 years ago

Maybe how the problem can be identified is to compare plugin from 17 (named vu+/enigma2) with new one from 18. When the 17 needs 10seconds and 18 freezes after minute (the same computer, network, box) then I believe it is worth to look at time in detail what takes how much time. I'm happy to do it, however do not know where/how to start, can someone help and guide me?

In the meantime the solution with downgrading on android did not work as the plugin can not be loaded (unknown error message), can someone please tell me where to delete and what to get rid of the new plugin?

phunkyfish commented 4 years ago

Have you been able to you delete the addon settings?

I’m sorry. I only started working with the addon from v18 so nothing nothing about it prior to that.

phunkyfish commented 4 years ago

Is kodi actually crashing or is it just freezing?

phunkyfish commented 4 years ago

If you have remote access configured I could try and debug it remotely. PM me on the forum it this is possible.

IcePlanet commented 4 years ago

@phunkyfish thanks for the interest and willingness. We can try to setup some debug session, but now I'm at work :-) so maybe later in the evening.

To your questions:

What I have made is test with kodi 17 and VU+ /enigma2 plugin on windows:

  1. When I press Kodi in start menu I started stop watch
  2. At 04.38 I pressed TV in kodi interface
  3. At 7.23 I selected channel
  4. At 13.86 the channel was playing (audio + video)

When kodi 17 is able to get playing channel in 14 seconds I would like to hope that 18 will be able to achieve comparable result (if not faster). Maybe there can be something identified in log to understand where is the difference. Attached is complete log from this attempt on KODI 17. (all tests on windows have been done from the same machine, on the same network and to the same sat receiver): kodi.log

phunkyfish commented 4 years ago

No rush. I think you are hitting a deadlock scenario somehow. Kodi 17 would not help us I'm afraid. Let's focus on fixing this in Kodi 19 and we can work back from there.

Please post the settings.xml for the addon from Kodi 19 later on, thanks!

IcePlanet commented 4 years ago

There is one thing I found out from the log files:

Search for: &sRef=1%3A7%3A1%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3AFROM%20BOUQUET%20%22userbouquet%2Edbe03%2Etv%22%20ORDER%20BY%20bouquet

It is in kodi_loading.log on 2 places lines 2358 to 2364 AND lines 5795 to 5798. Now search in kodi log (the good one I posted today), it is on 1 place lines 1311 to 1317.

Below are the lines from kodi_loading.log 2358 to 2364 (v18):

2020-03-23 22:42:19.015 T:25447    INFO: AddOnLog: Enigma2 Client: pvr.vuplus - GetHttp Open webAPI with URL: 'http://192.168.43.81:80/web/getservices?sRef=1%3A7%3A1%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3AFROM%20BOUQUET%20%22userbouquet%2Edbe03%2Etv%22%20ORDER%20BY%20bouquet'
2020-03-23 22:42:19.015 T:25447   DEBUG: CFileCache::Open - opening <web/getservices> using cache
2020-03-23 22:42:19.018 T:25447   DEBUG: CurlFile::Open(0x768cd52280) http://192.168.43.81:80/web/getservices?sRef=1%3A7%3A1%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3AFROM%20BOUQUET%20%22userbouquet%2Edbe03%2Etv%22%20ORDER%20BY%20bouquet
2020-03-23 22:42:19.037 T:25460   DEBUG: Thread FileCache start, auto delete: false
2020-03-23 22:42:19.037 T:25460    INFO: CFileCache::Process - Source read didn't return any data! Hit eof(?)
2020-03-23 22:42:19.038 T:25460   DEBUG: Thread FileCache 25460 terminating
2020-03-23 22:42:19.038 T:25447    INFO: AddOnLog: Enigma2 Client: pvr.vuplus - GetHttp Got result. Length: 4335

Below are the lines 5795 to 5804 from kodi_loading.log (v18):

2020-03-23 22:42:49.750 T:25447    INFO: AddOnLog: Enigma2 Client: pvr.vuplus - GetHttp Open webAPI with URL: 'http://192.168.43.81:80/api/getservices?provider=1&picon=1&sRef=1%3A7%3A1%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3AFROM%20BOUQUET%20%22userbouquet%2Edbe03%2Etv%22%20ORDER%20BY%20bouquet'
2020-03-23 22:42:49.750 T:25447   DEBUG: CFileCache::Open - opening <api/getservices> using cache
2020-03-23 22:42:49.753 T:25447   DEBUG: CurlFile::Open(0x768cd52280) http://192.168.43.81:80/api/getservices?provider=1&picon=1&sRef=1%3A7%3A1%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3AFROM%20BOUQUET%20%22userbouquet%2Edbe03%2Etv%22%20ORDER%20BY%20bouquet
2020-03-23 22:42:50.208 T:25569   DEBUG: Thread Timer start, auto delete: false
2020-03-23 22:42:50.284 T:25569   DEBUG: Thread Timer 25569 terminating
2020-03-23 22:42:50.344 T:25395   DEBUG: CheckForInertialScrolling: Avg touch velocity: -1567.835205,200.899658 up to and including touch at 16 ms ago
2020-03-23 22:42:52.394 T:25395  NOTICE: CWinSystemAndroid::DestroyWindow
2020-03-23 22:42:52.398 T:25358   DEBUG: CXBMCApp::onDisplayChanged: id: 0
2020-03-23 22:42:52.408 T:25358 WARNING: CPeripheralBusAndroid: failed to update input device with ID 4 because it couldn't be found
2020-03-23 22:42:52.408 T:25358 WARNING: CPeripheralBusAndroid: failed to update input device with ID 7 because it couldn't be found

At line ~5800 I would expect same text as at line 2364. This one:

2020-03-23 22:42:19.038 T:25447 INFO: AddOnLog: Enigma2 Client: pvr.vuplus - GetHttp Got result. Length: 4335

This leads me to 2 questions:

Now have closer look at kodi.log lines 1311 to 1317 (v17):

12:17:50.098 T:2212    INFO: AddOnLog: VU+ / Enigma2 Client: Vu::GetHttpXML Open webAPI with URL: 'http://192.168.43.81:80/web/getservices?sRef=1%3A7%3A1%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3AFROM%20BOUQUET%20%22userbouquet%2Edbe03%2Etv%22%20ORDER%20BY%20bouquet'
12:17:50.098 T:2212   DEBUG: CFileCache::Open - opening <web/getservices> using cache
12:17:50.098 T:2212   DEBUG: CurlFile::Open(0B4AEF50) http://192.168.43.81:80/web/getservices?sRef=1%3A7%3A1%3A0%3A0%3A0%3A0%3A0%3A0%3A0%3AFROM%20BOUQUET%20%22userbouquet%2Edbe03%2Etv%22%20ORDER%20BY%20bouquet
12:17:50.114 T:5764   DEBUG: Thread FileCache start, auto delete: false
12:17:50.116 T:5764    INFO: CFileCache::Process - Source read didn't return any data! Hit eof(?)
12:17:50.116 T:5764   DEBUG: Thread FileCache 5764 terminating
12:17:50.116 T:2212    INFO: AddOnLog: VU+ / Enigma2 Client: Vu::GetHttpXML Got result. Length: 4335

And here is the file I got if I put it in chrome (file is XML, only renamed to txt as gui did not like xml): sat_response_getservices.xml.txt

It got the data and they are of the same size (4335). In the evening I would try to look in the source code, but my suspicion now is reading loop that is not terminating as should, fetching the data multiple times without cleaning 'some' variable prior to next loop. I know it is very vague suspicion, but it is only idea...

IcePlanet commented 4 years ago

No rush. I think you are hitting a deadlock scenario somehow. Kodi 17 would help us I'm afraid. Let's focus on fixing this in Kodi 19 and we can work back from there.

I'm sorry to disagree, but based on above I strongly believe this is not related to Kodi, but to the enigma2 plugin.

phunkyfish commented 4 years ago

I agree. But I can debug on the kodi 19 version and would always fix in latest first and work backwards 😉

phunkyfish commented 4 years ago

I think what is happening that that it is dead locking on two different requests for the same EPG data.

If you could limit the addon to only loading a single bouquet (in addon settings) we could see does it load then as there is less chance for deadlock.

phunkyfish commented 4 years ago

But your settings.xml would also help as there are some options there that might help with this.

phunkyfish commented 4 years ago

Can you check if this option is enabled?

Screenshot 2020-03-24 at 13 01 35
IcePlanet commented 4 years ago

I have tried following sequence:

  1. Kodi 19 (20200322-6b1585df) clean install
  2. Start kodi -> activate debug log -> exit kodi (all OK no log)
  3. Start kodi -> Download enigma2 -> open settings -> Connection -> Change IP to 192.168.43.81 -> OK -> Dialog box of enigma2 client that it needs to restart -> Clicking OK -> Complete kodi freeze, no mouse movement all dead -> Killed via via task manager Log: kodi19_20200322-6b1585df_install.log
  4. Start kodi -> TV -> PVR manager is starting up 0%, wheel is rotating, mouse moving but that's all Log: kodi19_20200322-6b1585df_PVR_0.log
  5. Start kodi -> exit kodi -> complete freeze no react to anything, killed Log: kodi19_20200322-6b1585df_StartStop.log
  6. Start kodi -> add-ons -> settings -> EPG, but there is NOT screen like yours -> exit kodi -> Complete freeze Log: kodi19_20200322-6b1585df_EPG_Load.log Screenshot of my settings screen: kodi19_20200322-6b1585df_config
  7. Start kodi -> settings -> clean cache on on settings -> clean cache in another settings -> settings -> EPG, but there is NOT screen like yours (same as on previous screenshot) -> exit kodi -> Complete freeze Log: kodi19_20200322-6b1585df_CleanCache_EPG_Load.log

settings XML from pvr.vuplus: settings.xml.pvr.vuplus.txt settings XML from resources:settings.xml.resources.txt hope I selected the right ones as there are 6 more settings.xml...

But I have one important news! Yesterday the main TV was off so I have not spotted it, but today the TV was on and for the time kodi was frozen also the receiver was frozen. The audio and video was running, but it did not react to remote. This somehow limits my testing as other family members are complaining :-)

I have absolutely no idea what is the plugin sending to sat box, but installed once more kodi 17 to check and the sat receiver was perfectly reacting the whole time during kodi pvr startup (13s from application start until channels loaded and audio+video running on selected one) and also during watching TV. From my point of view this is huge difference when one version is able to give audio+video including app start in less than 15s and second is freezing application and also sat receiver. This somehow supports my idea that the loading is running to unwanted (maybe infinite) loop.

IcePlanet commented 4 years ago

Sorry I forgot to enable expert settings, all tests executed with settings "skip initial EPG load" to OFF, now I changed to ON and there is no change, the behavior is the same as described above.

phunkyfish commented 4 years ago

Ok, can you try to going to the addon settings and under channels change the TV bouquet fetch mode to Favourites bouquet?

If you don't have a favourites bouquet maybe try Some bouquets and just set one bouquet name that you know.

Then try and start the addon.

phunkyfish commented 4 years ago

The correct settings.xml is the one in userdata/addon_data.pvr.vuplus. In case you ever want to reset the settings you can just delete this file and restart kodi and it will be recreated.

IcePlanet commented 4 years ago

When I change to some bouquets and enter one of existing it needs to restart -> freeze and after new run when I click TV the situation is still the same... For desktop I have solution with 17.5 that is lightning fast For mobile I currently do not have any solution as the older apk files are throwing unknown error when loading vu+ / enigma2 plugin. The only thing I have found is Vu+ player and that you really do not want to use :-( I tried to look to the code, but even when I managed to learn assembler, C, bash... I never understood object oriented programming, so that is completely strange to me and can not find anything there.

phunkyfish commented 4 years ago

How many channels in the bouquet you tried?

Try one with only a few channels then please post the debug log.

I’ve never heard of VU+ Player!

IcePlanet commented 4 years ago

The bouquet (Doma) has cca 100 channels in (you can see them (and all other)being loaded in previous logs. I tried thd requested scenario. Log from settings change: kodi_bouquetConfig.log Log from startup: kodi.log

Favorities are not present on the receiver so not tried.

I was also not aware of VU+ player, but when Kodi is not running I was searching for 'something' but it is really 'something'... ;-)

PROVRS commented 4 years ago

@Developer, Can you please give an option to set these 2 parameters somehow - getservices?provider=1&picon=1 (located in src/enigma2/Channels.cpp file) If provider is set to 0, loading times are much faster from the WebIf. If I could compile this myself I would do it with provider=0.

phunkyfish commented 4 years ago

Please create a new issue as the request is not related to the current issue.

AndKe commented 4 years ago

I have the same symptom. Entered IP of the Dreambox, tried to see channels, and got stuck >15min now with the 0% progress. I did not configure a username/password, are there any clues as to what is stopping ? (current plugin on current Kodi for Android )

phunkyfish commented 4 years ago

I have the same symptom. Entered IP of the Dreambox, tried to see channels, and got stuck >15min now with the 0% progress. I did not configure a username/password, are there any clues as to what is stopping ? (current plugin on current Kodi for Android )

What version are kodi are you running?

phunkyfish commented 4 years ago

@AndKe and @IcePlanet

Can you both try the latest beta release and both provide a debug log. I'd like to see if this is the same problem.

AndKe commented 4 years ago

how do I get the beta Release on the Android Kodi ?

On Thu, 19 Nov 2020 at 23:12, phunkyfish notifications@github.com wrote:

@AndKe https://github.com/AndKe and @IcePlanet https://github.com/IcePlanet

Can you both try the latest beta release and both provide a debug log. I'd like to see if this is the same problem.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kodi-pvr/pvr.vuplus/issues/278#issuecomment-730669528, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALGTKTPICLDGDKAGLBVPVDSQWJ5BANCNFSM4LSGNSSA .

phunkyfish commented 4 years ago

The APK can be downloaded from the pre release downloads section on kodi.tv.

I believe it will be in the beta channel of playstore in the next few days. I don’t use android myself so not entirely sure how it works.

phunkyfish commented 4 years ago

@IcePlanet can you try selecting the Favourites bouquet anyway? Just curious what will happen.

AndKe commented 4 years ago

@phunkyfish - I wanted to add the TV to the workout room where an Android box runs kodi - I totally forgot that I could test it easier in the bar-room on Libreelec + kodi distribution. With (fresh installed) Enigma2 Client 3.28.9.1 I reproduced the same issue there (apparently endless wait at 0%)

Please instruct me to how I should test to help you to locate the issue.

phunkyfish commented 4 years ago

I wonder can you run the latest version of Kodi and see do you still have a problem. Is the libreElec device running x84_64?

AndKe commented 4 years ago

The Libreelec is a very efficient Linux distro running on Raspberry Pi - yes, it runs x86_64 (for Linux) It runs Kodi 18.9 The thing is highly optimized, I think it boots and is ready at about 6 seconds or so. (I have it always-on anyway) but the point is, it is simple to install/use, but I can't up/downgrade the Kodi itself. They do this to keep support super-simple.

phunkyfish commented 4 years ago

Yes, I run LibreElec myself 😉

You can install nightly build which would give you the beta release and then also install vuplus.

Is that the only binary addon you use?

AndKe commented 4 years ago

Yes, this is the only addon - I did set up a clean, new Libreelec on a RPi4 in the workshop now, so if you provide instructions, I'll test.. (I do not know to te get a nightly version of this plugin)

phunkyfish commented 4 years ago

It was as simple as copying the correct tar file from test.libreelec.tv to the update folder on the device. I did x86_64, I didn’t try any pi yet.

AndKe commented 4 years ago

ok, do i did:

LibreELEC2:~/.update # wget https://test.libreelec.tv/LibreELEC-RPi4.arm-9.80-nightly-20201120-5d0dc8a.tar

and rebooted, .. same issue remains

AndKe commented 4 years ago

BTW: you asked me to install "vuplus" I cant find such a thing, certainly not in DVR category where I think it belongs. unless you meanyour https://github.com/kodi-pvr/pvr.vuplus that I refer to as Enigma2 Client plugin ? - that is what I installed on daily, and same issue remain. I am running DM900UHD as source, with stock software. Feel free to suggest a nice and feature-rich distro for this Dreambox(I just guess you know quite a lot about the options out there)

phunkyfish commented 4 years ago

I wonder is there a way for me to connect to your device remotely so I can debug the problem.

AndKe commented 4 years ago

do you have time the next hour ? - and - do you need SSH only ?

AndKe commented 4 years ago

are you on gitter.im ?

phunkyfish commented 4 years ago

I would need to connect on the port you have configured in vuplus settings.

AndKe commented 4 years ago

I invited you to a gitter chat. Yes I can forward a port in the firewall