SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-06-2009, 05:56 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Fixed memory leak latest beta

Does anyone know in more detail what exactly was wrong in the get imageasbuferred call?

Memory leak? I am taking that to mean it was taking excessive memory?

When a studio update like this comes out do you have to be running the beta to have the advantages of the fix or just code In the beta?

I am wondering if this is what was slowing one of my screens down
Reply With Quote
  #2  
Old 05-06-2009, 06:53 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
A memory leak means that a process allocates/reserves memory but doesn't release it when it's done. The eventual outcome is that an application will eventually run out out memory.

According the releasenotes, the core STV doesn't use GetBufferedImage so, this memory leak will not exist there. I don't know if sagemc uses GetBufferedImage, but i can tell you for sure that GetBufferedImage is used in the phoenix image apis. So if you are using those, then the memory leak would have been present, and the eventual outcome is that you'd run out of memory.
Reply With Quote
  #3  
Old 05-06-2009, 07:00 PM
MeInMaui's Avatar
MeInMaui MeInMaui is offline
SageTVaholic
 
Join Date: Feb 2005
Location: Maui. HI
Posts: 4,203
BTW, the memory leak was found using the Phoenix api.
__________________
"Everything doesn't exist. I'm thirsty." ...later... "No, it's real!!! I'm full."
- Nikolaus (4yrs old)
Reply With Quote
  #4  
Old 05-06-2009, 07:30 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
Thanks for the help on that one Mike
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #5  
Old 05-06-2009, 07:36 PM
MeInMaui's Avatar
MeInMaui MeInMaui is offline
SageTVaholic
 
Join Date: Feb 2005
Location: Maui. HI
Posts: 4,203
No no no, Thank YOU!
__________________
"Everything doesn't exist. I'm thirsty." ...later... "No, it's real!!! I'm full."
- Nikolaus (4yrs old)
Reply With Quote
  #6  
Old 05-06-2009, 08:39 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Okay mike can you help me on this one I am currently using buffered image and then creating a reflection but cannot get this call to work by prefixing with phoenix_api

What am I doing wrong I would prefer using the phoenix Api as it is probably more efficient and future proof
Reply With Quote
  #7  
Old 05-06-2009, 08:53 PM
MeInMaui's Avatar
MeInMaui MeInMaui is offline
SageTVaholic
 
Join Date: Feb 2005
Location: Maui. HI
Posts: 4,203
Try using
Code:
phoenix_api_CreateReflection( Image )
(where Image is the path to the image file) and feeding the result into an image widget.
__________________
"Everything doesn't exist. I'm thirsty." ...later... "No, it's real!!! I'm full."
- Nikolaus (4yrs old)
Reply With Quote
  #8  
Old 05-07-2009, 05:07 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by MeInMaui View Post
Try using
Code:
phoenix_api_CreateReflection( Image )
(where Image is the path to the image file) and feeding the result into an image widget.
Okay so it has to be a path file I think that is what is getting me is I am trying to reflect an attribute that is the phoenix art cover

I am guessing that is not possible with phoenix as it is with standard image utils?
Reply With Quote
  #9  
Old 05-07-2009, 05:36 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Phoenix fanart apis return image paths, so if you using phoenix_api_GetFanartPoster(), then it will be a file path. The CreateReflection() api is an expensive operation and as such, it should be called with a filepath so that the operation can be cached. You should be able to call CreateReflection with a standard Sage Image or a Java Buffered Image, but it will apply the transformation each time and it will not be cached (at least not on the filesystem)
Reply With Quote
  #10  
Old 05-07-2009, 06:09 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by stuckless View Post
Phoenix fanart apis return image paths, so if you using phoenix_api_GetFanartPoster(), then it will be a file path. The CreateReflection() api is an expensive operation and as such, it should be called with a filepath so that the operation can be cached. You should be able to call CreateReflection with a standard Sage Image or a Java Buffered Image, but it will apply the transformation each time and it will not be cached (at least not on the filesystem)
Stuckless,

This is great news I have this coded however it is only half working. It does create the reflection in my cache/scaled images directory. However it does not display anything. I have it feeding a image widget but there is nothing displayed.
Reply With Quote
  #11  
Old 05-07-2009, 06:17 AM
jaminben jaminben is offline
Sage Icon
 
Join Date: Sep 2007
Location: Norwich, UK
Posts: 1,754
Send a message via MSN to jaminben
So using the code as show in my image below should work? Or have I got the wrong end of the stick? I've only used text widgets to display what each call is getting, replacing with image widgets does nothing.

