NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 37 38 39 40 41 … 93 Next »
tracking down high memory usage in skiptool

 
  • 0 Vote(s) - 0 Average
tracking down high memory usage in skiptool
pastro
Offline

Posting Freak

Posts: 1,885
Threads: 128
Joined: Jul 2006
#21
2007-12-15, 05:12 AM
JavaWiz Wrote:The WizUiList was basically cloned from sub's UiList object, and uses the same caching scheme that he uses. If the cache fills, it reuses the oldest element and sets forceRefresh to true.

The bitmaps are returned in a wizuilabel not a wizuilist. When I want to change the image I use something like


lblProgramInfo.addArg("@thumbnail", targetProgram);

where lblProgramInfo was defined the object as
privateWizUiLabel lblProgramInfo;

And targetprogram was defined as an object of showinfo:
publicclassShowInfo : SkinHelper2.GetImageCallback


I know this is pretty hard to follow but if this means anything to you guys let me know.


GBpvr PC: Intel Celeron 1.8 Ghz. 768 Mb WinXp Home Sp2
Video: Diamond 128 Mb 9550
Capture Cards: PVR-150 & PVR-150 MCE w/fm + 2x MVP
Author of: BurnDVDX2 and Skiptool
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#22
2007-12-15, 06:35 AM
pastro Wrote:The bitmaps are returned in a wizuilabel not a wizuilist. When I want to change the image I use something like


lblProgramInfo.addArg("@thumbnail", targetProgram);

where lblProgramInfo was defined the object as
privateWizUiLabel lblProgramInfo;

And targetprogram was defined as an object of showinfo:
publicclassShowInfo : SkinHelper2.GetImageCallback


I know this is pretty hard to follow but if this means anything to you guys let me know.
I think I may have found a bug in WizUiLabel and WizUiTextBox that may attribute to this memory problem.

I've attached a fix version of the DLL, but ask that you don't deploy it to the public until I get more testing done as I think there still may be some tweaking to be done.

Let me know if this helps with your memory problems...
pastro
Offline

Posting Freak

Posts: 1,885
Threads: 128
Joined: Jul 2006
#23
2007-12-15, 07:02 AM
With the updated DLL, I get a lot of getimage callbacks but the bitmaps never change on the screen. It always displays the first image and nothing else.
GBpvr PC: Intel Celeron 1.8 Ghz. 768 Mb WinXp Home Sp2
Video: Diamond 128 Mb 9550
Capture Cards: PVR-150 & PVR-150 MCE w/fm + 2x MVP
Author of: BurnDVDX2 and Skiptool
pastro
Offline

Posting Freak

Posts: 1,885
Threads: 128
Joined: Jul 2006
#24
2007-12-15, 07:15 AM
Actually let me change that comment. In skiptool where I don't set forcerefresh to true, I don't get any new bitmaps displayed. In burndvdx2 where I experimented and always set forcerefresh=true I do get the updated bitmaps to display, and the memory does not climb either. There is a solution in here somewhere.

I know you are going to puke when you see this but here is the code that goes through and sets forcerefresh

The check for null was something I had to do because occasionally I get a null image from wizutilities when I am enabling and disabling buttons. That's a different problem though.


