comp.lang.ada
 help / color / mirror / Atom feed
* memory leak with new GPS in GNAT GPL 2012 on Windows
@ 2012-06-28 17:57 yogeshwarsing
  2012-06-28 18:25 ` Anh Vo
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: yogeshwarsing @ 2012-06-28 17:57 UTC (permalink / raw)


Hi,
   I installed the new GNAT GPL 2012 on a Win XP 32-bit machine and a couple of times the GPS editor just crashed without warning. Task manager showed that the GPS application is just swallowing memory continuously even when I am not doing anything. Of course, a point is then reached when GPS application just crashes.

Anyone else experiencing this?


Thanks.
YC



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: memory leak with new GPS in GNAT GPL 2012 on Windows
  2012-06-28 17:57 memory leak with new GPS in GNAT GPL 2012 on Windows yogeshwarsing
@ 2012-06-28 18:25 ` Anh Vo
  2012-06-29  7:06   ` yogeshwarsing
  2012-06-30 16:08 ` francois_fabien
  2012-07-01 20:01 ` sbelmont700
  2 siblings, 1 reply; 14+ messages in thread
From: Anh Vo @ 2012-06-28 18:25 UTC (permalink / raw)


On Thursday, June 28, 2012 10:57:40 AM UTC-7, (unknown) wrote:
> Hi,
>    I installed the new GNAT GPL 2012 on a Win XP 32-bit machine and a couple of times the GPS editor just crashed without warning. Task manager showed that the GPS application is just swallowing memory continuously even when I am not doing anything. Of course, a point is then reached when GPS application just crashes.
> 
> Anyone else experiencing this?
 
No, it works fine for me even I left it run overnight.

A. Vo



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: memory leak with new GPS in GNAT GPL 2012 on Windows
  2012-06-28 18:25 ` Anh Vo
@ 2012-06-29  7:06   ` yogeshwarsing
  2012-06-29 16:35     ` Shark8
  2012-06-29 16:36     ` Anh Vo
  0 siblings, 2 replies; 14+ messages in thread
From: yogeshwarsing @ 2012-06-29  7:06 UTC (permalink / raw)


I'm referring in my above post to latest GPS on Windows 32-bit version:

GPS 5.1.1 (20111220) hosted on i686-pc-mingw32
GNAT GPL 2012 (20120509)

(This is the version on which I am experiencing memory leak).

I also have GPS from GNAT 2011 of version

GPS 5.0.1 (20110113) hosted on i686-pc-mingw32
GNAT GPL 2011 (20110428)

and I do not have any such problems with it.

YC



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: memory leak with new GPS in GNAT GPL 2012 on Windows
  2012-06-29  7:06   ` yogeshwarsing
@ 2012-06-29 16:35     ` Shark8
  2012-06-29 16:36     ` Anh Vo
  1 sibling, 0 replies; 14+ messages in thread
From: Shark8 @ 2012-06-29 16:35 UTC (permalink / raw)


On Friday, June 29, 2012 2:06:51 AM UTC-5, (unknown) wrote:
> I'm referring in my above post to latest GPS on Windows 32-bit version:
> 
> GPS 5.1.1 (20111220) hosted on i686-pc-mingw32
> GNAT GPL 2012 (20120509)
> 
> (This is the version on which I am experiencing memory leak).
> 
> I also have GPS from GNAT 2011 of version
> 
> GPS 5.0.1 (20110113) hosted on i686-pc-mingw32
> GNAT GPL 2011 (20110428)
> 
> and I do not have any such problems with it.
> 
> YC

I've noticed that some of the Windows versions of GPS seem unstable. I'm not sure why that is, but it does seem to get cleared up most of the time.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: memory leak with new GPS in GNAT GPL 2012 on Windows
  2012-06-29  7:06   ` yogeshwarsing
  2012-06-29 16:35     ` Shark8
