Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Memory Leak.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Memory Leak.

 Post Reply Post Reply
Author
Message
keepITcool View Drop Down
Groupie
Groupie
Avatar

Joined: 08 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote keepITcool Quote  Post ReplyReply Direct Link To This Post Topic: Memory Leak.
    Posted: 17 May 2009 at 8:26pm
 
I notice significant memory leaks. Am I using the correct settings? Running this on VB6/WinXP.
On startup: 7Mb. Filled 295Mb. Cleared 50Mb .  Repeated filling never gets above 295Mb, Cleared it hovers around the 50Mb.
 
Not (much) difference with .UsereportCustomHeap. But definitely need UseBatchAllocation. Without it used 70Mb after clearing the records the first time.  Tried filling it again and not quite  , but almost.
 
I'd REALLY like an answer/solution. Sample code below.
 
Jurgen
 
 
Simple form with 2 commandbuttons/1 textbutton/1ReportControl (v13.0.0)
 
Private Sub Form_Load()
  With ReportControlGlobalSettings
    .UseReportCustomHeap
    .UseBatchAllocation
  End With
  With ReportControl1
    .Columns.Add 0, "String", 200, True
    .Columns.Add 1, "Value", 200, True
  End With
  Text1 = "300000"
End Sub
 
Private Sub Command1_Click()
  Dim i&, n&
  n = Val(Text1)
  With ReportControl1
    With .Records
      .DeleteAll
      For i = 1 To n
        With .Add
          .AddItem "just some text" & i
          .AddItem i
        End With
      Next
    End With
    .Populate
  End With
End Sub
Private Sub Command2_Click()
  With ReportControl1
    .Records.DeleteAll
    .Populate
  End With
  ReportControlGlobalSettings.FreeBatchExtraData
End Sub
 
 
 
 
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0
Platform: WinXP/Win7(32+64bit)
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2009 at 6:29am
Hi,
 
I tried with your code and my memory doesn't "leak" (See Image)
 
 
 
 
 
Also tried again and commented code:
  •  .UseReportCustomHeap
  •  .UseBatchAllocation

This doesn't change a thing

Start up...
Free Memory: 1446776
Add records...
Free Memory: 1257876
Delete all records...
Free Memory: 1492808
Add records...
Free Memory: 1257868
Delete all records...
Free Memory: 1492544
Add records...
Free Memory: 1257912
Delete all records...
Free Memory: 1492716
Add records...
Free Memory: 1258356
Delete all records...
Free Memory: 1493232
Add records...
Free Memory: 1258232
Delete all records...
Free Memory: 1492960
Add records...
Free Memory: 1257868
Delete all records...
Free Memory: 1492624
 
I don't know what is wrong with your computer but it doesn't free memory as should
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
keepITcool View Drop Down
Groupie
Groupie
Avatar

Joined: 08 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote keepITcool Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2009 at 8:30am

I've just repeated this on 2 clean virtual machine (WinXP and Windows7).  and keep getting the same 50M memory loss.

I'm using a Core2Duo with plenty memory, and it's a very stable machine. (can't remember when it crashed, months and months ago)
I need to dive deeper into this, but I hate the loss of time. Deadline is creeping up on me.
 
I'm using  SuiteControls ocx dated 9 feb 2009. (Both ascii and unicode version give similar results)
Any ideas where or how i should trace this?
 
 
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0
Platform: WinXP/Win7(32+64bit)
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2009 at 9:13am
Hi,
 
Try it with same form and code but load it from other form. After loading records > unload the form with RC on it and check if memory is released ???
 
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
keepITcool View Drop Down
Groupie
Groupie
Avatar

Joined: 08 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote keepITcool Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2009 at 9:23am
tried the extra form. memory not released until program ends...  when proggie is loaded mem usage still hovers in the 50-70MB area after fill/clear
(depending on .UseReportCustomHeap & .UseBatchAllocation & .FreeExtra)
 
Been digging into all kinds of services running on my machine + virtual mem settings)  no differences yet... gotta find me some better digging tools to get to the bottom of this. 
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0
Platform: WinXP/Win7(32+64bit)
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2009 at 10:07am
Hi,
 
---------------------------------------------------------------------------------------
 
I did test on my office PC and all memory will be freed.
 
OS: Microsoft Windows XP Professional, Version 2002, Service Pack 3
 
---------------------------------------------------------------------------------------
 
 
But I did test on my laptop (yesterday) but it didn't free all memory, a few Mb's aren't freed (I will add the info later, I just wanted you to know)
Run in IDE it will run properly but compiled exe doesn't. This is because (I read somewhere) .UseReportCustomHeap and .UseBatchAllocation doesn't work in IDE.
 
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
keepITcool View Drop Down
Groupie
Groupie
Avatar

