New MythTV add-on using libcmyth

  Thread Rating:
  • 8 Votes - 4.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
dubstar_04 Offline
Senior Member
Posts: 228
Joined: May 2008
Reputation: 0
Location: Warrington, UK
Post: #31
tsp42 Wrote:The leak should be closed now.
Remarkable example of how well written the libcmyth code and documentation is :-)
Code:
/**
* Atomically decrement a reference count variable.
* \param valp address of atomic variable
* \return incremented reference count
*/
static inline unsigned
__mvp_atomic_decrement(mvp_atomic_t *valp)
{
    mvp_atomic_t __val;
#if defined __i486__ || defined __i586__ || defined __i686__
    __asm__ __volatile__(
        "lock xaddl %0, (%1);"
        "     inc   %0;"
        : "=r" (__val)


Thank you for your quick work on this!!

I am building a fresh clone.

I will feed back if i find anything new.

Thanks,

Dubstar_04

All Things PVR
find quote
dubstar_04 Offline
Senior Member
Posts: 228
Joined: May 2008
Reputation: 0
Location: Warrington, UK
Post: #32
Wow,

What an improvement!!!

It starts up in seconds and memory usage is about 50MB now instead of 1.5GB!!

One of the cpu cores is still pegged at 100% while xbmc is running, is there anyway of finding out what might cause it? maybe feedback to dushmaniac?

thanks again,

Dubstar_04

All Things PVR
find quote
tsp42 Offline
Senior Member
Posts: 222
Joined: Aug 2011
Reputation: 11
Location: Denmark
Post: #33
dubstar_04 Wrote:Wow,

What an improvement!!!

It starts up in seconds and memory usage is about 50MB now instead of 1.5GB!!

One of the cpu cores is still pegged at 100% while xbmc is running, is there anyway of finding out what might cause it? maybe feedback to dushmaniac?

thanks again,

Dubstar_04

The high CPU utilization on linux should be fixed now. Using a profiler is usually the best method to finding the cause. I use intel vTune on linux.
find quote
dubstar_04 Offline
Senior Member
Posts: 228
Joined: May 2008
Reputation: 0
Location: Warrington, UK
Post: #34
tsp42 Wrote:The high CPU utilization on linux should be fixed now. Using a profiler is usually the best method to finding the cause. I use intel vTune on linux.

That seems to of fixed it. cpu useage is now ~18% compared to >!00% before.

I am seeing a small memory leak, i can't be sure but i think its when loading the guide (timeline).

The memory usage gently climbs from 50mb and never goes down.

i will try and investigate this tonight.

Thank you for your work,

Dubstar_04

All Things PVR
find quote
dubstar_04 Offline
Senior Member
Posts: 228
Joined: May 2008
Reputation: 0
Location: Warrington, UK
Post: #35
There does seem to be a memory leak when selecting the EPG:Timeline view.

logs from current build:

Massif log: http://paste.ubuntu.com/699172/
Massive output file: http://paste.ubuntu.com/699173/
Valgrind log: http://paste.ubuntu.com/699174/

All Things PVR
(This post was last modified: 2011-09-29 18:11 by dubstar_04.)
find quote
tsp42 Offline
Senior Member
Posts: 222
Joined: Aug 2011
Reputation: 11
Location: Denmark
Post: #36
Maybe related to this?
I will try to improve the timers (and maybe the sorting of records) before investigation this leak further (not as severe as the last leak). It is a bit complicated to map the MythTV timers to the XBMC PVR timers (suggestions are appreciated).
I've been thinking about showing a custom window when adding a recording with the different mythtv specific options at least this would reduce the need to mess around with the XBMC PVR code.
(This post was last modified: 2011-09-29 22:35 by tsp42.)
find quote
dubstar_04 Offline
Senior Member
Posts: 228
Joined: May 2008
Reputation: 0
Location: Warrington, UK
Post: #37
tsp42 Wrote:Maybe related to this?
I will try to improve the timers (and maybe the sorting of records) before investigation this leak further (not as severe as the last leak). It is a bit complicated to map the MythTV timers to the XBMC PVR timers (suggestions are appreciated).
I've been thinking about showing a custom window when adding a recording with the different mythtv specific options at least this would reduce the need to mess around with the XBMC PVR code.

Dushmaniac may well be aware of the memory leak. I could always add the leak on his git repo next week if its not resolved.

I had a quick look at the timers last week as not all the timers are pulled into xbmc. i never got to the bottom of the issue but it looks like anything that has a blue traffic light in mythtv-frontend is included the yellow ones are missed. the reasons for the colours vary.

I was using a method to not include any timers that ended before the current time.
That made the timers window easier to understand as only current and future recordings were shown.

I will try and have a look at how the mapping works and see if i can understand it, although you have probably thought of everything i would suggest!

if you can add a window through the cmyth add-on, that would be superb. maybe speak with dushmaniac regarding his intention to implement recording types in the future as i'm sure he would accept patches to the pvr code?

All Things PVR
(This post was last modified: 2011-09-30 07:39 by dubstar_04.)
find quote
tsp42 Offline
Senior Member
Posts: 222
Joined: Aug 2011
Reputation: 11
Location: Denmark
Post: #38
I've added sorting of recordings by date to the context menu.

dubstar_04: Can you check if the missing timers are in the sql database (in the record table)?
find quote
dubstar_04 Offline
Senior Member
Posts: 228
Joined: May 2008
Reputation: 0
Location: Warrington, UK
Post: #39
tsp42 Wrote:I've added sorting of recordings by date to the context menu.

dubstar_04: Can you check if the missing timers are in the sql database (in the record table)?

I have just built the latest git.

The recordings are much easier to understand now. thank you.

I have done a side by side comparison of the mythconverge record table and xbmc timers and they tie up!!

The majority of the mythtv pvr add-on is now complete!!

just a few little nips and tucks and tweaks here and there (to the pvr framework) and it will be a usable everyday front end!!!

really great work!!

I can't thank you enough for the constant updates and fixes.

All Things PVR
find quote
Hirs Offline
Senior Member
Posts: 101
Joined: Oct 2008
Reputation: 0
Post: #40
Could you merge with master? there is a new feature I already can't live without it Smile

http://forum.xbmc.org/showthread.php?p=898913

I feel the perfect PVR is coming Smile
find quote
dubstar_04 Offline
Senior Member
Posts: 228
Joined: May 2008
Reputation: 0
Location: Warrington, UK
Post: #41
i've been using this build this morning and i have noticed a few issues:

1. if i watch a channel then stop live tv, then go back to that channel, xbmc hangs.
Log: http://paste.ubuntu.com/700948/

2. if i try to reset the pvr database from the settings menu xbmc closes.
crash log: http://paste.ubuntu.com/700941/

3. The sorting selection in the recordings screen is not remembered following a restart.

4. a few random crashes when exiting live tv (not that often)
crash log: http://paste.ubuntu.com/700943/
log: http://paste.ubuntu.com/700947/

5. Sometimes i cant exit the pvr interface using the 'home' button. this is irregular and difficult to replicate. i will provide more details when i can.


Thanks,

Dubstar_04

All Things PVR
find quote
dubstar_04 Offline
Senior Member
Posts: 228
Joined: May 2008
Reputation: 0
Location: Warrington, UK
Post: #42
dubstar_04 Wrote:i've been using this build this morning and i have noticed a few issues:

1. if i watch a channel then stop live tv, then go back to that channel, xbmc hangs.
Log: http://paste.ubuntu.com/700948/

Additional information:

if live tv is stopped, watching a recording or any live channel hangs xbmc.

http://paste.ubuntu.com/700984/

http://paste.ubuntu.com/700990/

All Things PVR
(This post was last modified: 2011-10-02 13:34 by dubstar_04.)
find quote
tsp42 Offline
Senior Member
Posts: 222
Joined: Aug 2011
Reputation: 11
Location: Denmark
Post: #43
dubstar_04: I've fixed one cause for the lock-ups. Could you please see if it improves anything?

Hirs: You will have to wait until opdenkamp updates his repository as I don't know the PVR code good enough yet to merge from main line yet. If I find the time I could try to apply the patch from bobo1on1 (But I doubt I will, as I will rather use the time to debug my own code).
find quote
dubstar_04 Offline
Senior Member
Posts: 228
Joined: May 2008
Reputation: 0
Location: Warrington, UK
Post: #44
tsp42 Wrote:dubstar_04: I've fixed one cause for the lock-ups. Could you please see if it improves anything?

Hirs: You will have to wait until opdenkamp updates his repository as I don't know the PVR code good enough yet to merge from main line yet. If I find the time I could try to apply the patch from bobo1on1 (But I doubt I will, as I will rather use the time to debug my own code).

I have had a quick test this morning and when stopping live tv xbmc just freezes with the last frame left on screen.

http://paste.ubuntu.com/701394/
http://paste.ubuntu.com/701399/


not sure if this affects anything:
Code:
cppmyth.cpp: In constructor ‘MythEventHandler::ImpMythEventHandler::ImpMythEventHandler(CStdString, short unsigned int)’:
cppmyth.cpp:113: warning: ‘MythEventHandler::ImpMythEventHandler::m_conn_t’ will be initialized after
cppmyth.cpp:120: warning:   base ‘cThread’
cppmyth.cpp:119: warning:   when initialized here

All Things PVR
(This post was last modified: 2011-10-03 05:18 by dubstar_04.)
find quote
takiaine Offline
Junior Member
Posts: 12
Joined: Oct 2011
Reputation: 5
Post: #45
First of all, thanks for all your work. I did not have time to check the progress with mythtv PVR addon for some time, and now I see that there is a whole new addon developed for it.Smile Here are some things that I noticed while testing the latest code.

Quote:I have had a quick test this morning and when stopping live tv xbmc just freezes with the last frame left on screen.

I can confirm that I have the same problem with the latest code.

Quote:3. The sorting selection in the recordings screen is not remembered following a restart.

I can also confirm this one. Also when I set the sorting "Sort by: Date" and start watching and then stop, the sorting has been changed to "Sort by: Name".
find quote
Post Reply