Cheers

Ben
Attached Images
File Type: jpg Reflection.jpg (155.1 KB, 191 views)
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders
Reply With Quote
  #12  
Old 05-07-2009, 06:19 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by jaminben View Post
So using the code as show in my image below should work? Or have I got the wrong end of the stick? I've only used text widgets to display what each call is getting, replacing with image widgets does nothing.

Cheers

Ben
You are where I am if you look in your scaled directory it is reflected and caching it in the filesystem. But putting a image widget gets you nothing.
Reply With Quote
  #13  
Old 05-07-2009, 06:38 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by jaminben View Post
So using the code as show in my image below should work? Or have I got the wrong end of the stick? I've only used text widgets to display what each call is getting, replacing with image widgets does nothing.

Cheers

Ben
You also know you don't need that poster call first you can just create reflection off the getfanar call.
Reply With Quote
  #14  
Old 05-07-2009, 01:49 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Well I have tried just about everything I can think of they get cached just fine reflected and all but I cannot get an output into the interface for the life of me.

Hoping Mike can chime in here...
Reply With Quote
  #15  
Old 05-07-2009, 02:39 PM
MeInMaui's Avatar
MeInMaui MeInMaui is offline
SageTVaholic
 
Join Date: Feb 2005
Location: Maui. HI
Posts: 4,203
Did you feed the CreateReflection() call into an image widget? I'm using it with no problems, so I know it works.

Aloha,
Mike
__________________
"Everything doesn't exist. I'm thirsty." ...later... "No, it's real!!! I'm full."
- Nikolaus (4yrs old)
Reply With Quote
  #16  
Old 05-07-2009, 02:49 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by MeInMaui View Post
Did you feed the CreateReflection() into an image widget? I'm using it with no problems, so I know it works.

Aloha,
Mike
Yes here is a screen cap

reflectioncode

Like I said it is creating the reflections in the sagetv/cached/images/scaled
directory so I think I am calling it write there are no properties in the image widget but still I Get nothing.
Reply With Quote
  #17  
Old 05-07-2009, 02:57 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Also don't know what they are suppose to look like but here is one of them it is creating in the scaled directory

reflected

Last edited by PLUCKYHD; 05-07-2009 at 02:59 PM.
Reply With Quote
  #18  
Old 05-07-2009, 03:15 PM
MeInMaui's Avatar
MeInMaui MeInMaui is offline
SageTVaholic
 
Join Date: Feb 2005
Location: Maui. HI
Posts: 4,203
Looks like you're running an old version of the Phoenix api. It should be caching the image as a .png file. That's probably your problem.

Aloha,
Mike
__________________
"Everything doesn't exist. I'm thirsty." ...later... "No, it's real!!! I'm full."
- Nikolaus (4yrs old)
Reply With Quote
  #19  
Old 05-07-2009, 03:48 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by MeInMaui View Post
Looks like you're running an old version of the Phoenix api. It should be caching the image as a .png file. That's probably your problem.

Aloha,
Mike
Sagemc says I am running 1.25-beta1 is that not the latest?
Reply With Quote
  #20  
Old 05-07-2009, 04:10 PM
MeInMaui's Avatar
MeInMaui MeInMaui is offline
SageTVaholic
 
Join Date: Feb 2005
Location: Maui. HI
Posts: 4,203
Quote:
Originally Posted by PLUCKYHD View Post
Sagemc says I am running 1.25-beta1 is that not the latest?
How the heck did you get that?!?!

The only publicly released version of the Phoenix API is v1.23, which is available in the downloads section. Anything else is a private internal build and not available for general use.
__________________
"Everything doesn't exist. I'm thirsty." ...later... "No, it's real!!! I'm full."
- Nikolaus (4yrs old)

Last edited by MeInMaui; 05-07-2009 at 04:15 PM. Reason: Changed PG-rated comment to G.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Discussion of Possible Memory Leak toricred SageMC Custom Interface 25 02-12-2009 09:00 AM
SageTV Process Memory Leak? brandypuff SageTV Software 13 10-14-2008 05:14 PM
Memory leak in Sage? abasu2003 SageTV Software 5 03-27-2005 06:41 PM
Possible Memory Leak? Opopanax SageTV Software 6 02-04-2005 04:28 PM
Memory leak in Sage 2 Teg SageTV Software 31 12-14-2004 07:57 AM


All times are GMT -6. The time now is 08:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.