for (i = 0; i < renderList.Count; i++)
{
testme1 = (
GBPVRUiElement)renderList[i];

if (testme1.image != null)
{
if (testme1.name == "ProgramInfo")
testme1.forceRefresh =
true;
arraylistme.Add(testme1);
}
GBpvr PC: Intel Celeron 1.8 Ghz. 768 Mb WinXp Home Sp2
Video: Diamond 128 Mb 9550
Capture Cards: PVR-150 & PVR-150 MCE w/fm + 2x MVP
Author of: BurnDVDX2 and Skiptool
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#25
2007-12-15, 07:34 AM
pastro Wrote:With the updated DLL, I get a lot of getimage callbacks but the bitmaps never change on the screen. It always displays the first image and nothing else.
Try again...

I've actually added code similar to that right in the WizUi controls, so you shouldn't have to.
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#26
2007-12-15, 08:05 AM
pastro Wrote:The check for null was something I had to do because occasionally I get a null image from wizutilities when I am enabling and disabling buttons. That's a different problem though.


for (i = 0; i < renderList.Count; i++)
{
testme1 = (GBPVRUiElement)renderList[i];

if (testme1.image != null)
{
if (testme1.name == "ProgramInfo")
testme1.forceRefresh = true;
arraylistme.Add(testme1);
}

Is this code in the GetRenderList of your plugin?

I caught a similar exception with some buttons, so the button code now checks for a null before adding to the list. You may be able to remove this code with the next version of WizUiHelper.
pastro
Offline

Posting Freak

Posts: 1,885
Threads: 128
Joined: Jul 2006
#27
2007-12-15, 03:06 PM
JavaWiz Wrote:Is this code in the GetRenderList of your plugin?

I caught a similar exception with some buttons, so the button code now checks for a null before adding to the list. You may be able to remove this code with the next version of WizUiHelper.

yes that is in getrenderlist. It was sort of a long standing bug that this fixed. I'll check if I get any issues if I remove it.
GBpvr PC: Intel Celeron 1.8 Ghz. 768 Mb WinXp Home Sp2
Video: Diamond 128 Mb 9550
Capture Cards: PVR-150 & PVR-150 MCE w/fm + 2x MVP
Author of: BurnDVDX2 and Skiptool
pastro
Offline

Posting Freak

Posts: 1,885
Threads: 128
Joined: Jul 2006
#28
2007-12-15, 03:22 PM
That fixed it. The memory stays constant and doesn't climb and the bitmaps all show up without my forcerefresh=true.


It will take longer to determine if the null problem still exists, but I will test that further and post the results.
Nice work. The UI is much more responsive after I use the control for a bit.
GBpvr PC: Intel Celeron 1.8 Ghz. 768 Mb WinXp Home Sp2
Video: Diamond 128 Mb 9550
Capture Cards: PVR-150 & PVR-150 MCE w/fm + 2x MVP
Author of: BurnDVDX2 and Skiptool
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#29
2007-12-15, 04:03 PM
Great - well done.

I'm glad to see I'm off the hook too, with no major memory leak in the framework. Big Grin
pastro
Offline

Posting Freak

Posts: 1,885
Threads: 128
Joined: Jul 2006
#30
2007-12-15, 04:24 PM
Null problem appears fixed as well.
Thanks a bunch.
Give me the high sign when it is ok to release.
GBpvr PC: Intel Celeron 1.8 Ghz. 768 Mb WinXp Home Sp2
Video: Diamond 128 Mb 9550
Capture Cards: PVR-150 & PVR-150 MCE w/fm + 2x MVP
Author of: BurnDVDX2 and Skiptool
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (4): « Previous 1 2 3 4 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Tuner status & disk usage mikaelgu 2 2,972 2017-04-10, 04:51 PM
Last Post: mikaelgu
  Images in lists using a lot of memory cncb 4 4,094 2015-11-12, 12:02 AM
Last Post: sub
  high res (256x256+) npvr icon? reven 15 6,003 2013-09-01, 05:13 AM
Last Post: psycik
  Tracking Live TV status imilne 2 2,283 2011-07-13, 07:04 PM
Last Post: imilne
  PopupMessageBox usage McBainUK 2 1,633 2009-01-20, 06:06 PM
Last Post: whurlston
  Skiptool sometimes hacks out the middle mkenyon2 10 3,396 2008-11-24, 05:31 PM
Last Post: mkenyon2
  pastro, is SkipTool broken with WizUiHelper v1.0.17.0? mkenyon2 5 2,280 2008-06-02, 08:16 PM
Last Post: mkenyon2
  SkipTool, do you use the GBPVR SQLite database? mkenyon2 1 1,627 2008-04-21, 07:30 PM
Last Post: pastro
  TV is recorded at high speed!! idkpmiller 4 2,283 2008-04-20, 01:11 AM
Last Post: idkpmiller
  More On Memory Management Ommina 2 1,749 2008-01-09, 06:54 AM
Last Post: Ommina

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode