G15Mods.com & G19Mods.com

A community devoted to the Logitech G15 and G19 Gaming Keyboards
It is currently Mon Sep 06, 2010 7:40 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 250 posts ]  Go to page Previous  1 ... 13, 14, 15, 16, 17  Next
Author Message
 Post subject: Re: LCD Miscellany mod v0.4.5.0
PostPosted: Fri Feb 05, 2010 11:13 pm 
Offline

Joined: Fri Feb 05, 2010 11:09 pm
Posts: 6
Ever since version 0.4.5.0, there's been an awful memory leak. I'm running a Core i7 920, which btw, doesn't show up on the CPU graph included in Miscellany. This program starts off using a small amount of memory. Built its way up to use all 9GB of my DDR3 RAM + 10GB of my pagefile.

I'm running Windows XP x64 SP2. 0.4.3.0 didn't have a memory leak. Is there anything else I can give you to help you track down the issue?

My games were freezing due to the ram shortage, and I didn't realized that it was LCD Miscellany until I opened task manager and saw it using 9GB of my memory. :roll:


Top
 Profile  
 
 Post subject: Re: LCD Miscellany mod v0.4.5.0
PostPosted: Sat Feb 06, 2010 3:19 am 
Offline

Joined: Sun Jul 02, 2006 6:56 pm
Posts: 459
Egads...That's not good. First I've heard of the issue. Running it 24/7 and have yet to run into a leak with the latest version, myself.

Have you made significant modifications to any of the default scripts? More than just moving stuff around, that is.

How fast does it leak memory? In terms of k/sec or minute... Also, how often does it leak? Being very accurate may make the leak issue much easier to find.

You're using the QuadStatus.c script and a G15?

Not sure why it's not showing CPU usage. Have you run some sort of Windows performance optimizer thing, or are using Windows Lite? Your performance counters are probably disabled. Does the task list screen work at all?


Top
 Profile  
 
 Post subject: Re: LCD Miscellany mod v0.4.5.0
PostPosted: Fri Feb 19, 2010 7:10 pm 
Offline

Joined: Fri Feb 05, 2010 11:09 pm
Posts: 6
I haven't messed with any of the code. I'm just a user for your script. It's weird. Version 0.4.5.0 leaks for me every time. Like I said, I'm running Windows XP x64 SP2. Perhaps it's a 64-bit issue?

Version 0.4.3.0 (whatever version came earlier) didn't have a memory leak, but it too would not show me my processor performance. Task list? I don't think so. It shows my memory usage and network statistics which work. That's all I really use to be honest.

I'm using all of your scripts, and yes, I'm using a G15 version 2.


Top
 Profile  
 
 Post subject: Re: LCD Miscellany mod v0.4.5.0
PostPosted: Fri Feb 19, 2010 7:12 pm 
Offline

Joined: Sun Jul 02, 2006 6:56 pm
Posts: 459
I've since had at least one other person mention the issue. He's running Vista 64. Are you running the 64- or 32-bit executable?


Top
 Profile  
 
 Post subject: Re: LCD Miscellany mod v0.4.5.0
PostPosted: Sun Mar 14, 2010 8:19 am 
Offline

Joined: Sun Mar 14, 2010 6:32 am
Posts: 2
Dwarg, thank you for the best plug-in for g15.
1.How to autohide toolbar on a user created view?
2.What best way to make blinking dots ("DrawRect", not font) about 50/50 millisecond for fullscreen night clock?
Image

ClockView.c
Code:
#import <Views\View.c>
#requires <util\time.c>
struct ClockView extends View {
   var %LargeFont;
   function ClockView() {
      %InitFonts();
      %InitImages();
      %noDrawOnCounterUpdate = 1;
      %noDrawOnAudioChange = 1;
   }
   function Draw() {
      %LargeFont = Font("Installer",48,0,0,0,0);
      NeedRedraw();
      ClearScreen();
      InvertRect(0,0,160,80);
      UseFont(%LargeFont);
      DisplayTextRight(FormatTime("H"),75,-5,0,1);
      DisplayText(FormatTime("NN"),85,-5,0,1);

      //colon
      InvertRect(79,12,81,14);
      InvertRect(79,25,81,27);

      //lower cpu usage
      Sleep(100);
   }
}

Thanks for advice.


Top
 Profile  
 
 Post subject: Re: LCD Miscellany mod v0.4.5.0
PostPosted: Sun Mar 14, 2010 8:31 am 
Offline

Joined: Sun Jul 02, 2006 6:56 pm
Posts: 459
Toolbar should automatically hide itself after a couple seconds. If it's not doing so, not sure what's going on. You are either calling ClearScreen or filling the entire image yourself? Each time draw() is called, it starts with the previous image, so if the previous image had a toolbar, and you're not drawing on top of it, will still be there.

Simplest way is to create a class variable, and do something like this:

struct MediaView extends View {
var %drawDots;
var %blinkTimer;

function ToggleDots() {
%drawDots = !%drawDots;
NeedRedraw();
}

function Show() {
if (!%blinkTimer) {
%blinkTimer = CreateFastTimer("ToggleDots", 50,,$this);
// Not really needed, but start with visible dots.
%drawDots = 1;
}
}

function Hide() {
if (%blinkTimer) {
KillTimer(%blinkTimer);
%blinkTimer = 0;
}
}
};