Joined: 08 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote keepITcool Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2009 at 4:28pm
Hmmm.... it took a while. fidgeting with my memory.. and flashing my BIOS.. and then I forgot to indicate my drives s/b in RAID configuration... which confused windows and it started to chkdsk my drives and made an awful unrepairable mess.  my data was on a different but so many sttings left on C:\  horror.   I'm now in Windows 7 (on bloody G:\ which irritates me) ...  BUT I installed VB6 and Codejock without (too many) problems. 
And I still have the memory leak... Core2Duo  with 2Gb interleaved DDR2.   (50Mb taken for an empty form... DAMN. I am going to escalate this.
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0
Platform: WinXP/Win7(32+64bit)
Back to Top
keepITcool View Drop Down
Groupie
Groupie
Avatar

Joined: 08 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote keepITcool Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 2009 at 6:03pm
Mark Doubson... please read this.
belongs to support ticket 21833, awaiting any reaction.
 
I've  changed memory modules, slots and bios settings. I've changed operating system(s).  Tested on WinXP,Win7(x32),Win7(x64)..  all have the same issue...   Fill the report ..clear it and some 35 to 50 MByte of memory remains locked until the application is terminated (either compiled or in VBide)  
 
Jurgen Volkerink aka keepITcool
 
 
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0
Platform: WinXP/Win7(32+64bit)
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2009 at 2:54pm
This is stange - I repeat all your tests from Issue and send you results in snapshots. With you own settings I saw little memory not released (in Task Manager) but not 50MB - 100 times less so it can be situational. And you open Issue and never react on answers...
Back to Top
keepITcool View Drop Down
Groupie
Groupie
Avatar

Joined: 08 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote keepITcool Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2009 at 3:07pm

As you see in this thread while fiddling with my hardware to resolve this issue I totally screwed the RAID on my PC.  So I had to reinstall quite some stuff.

Mybe I got confused, but I am certain that I cannot log in to support issue with the username/password i received when I opened the support issue.
 
I'm now updated to all the latest Bios/Drivers etc. I even bought some extra memory. But the issue is exactly the same, whether in XP, Windows 7 32 bit or Windows 7 64 bit.  I'll test with a standard MS Listview and report back (here or in the issue when I receive an updated/reset login)
 
Thanx for listening!, Jurgen aka keepITcool
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0
Platform: WinXP/Win7(32+64bit)
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2009 at 3:12pm
OK. I answered you on May, 23. Ask Customer Service to check you name / psw
Back to Top
keepITcool View Drop Down
Groupie
Groupie
Avatar

Joined: 08 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote keepITcool Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2009 at 3:35pm
Just ran a test withMS Listview SP6.  Runs up to around 200Mb, but gives it back instantly on clear.
Will contact Support for PW.
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0
Platform: WinXP/Win7(32+64bit)
Back to Top
keepITcool View Drop Down
Groupie
Groupie
Avatar

Joined: 08 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote keepITcool Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2009 at 6:38pm
Still can't get into support to see your answers. And it's bloody weekend now. I'm reading up on memory stuff on MSDN.

My guess: it's related to the 2Gb boundary or Physical Address Extension / Data Execution Prevention etc.. 

Hardly my usual stuff, but I'm a terrier, and I want this solved, my app is due on june 1st, and the memory leak will be reason for refusal by my client.
=> meaning I wont get paid until I solve this. I changed from IGrid to CodeJock late in the game, and it set me back by a month. (It's a 14k line project and a demanding project manager for a commercial app.  I'm not too happy to switch to yet another control.
 
I've tried safemode. no luck. but this weekend I'll do ALL the footwork with my hardware. I'll try with 1Gb/2Gb/4Gb and several bios options.. and I'm sure I can dig around for an old VBA card that doesn't use shared memory (IF that is the problem). I'll bloody find the "situational" setting that ReportControl can't manage!
 
No worries, this will continue on monday.
 
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0
Platform: WinXP/Win7(32+64bit)
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2009 at 6:41pm
Listen me - create a good data provider (e.g. database) and use real virtual mode like here
I can give you my sample code if you will ask
Back to Top
keepITcool View Drop Down
Groupie
Groupie
Avatar

Joined: 08 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote keepITcool Quote  Post ReplyReply Direct Link To This Post Posted: 31 May 2009 at 9:25am
Mark, still no word from the office re UN/PW.
 
a) Your suggestion is what MS$ is/was famous for.  It's not a bug, it's a known issue. We'll not fix the bug, but give you a workaround.
 
b) My project is for wide distribution (>15000 users) and we're a small outfit. We decided against using a data provider at the beginning of the project which now stands at 15k lines of code. Our users range from corporations to small business and not all are computer savvy. We prefer spending our support time to functionality and avoid "compatibility and installation issues", thus no caching in databases etc.  My app is due shortly, and my time is precious. With the exception of the memory leak the reportcontrol functions very well. 
 
c) The Virtual list sample in the standard samples: I added an entry form to load and unload the main form. The memory leak is less pronounced (approx 5MB)  but it's still there.
 
d) in the meantime I found an API (EmptyWorkingSet) that reduces the amount of WorkingSet / Private memory by swapping it to the pagefile.
Most users will not notice that I'm cheating.
 
e) I will make an effort to implement virtual mode in the Report that's causing the memory probs(with or witout a disconnected recordset). Ofcourse it happens to be the most complex one in my project with lots of grouping/sorting, conditional coloring, multiple selection etc.   The sample for Virtual List is rudimentary, glancing at how it handles grouping I fear I'll need plenty documentation.. but CJ helpfile is totally useless.
 
I hope to be able to read the support issue soonest. and we'll continue the discussion there. There's plenty of other todo's on my list.
 
Cheerz, Jurgen
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0
Platform: WinXP/Win7(32+64bit)
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 15 June 2009 at 4:13pm
Hi,
 
To keep this post alive...  
 
Someone had same problem a while ago, check this post: https://forum.codejock.com/forum_posts.asp?TID=7921
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
keepITcool View Drop Down
Groupie
Groupie
Avatar

Joined: 08 April 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote keepITcool Quote  Post ReplyReply Direct Link To This Post Posted: 15 June 2009 at 10:03pm
I was hasty testing with 13.1... and it seemed solved, cuz I tested with numbers only.. so I closed it..
When I add an item with a string to my record, the leak is back (or still there)
 
I'm also unhappy with general memory consumption, which is very high at >1KB per record.
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0
Platform: WinXP/Win7(32+64bit)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.