@ 2012-06-29 16:36     ` Anh Vo
  2012-06-30  7:39       ` yogeshwarsing
  2012-07-02 17:11       ` Anh Vo
  1 sibling, 2 replies; 14+ messages in thread
From: Anh Vo @ 2012-06-29 16:36 UTC (permalink / raw)


On Friday, June 29, 2012 12:06:51 AM UTC-7, (unknown) wrote:
> I'm referring in my above post to latest GPS on Windows 32-bit version:
> 
> GPS 5.1.1 (20111220) hosted on i686-pc-mingw32
> GNAT GPL 2012 (20120509)
> 
> (This is the version on which I am experiencing memory leak).
> 
> I also have GPS from GNAT 2011 of version
> 
> GPS 5.0.1 (20110113) hosted on i686-pc-mingw32
> GNAT GPL 2011 (20110428)
> 
> and I do not have any such problems with it.
 

From Help->About menu shows I am running

GPS 5.1.1 (20111220) hosted on i686-pc-mingw32 
GNAT GPL 2012 (20120509

Once again, I have no problem whatsoever.

Anh Vo



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: memory leak with new GPS in GNAT GPL 2012 on Windows
  2012-06-29 16:36     ` Anh Vo
@ 2012-06-30  7:39       ` yogeshwarsing
  2012-06-30 12:11         ` Anh Vo
  2012-07-02 17:11       ` Anh Vo
  1 sibling, 1 reply; 14+ messages in thread
From: yogeshwarsing @ 2012-06-30  7:39 UTC (permalink / raw)



> 
> Once again, I have no problem whatsoever.
> 
> Anh Vo

Are you using Win XP SP3 32-bit?



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: memory leak with new GPS in GNAT GPL 2012 on Windows
  2012-06-30  7:39       ` yogeshwarsing
@ 2012-06-30 12:11         ` Anh Vo
  0 siblings, 0 replies; 14+ messages in thread
From: Anh Vo @ 2012-06-30 12:11 UTC (permalink / raw)


On Saturday, June 30, 2012 12:39:11 AM UTC-7, (unknown) wrote:
> > 
> > Once again, I have no problem whatsoever.
> > 
> > Anh Vo
> 
> Are you using Win XP SP3 32-bit?

I am using Win XP SP2 32-bit.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: memory leak with new GPS in GNAT GPL 2012 on Windows
  2012-06-28 17:57 memory leak with new GPS in GNAT GPL 2012 on Windows yogeshwarsing
  2012-06-28 18:25 ` Anh Vo
@ 2012-06-30 16:08 ` francois_fabien
  2012-06-30 17:58   ` yogeshwarsing
  2012-07-01 20:01 ` sbelmont700
  2 siblings, 1 reply; 14+ messages in thread
From: francois_fabien @ 2012-06-30 16:08 UTC (permalink / raw)


Le jeudi 28 juin 2012 19:57:40 UTC+2, (inconnu) a écrit :
> Hi,
>    I installed the new GNAT GPL 2012 on a Win XP 32-bit machine and a couple of times the GPS editor just crashed without warning. Task manager showed that the GPS application is just swallowing memory continuously even when I am not doing anything. Of course, a point is then reached when GPS application just crashes.

I am using WinXP Family edition 32bits with SP3 on single core Celeron.
I installed GNAT GPL 2012 but I noticed i must also change manually the environment variable PATH to use the updated gcc (I have GNAT GPL 2011 installed). Otherwise GPS 2012 use the binaries from the 2011 distro.

Target: i686-pc-mingw32
Thread model: win32
gcc version 4.5.4 20120510 for GNAT GPL 2012 (20120509) (GCC) 

Task manager indicates 64 Megabytes of memory used by gps.exe with only 1 thread.
I can compile and run several demos with or without tasking and no crash or leaks.
I also noticed of 4 Kbyte increment of memory every second even when I do nothing.
I think the leak could come from the GTK library. A leak in GTK has already been
reported on this forum.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: memory leak with new GPS in GNAT GPL 2012 on Windows
  2012-06-30 16:08 ` francois_fabien