Then in your Draw function, just use the state of %drawDots to determine whether or not to draw the dots. The 50 is the delay, in milliseconds. Code adapted from MediaView's text scrolling code, though the blinking cursor code in the text editor is a bit more similar to what you need, as-is.


Top
 Profile  
 
 Post subject: Re: LCD Miscellany mod v0.4.5.0
PostPosted: Mon Mar 15, 2010 12:21 pm 
Offline

Joined: Sun Mar 14, 2010 6:32 am
Posts: 2
Thank you, now toolbar autohide ("NeedRedraw" function was incorrectly placed) & blinking dots works fine. I thought long before realized to comment out "noDrawOnCounterUpdate=1" :oops:

I apologize for my poor English.

Quote:
the blinking cursor code in the text editor is a bit more similar to what you need

Yes, I made a mistake in the question: the necessary delay - exactly 500ms (0.5 seconds). But, this is already fixed.


Last edited by susanin on Tue Mar 16, 2010 7:55 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: LCD Miscellany mod v0.4.5.0
PostPosted: Mon Mar 15, 2010 1:05 pm 
Offline

Joined: Sun Jul 02, 2006 6:56 pm
Posts: 459
Oh yea...The menu code won't force a refresh in order to hide itself, will hide on the next redraw once it decides to hide itself. Might be a good idea to fix that.


Top
 Profile  
 
 Post subject: Re: LCD Miscellany mod v0.4.5.0
PostPosted: Sun Mar 28, 2010 9:01 am 
Offline

Joined: Fri Feb 05, 2010 11:09 pm
Posts: 6
Dwarg wrote:
I've since had at least one other person mention the issue. He's running Vista 64. Are you running the 64- or 32-bit executable?


Not sure, but I think I'm running the 64-bit executable.

Also, this mod doesn't show my CPU cores correctly or my CPU Usage. The bars show no activity. I'm using a Core i7 920.


Top
 Profile  
 
 Post subject: Re: LCD Miscellany mod v0.4.5.0
PostPosted: Sun Mar 28, 2010 11:17 am 
Offline

Joined: Sun Jul 02, 2006 6:56 pm
Posts: 459
Turns out it's a windows bug (gasp). Windows update doesn't remove old outdated temp logging data, apparently, and still having it around with newer versions of windows makes windows mad. Leak may well be mine, but the underlying issue is Microsoft's fault.

Do the following at a command prompt:

cd\windows\system32
lodctr /R

Not sure if the cd is needed.


Top
 Profile  
 
 Post subject: Re: LCD Miscellany mod v0.4.5.0
PostPosted: Fri Apr 16, 2010 3:40 pm 
Offline

Joined: Fri Feb 05, 2010 11:09 pm
Posts: 6
Your latest version no longer appears to have the memory leak. Good work. This is an excellent plugin.

:D


Top
 Profile  
 
 Post subject: Re: LCD Miscellany mod v0.4.5.0
PostPosted: Fri Apr 16, 2010 3:42 pm 
Offline

Joined: Fri Feb 05, 2010 11:09 pm
Posts: 6
Dwarg wrote:
Turns out it's a windows bug (gasp). Windows update doesn't remove old outdated temp logging data, apparently, and still having it around with newer versions of windows makes windows mad. Leak may well be mine, but the underlying issue is Microsoft's fault.

Do the following at a command prompt:

cd\windows\system32
lodctr /R

Not sure if the cd is needed.


Oh, and this fixed my CPU bars issue :P


Top
 Profile  
 
 Post subject: Re: LCD Miscellany mod v0.4.5.0
PostPosted: Fri Apr 16, 2010 3:43 pm 
Offline

Joined: Sun Jul 02, 2006 6:56 pm
Posts: 459
It's still there...Just only happens when performance counters are broken, so I'm not even sure it's my leak - though it may well be. Can't really break them myself to duplicate the issue, making figuring it out, if it is my code, more effort than it's worth.


Top
 Profile  
 
 Post subject: Re: LCD Miscellany mod v0.4.5.0
PostPosted: Fri Apr 16, 2010 6:27 pm 
Offline

Joined: Fri Feb 05, 2010 11:09 pm
Posts: 6
Dwarg wrote:
It's still there...Just only happens when performance counters are broken, so I'm not even sure it's my leak - though it may well be. Can't really break them myself to duplicate the issue, making figuring it out, if it is my code, more effort than it's worth.


Well maybe you'll find a way to fix it. I think it would be worth it :P

But yeah, no problems on my end now. Loving it. Thanks again!


Top
 Profile  
 
 Post subject: Re: LCD Miscellany mod v0.4.5.0
PostPosted: Fri Apr 16, 2010 6:30 pm 
Offline

Joined: Sun Jul 02, 2006 6:56 pm
Posts: 459
Spend hours looking for it, then post an attempt at a fix...And hope someone who hasn't yet run the workaround I posted earlier tries it before running the fix, possibly waiting weeks or months to hear if it's fixed or not, if I ever do. At which point, I have to spend a while to get back up to speed on the relevant ~10 chunks of code (Some with over 200 lines), remember what changes I made, etc.

Alternatively, repeatedly install Windows and slowly install updates one by one until I manage to duplicate the issue.

Just not productive use of hours of my time, particularly for something that's free and an issue I have never run into that I've posted a workaround to. Mail me a PC that still has the issue, and I'll look into it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 250 posts ]  Go to page Previous  1 ... 13, 14, 15, 16, 17  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group