possible memory leak : attribute error
#1
Running kodi 16.1 Git:c327c53 on mythbuntu 16.04.1 (up to date as of 25-sep-2016)
CPU/GPU i3-3225 x86_64

Current skin: Amber
This error does not occur all the time, but frequently on startup
At first I thought it was an amber issue, but swapping to confluence and restarting kodi showed the same error.

Error appears in log, nothing on screen.

09:08:02 T:139716150159104 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.AttributeError'>
Error Contents: Main instance has no attribute 'RANDOMITEMS_UNPLAYED'
Traceback (most recent call last):
File "/home/derek/.kodi/addons/service.skin.widgets/default.py", line 751, in onDatabaseUpdated
self.update_listitems(database)
File "/home/derek/.kodi/addons/service.skin.widgets/default.py", line 664, in _update
self._fetch_movies('RandomMovie')
File "/home/derek/.kodi/addons/service.skin.widgets/default.py", line 172, in _fetch_movies
elif request == "RandomMovie" and self.RANDOMITEMS_UNPLAYED:
AttributeError: Main instance has no attribute 'RANDOMITEMS_UNPLAYED'
-->End of Python script error report<--

Debug log: https://paste.ubuntu.com/23227176/

Thanks Derek
Reply
#2
looks like a bug in service.skin.widgets
Reply
#3
Thanks Wsnipex

I installed kodi 17 beta 3, and still get the error. So its relevant to the latest code.
Is there any more data I can provide to help fix this?

Thanks Derek
Reply
#4
Can someone let me know how to log a bug on this?
I cannot find a bug report section for linux/live support
Reply
#5
trac.kodi.tv is the way to go.

Edit: From the log it seems just a query to the DB is nuts :-) ... reproduce with 17 nighty (not beta6) and if still happens -> trac.kodi.tv
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#6
Hi Fritsch,

logging in to trac.kodi.tv gives:
Missing or invalid form token. Do you have cookies enabled?
I tried removing the cookies, but get the same problem.

I reproduced on the latest nightly, the debug log is in https://paste.ubuntu.com/23607020/

Thanks Derek
Reply
#7
Try again. As trac tells you, you need to remove cookies from all xbmc / kodi domains. If it does not work use ctl alt n to open a private browser window.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#8
And your current log has nothing to do with the old bug you had, it's an addon issue:
Quote:File "/home/derek/.kodi/addons/weather.ozweather/default.py", line 524, in buildImages
It happens, cause i throws an expection when it cannot receive data from the ftp server. That is more something for the Addon forum.

Let's move this thread here.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#9
Code:
18:04:17.776 T:139813030070016   DEBUG: ### Oz Weather - 0.8.1 ### Failed to retrieve radar image: ftp://USER:[email protected]//anon/gen/radar/IDR00004.T.201612100628.png, oh well never mind!
18:04:17.776 T:139813030070016   DEBUG: ### Oz Weather-0.8.1 ### Exception:Traceback (most recent call last):
                                              File "/home/derek/.kodi/addons/weather.ozweather/default.py", line 524, in buildImages
                                                image.retrieve(imageToRetrieve, LOOP_IMAGES_PATH + "/" + f )
                                              File "/usr/lib/python2.7/urllib.py", line 245, in retrieve
                                                fp = self.open(url, data)
                                              File "/usr/lib/python2.7/urllib.py", line 213, in open
                                                return getattr(self, name)(url)
                                              File "/usr/lib/python2.7/urllib.py", line 558, in open_ftp
                                                (fp, retrlen) = self.ftpcache[key].retrfile(file, type)
                                              File "/usr/lib/python2.7/urllib.py", line 906, in retrfile
                                                conn, retrlen = self.ftp.ntransfercmd(cmd)
                                              File "/usr/lib/python2.7/ftplib.py", line 334, in ntransfercmd
                                                host, port = self.makepasv()
                                              File "/usr/lib/python2.7/ftplib.py", line 312, in makepasv
                                                host, port = parse227(self.sendcmd('PASV'))
                                              File "/usr/lib/python2.7/ftplib.py", line 830, in parse227
                                                raise error_reply, resp
                                            IOError: [Errno ftp error] 200 Switching to Binary mode.
not a kodi error
Reply
#10
Removed weather, seems it can appear in more than one place.

Seems to happen mostly on a reboot.

The new debug log without weather still shows it.

Log is https://paste.ubuntu.com/23607253/

Let me know if this is valid and I will log the bug

Thanks Derek
Reply
#11
It happens when it wants to make a network connection which is not there yet. Make sure you have networking correctly setup before starting kodi.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#12
I could not get a systemd startup to work, so am using a delay in kodi.desktop.

The delay was 10 seconds, and I saw the network connection message prior to kodi starting.
I increased to 20 seconds, but still get the same error.
Increasing to 60 seconds, same error.

I set the original 10 seconds because it was starting before mythtv started (which is why I tried systemd) (its running on an ssd with an i3)
But even with the 10 second delay, I was able to play movie trailer and use youtube, which indicates that the network is working.
Reply
#13
original error:

09:08:02 T:139716150159104 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.AttributeError'>
Error Contents: Main instance has no attribute 'RANDOMITEMS_UNPLAYED'
Traceback (most recent call last):
File "/home/derek/.kodi/addons/service.skin.widgets/default.py", line 751, in onDatabaseUpdated
self.update_listitems(database)
File "/home/derek/.kodi/addons/service.skin.widgets/default.py", line 664, in _update
self._fetch_movies('RandomMovie')
File "/home/derek/.kodi/addons/service.skin.widgets/default.py", line 172, in _fetch_movies
elif request == "RandomMovie" and self.RANDOMITEMS_UNPLAYED:
AttributeError: Main instance has no attribute 'RANDOMITEMS_UNPLAYED'
-->End of Python script error report<--

Current error:

19:55:05.129 T:139620494968576 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.AttributeError'>
Error Contents: Main instance has no attribute 'RANDOMITEMS_UNPLAYED'
Traceback (most recent call last):
File "/home/derek/.kodi/addons/service.skin.widgets/default.py", line 751, in onDatabaseUpdated
self.update_listitems(database)
File "/home/derek/.kodi/addons/service.skin.widgets/default.py", line 664, in _update
self._fetch_movies('RandomMovie')
File "/home/derek/.kodi/addons/service.skin.widgets/default.py", line 172, in _fetch_movies
elif request == "RandomMovie" and self.RANDOMITEMS_UNPLAYED:
AttributeError: Main instance has no attribute 'RANDOMITEMS_UNPLAYED'
-->End of Python script error report<--
Reply
#14
(2016-09-25, 08:45)wsnipex Wrote: looks like a bug in service.skin.widgets
Reply
#15
There should be an update in repo which hopefully fixes this
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply

Logout Mark Read Team Forum Stats Members Help
possible memory leak : attribute error0