@ 2012-06-30 17:58   ` yogeshwarsing
  2012-07-01  8:54     ` Simon Wright
  2012-07-01 10:51     ` francois_fabien
  0 siblings, 2 replies; 14+ messages in thread
From: yogeshwarsing @ 2012-06-30 17:58 UTC (permalink / raw)


> I am using WinXP Family edition 32bits with SP3 on single core Celeron.
> I installed GNAT GPL 2012 but I noticed i must also change manually the environment variable PATH to use the updated gcc (I have GNAT GPL 2011 installed). Otherwise GPS 2012 use the binaries from the 2011 distro.

When installing GNAT GPL 2012, the item: C:\GNAT\2012\bin is added in the Windows environment path. C:\GNAT\2011\bin will still be there but C:\GNAT\2012\bin will be written in the path BEFORE C:\GNAT\2011\bin and so GPS 2012 will use binaries from C:\GNAT\2012\bin.

I think if you take away C:\GNAT\2012\bin from the path and then try to compile a program using the -gnat2012 switch (Project properties > switches > Ada) then it won't run as then the binaries from the 2011 distribution would be called and I do not think that the 2011 binaries were supporting the -gnat2012 switch.

> Task manager indicates 64 Megabytes of memory used by gps.exe with only 1 thread.
> I can compile and run several demos with or without tasking and no crash or leaks.
> I also noticed of 4 Kbyte increment of memory every second even when I do nothing.
> I think the leak could come from the GTK library. A leak in GTK has already been
> reported on this forum.

In my case when running the simple program below, I find an increase of 48 kbyte every second even when GPS is idle. Here is the simple program that I am running:

with System.Dim.MKS; use System.Dim.Mks;
with System.Dim.Mks_IO; use System.Dim.Mks_IO;
with Text_IO; use Text_IO;


procedure Free_Fall3 is
       subtype Acceleration is Mks_Type
       with Dimension => ("m/s^2", Meter => 1, Second => -2, others => 0);
       G : constant acceleration := 127137.6 * km/(hour ** 2) ;
       T : Time := 10.0/3600.0 * hour;
       Distance : length;

     begin
       Put ("Gravitational constant: ");
       Put (G, Aft => 2, Exp => 0); Put_Line ("");
       Put ("Time: ");
       Put (T, fore => 4, Aft => 4, Exp => 0); Put_Line ("");
       Distance := 0.5 * G * T ** 2;
       Put ("distance travelled in 10 seconds (or 10/3600 hour) of free fall ");
       Put (Distance, fore => 4, Aft => 4, Exp => 0);
       Put_Line ("");
end Free_Fall3;


Thanks.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: memory leak with new GPS in GNAT GPL 2012 on Windows
  2012-06-30 17:58   ` yogeshwarsing
@ 2012-07-01  8:54     ` Simon Wright
  2012-07-01 10:51     ` francois_fabien
  1 sibling, 0 replies; 14+ messages in thread
From: Simon Wright @ 2012-07-01  8:54 UTC (permalink / raw)


yogeshwarsing@gmx.com writes:

> I think if you take away C:\GNAT\2012\bin from the path and then try
> to compile a program using the -gnat2012 switch (Project properties >
> switches > Ada) then it won't run as then the binaries from the 2011
> distribution would be called and I do not think that the 2011 binaries
> were supporting the -gnat2012 switch.

Here (Mac OS X) GNAT GPL 2011 supports -gnat2012 (and -gnat12).



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: memory leak with new GPS in GNAT GPL 2012 on Windows
  2012-06-30 17:58   ` yogeshwarsing
  2012-07-01  8:54     ` Simon Wright
@ 2012-07-01 10:51     ` francois_fabien
  2012-07-01 12:55       ` Dmitry A. Kazakov
  1 sibling, 1 reply; 14+ messages in thread
From: francois_fabien @ 2012-07-01 10:51 UTC (permalink / raw)


> In my case when running the simple program below, I find an increase of 48 kbyte every second even when GPS is idle. Here is the simple program that I am running:
> 
I have compiled and run the Test_Fall3 program but did not noticed anything.
The memory leak seems to appear spuriously(not always), but the size of it is still 4 Kb/sec in the Task manager, even when GPS is idle.
When I minimize/maximize the GPS window, the used memory decreases but the virtual memory is left almost unchanged.
Since GPS is using GTK, and GTK has a loop, I would think that this loop is leaking.
But on Windows we cannot use Valgrind to check for memory leaks.




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: memory leak with new GPS in GNAT GPL 2012 on Windows
  2012-07-01 10:51     ` francois_fabien
@ 2012-07-01 12:55       ` Dmitry A. Kazakov
  0 siblings, 0 replies; 14+ messages in thread
From: Dmitry A. Kazakov @ 2012-07-01 12:55 UTC (permalink / raw)


On Sun, 1 Jul 2012 03:51:09 -0700 (PDT), francois_fabien@hotmail.com wrote:

> Since GPS is using GTK, and GTK has a loop, I would think that this loop is leaking.

It is probably this:

http://stackoverflow.com/questions/10837776/memory-leak-in-gtk-under-windows-7-in-gtk-widget-queue-draw

The bug is in GTK itself, which leaks upon queueing window refresh
requests. Presumably GTK does not free some Windows GDI resources.

We have no better choice that to wait for GTK going 3.x under Windows and
see if the bug is still there.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: memory leak with new GPS in GNAT GPL 2012 on Windows
  2012-06-28 17:57 memory leak with new GPS in GNAT GPL 2012 on Windows yogeshwarsing
  2012-06-28 18:25 ` Anh Vo
  2012-06-30 16:08 ` francois_fabien
@ 2012-07-01 20:01 ` sbelmont700
  2 siblings, 0 replies; 14+ messages in thread
From: sbelmont700 @ 2012-07-01 20:01 UTC (permalink / raw)


On Thursday, June 28, 2012 1:57:40 PM UTC-4, (unknown) wrote:
> 
> Anyone else experiencing this?
> 

FWIW, I left GPS 5.1.1 (20111220) on Vista 32-bit running idle for several hours, and it did indeed slowly increase its private memory usage from 70MB to about 130MB; i did not leave it around long enough to observe any errant behavior, however.

-sb



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: memory leak with new GPS in GNAT GPL 2012 on Windows
  2012-06-29 16:36     ` Anh Vo
  2012-06-30  7:39       ` yogeshwarsing
@ 2012-07-02 17:11       ` Anh Vo
  1 sibling, 0 replies; 14+ messages in thread
From: Anh Vo @ 2012-07-02 17:11 UTC (permalink / raw)


On Friday, June 29, 2012 9:36:13 AM UTC-7, Anh Vo wrote:
> On Friday, June 29, 2012 12:06:51 AM UTC-7, (unknown) wrote:
> > I'm referring in my above post to latest GPS on Windows 32-bit version:
> > 
> > GPS 5.1.1 (20111220) hosted on i686-pc-mingw32
> > GNAT GPL 2012 (20120509)
> > 
> > (This is the version on which I am experiencing memory leak).
> > 
> > I also have GPS from GNAT 2011 of version
> > 
> > GPS 5.0.1 (20110113) hosted on i686-pc-mingw32
> > GNAT GPL 2011 (20110428)
> > 
> > and I do not have any such problems with it.
>  
> 
> From Help->About menu shows I am running
> 
> GPS 5.1.1 (20111220) hosted on i686-pc-mingw32 
> GNAT GPL 2012 (20120509
> 
> Once again, I have no problem whatsoever.

Let's me correct myself. Now I can see the same leak in Memory Usage column. Some time the leak stops sometime it continues on while no activity. However, when gps is iconified, the Memory Usage drops to the low of 2M. In addition, when gps is restored, the number jumps higher but much less compared to original number when gps first opened.

I will leave it iconfied over night again and check it tomorrow to see if my system runs out of Memory or not. 



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-07-02 17:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-28 17:57 memory leak with new GPS in GNAT GPL 2012 on Windows yogeshwarsing
2012-06-28 18:25 ` Anh Vo
2012-06-29  7:06   ` yogeshwarsing
2012-06-29 16:35     ` Shark8
2012-06-29 16:36     ` Anh Vo
2012-06-30  7:39       ` yogeshwarsing
2012-06-30 12:11         ` Anh Vo
2012-07-02 17:11       ` Anh Vo
2012-06-30 16:08 ` francois_fabien
2012-06-30 17:58   ` yogeshwarsing
2012-07-01  8:54     ` Simon Wright
2012-07-01 10:51     ` francois_fabien
2012-07-01 12:55       ` Dmitry A. Kazakov
2012-07-01 20:01 ` sbelmont700

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox