Not enough memory?? 
Author Message
 Not enough memory??

I had this posted in .formscoding for a while but had no response, so I'm
reposting here...

I seem to be getting this message a lot...
"Not enough memory to update screen display"

(Access 97, Windows 98 II)
Can someone tell me what causes this, or please point me in the direction of
a solution?

Thanks,
Derek



Mon, 24 Mar 2003 03:00:00 GMT  
 Not enough memory??
Derek:

I would check your app to make sure that it appropriately closes down and
sets to nothing objects it opens and other references that it sets.  (e.g.
db objects, table, recordset objects, etc.)  Avoid domain functions (dlookup
etc.)   Lower the amount of graphic and other resouces the app uses (e.g.
embedded graphs, images etc.)
--
Steve Arbaugh
ATTAC Consulting Group
http://ourworld.compuserve.com/homepages/attac-cg/acgsoft.htm


Quote:

> I had this posted in .formscoding for a while but had no response, so I'm
> reposting here...

> I seem to be getting this message a lot...
> "Not enough memory to update screen display"

> (Access 97, Windows 98 II)
> Can someone tell me what causes this, or please point me in the direction
of
> a solution?



Thu, 27 Mar 2003 03:00:00 GMT  
 Not enough memory??
Almost surely caused by a GDI Resource Leak, which I've been dealing with
myself lately. Running a memory-reporting utility that includes a reading
for GDI Resources may help you troubleshoot the problem.

In my case, I get a GDI leak (in both Acc97 and Acc2K running under Win98),
when frequently changing a control's  font characteristics (FontName,
FontSize, FontBold, FontItalic, FontUnderline).

Is your program changing font characteristics of a control?

Greg Hansen
Distinctive Data Solutions
http://www.distinctivedata.com


Quote:

> I had this posted in .formscoding for a while but had no response, so I'm
> reposting here...

> I seem to be getting this message a lot...
> "Not enough memory to update screen display"

> (Access 97, Windows 98 II)
> Can someone tell me what causes this, or please point me in the direction
of
> a solution?

> Thanks,
> Derek



Thu, 27 Mar 2003 03:00:00 GMT  
 Not enough memory??
Win98/A97  Win95/A97
Greg I am unable to duplicate the resource leak you mentioned. Is this
documented anywhere at Microsoft?

I ran the following code with the TimerInterval set to 1 second for
approximately 1 hour.
Private Sub Form_Timer()
Dim x As Long

lngTimerCounter = lngTimerCounter + 1

    If (lngTimerCounter Mod 2 = 0) Then
    Me.Text1.FontName = "Arial"
    Else
     Me.Text1.FontName = "tahoma"
    End If

    Me.Text1.FontBold = Not Me.Text1.FontBold
    Me.Text1.FontItalic = Not Me.Text1.FontItalic
    Me.Repaint
End Sub

Have you been able to duplicate the resource leak you see on a different
computer? I thought all of the documented "loss of resource" issues had
to do with images on Forms, controls etc. Is there a chance that by
changing the Font you are forcing a general screen repaint and bringing
one of the known resource leaks into play?
The only other OS resource leak issue I've run into has been with
Metafiles.

Just curious.

--
Stephen Lebans

http://www.lebans.com
Access Code, Tips and Tricks


Quote:
> Almost surely caused by a GDI Resource Leak, which I've been dealing
with
> myself lately. Running a memory-reporting utility that includes a
reading
> for GDI Resources may help you troubleshoot the problem.

> In my case, I get a GDI leak (in both Acc97 and Acc2K running under
Win98),
> when frequently changing a control's  font characteristics (FontName,
> FontSize, FontBold, FontItalic, FontUnderline).

> Is your program changing font characteristics of a control?

> Greg Hansen
> Distinctive Data Solutions
> http://www.distinctivedata.com



> > I had this posted in .formscoding for a while but had no response,
so I'm
> > reposting here...

> > I seem to be getting this message a lot...
> > "Not enough memory to update screen display"

> > (Access 97, Windows 98 II)
> > Can someone tell me what causes this, or please point me in the
direction
> of
> > a solution?

> > Thanks,
> > Derek



Thu, 27 Mar 2003 03:00:00 GMT  
 Not enough memory??
Hi Steve,
I'm pretty conscientious about properly closing all recordsets and setting
all objects to nothing.  I had to be, in order to make Access even close
properly.
I never use domain functions, but if I did I would expect them to work
correctly without causing errors!  I do have one screen which contains 2
small graphs and one small bitmap --- surely this cannot be too much for
mighty Microsoft Access.  All machines have at least 64MB.  Video cards vary
widely... I have this app running on about 150 workstations in various
locations -- the problem only crops up on some machines (including my own
laptop), but I can't figure out what they might have in common.

FWIW it never happens under NT workstation, only 98.  I haven't really
tested it under ME, but it seems to me that ME is leaking resources all over
the place.  (But that's another story).

Derek


Quote:
> Derek:

> I would check your app to make sure that it appropriately closes down and
> sets to nothing objects it opens and other references that it sets.  (e.g.
> db objects, table, recordset objects, etc.)  Avoid domain functions
(dlookup
> etc.)   Lower the amount of graphic and other resouces the app uses (e.g.
> embedded graphs, images etc.)
> --
> Steve Arbaugh
> ATTAC Consulting Group
> http://ourworld.compuserve.com/homepages/attac-cg/acgsoft.htm



> > I had this posted in .formscoding for a while but had no response, so
I'm
> > reposting here...

> > I seem to be getting this message a lot...
> > "Not enough memory to update screen display"

> > (Access 97, Windows 98 II)
> > Can someone tell me what causes this, or please point me in the
direction
> of
> > a solution?



Fri, 28 Mar 2003 13:34:28 GMT  
 Not enough memory??
Hmmm. No, I haven't had the opportunity to reproduce the problem on another
computer, and the problem may very well be due to some condition with my own
system. I searched KB extensively and found nothing pertinent to this
specific GDI leak. Still, the leak occurred consistently on my system across
two different Win98 installations, with two different video cards, and in
both Acc97 and Acc2K. Here is the specific section of code that caused the
leak to occur, and the notes I made while troubleshooting (the "ctl" refers
to a label):

    ctl.FontName = gstrHighlightedFontName         'Causes leak
    ctl.FontSize = gintHighlightedFontSize               'Causes leak
    ctl.ForeColor = glngHighlightedForeColor         'No Problems
    ctl.BackColor = glngHighlightedBackColor        'No Problems
    ctl.BackStyle = gintHighlightedBackStyle           'No Problems
    ctl.FontBold = gbooHighlightedBold                  'Causes leak
    ctl.FontItalic = gbooHighlightedItalic                  'Causes leak
    ctl.FontUnderline = gbooHighlightedUnderline    'Causes leak
    ctl.TextAlign = gintHighlightedAlignment             'No Problems

There are several image controls on the form, which also get loaded with
different images based on user-input, but those operations cause no
problems.... Curious, huh?

These problems resulted in the exact error Derek was hitting, "Not enough
memory to update screen display", once GDI resources dropped too low.

Greg Hansen
Distinctive Data Solutions
http://www.distinctivedata.com


Quote:
> Win98/A97  Win95/A97
> Greg I am unable to duplicate the resource leak you mentioned. Is this
> documented anywhere at Microsoft?

> I ran the following code with the TimerInterval set to 1 second for
> approximately 1 hour.
> Private Sub Form_Timer()
> Dim x As Long

> lngTimerCounter = lngTimerCounter + 1

>     If (lngTimerCounter Mod 2 = 0) Then
>     Me.Text1.FontName = "Arial"
>     Else
>      Me.Text1.FontName = "tahoma"
>     End If

>     Me.Text1.FontBold = Not Me.Text1.FontBold
>     Me.Text1.FontItalic = Not Me.Text1.FontItalic
>     Me.Repaint
> End Sub

> Have you been able to duplicate the resource leak you see on a different
> computer? I thought all of the documented "loss of resource" issues had
> to do with images on Forms, controls etc. Is there a chance that by
> changing the Font you are forcing a general screen repaint and bringing
> one of the known resource leaks into play?
> The only other OS resource leak issue I've run into has been with
> Metafiles.

> Just curious.

> --
> Stephen Lebans

> http://www.lebans.com
> Access Code, Tips and Tricks



> > Almost surely caused by a GDI Resource Leak, which I've been dealing
> with
> > myself lately. Running a memory-reporting utility that includes a
> reading
> > for GDI Resources may help you troubleshoot the problem.

> > In my case, I get a GDI leak (in both Acc97 and Acc2K running under
> Win98),
> > when frequently changing a control's  font characteristics (FontName,
> > FontSize, FontBold, FontItalic, FontUnderline).

> > Is your program changing font characteristics of a control?

> > Greg Hansen
> > Distinctive Data Solutions
> > http://www.distinctivedata.com



> > > I had this posted in .formscoding for a while but had no response,
> so I'm
> > > reposting here...

> > > I seem to be getting this message a lot...
> > > "Not enough memory to update screen display"

> > > (Access 97, Windows 98 II)
> > > Can someone tell me what causes this, or please point me in the
> direction
> > of
> > > a solution?

> > > Thanks,
> > > Derek



Fri, 28 Mar 2003 03:00:00 GMT  
 Not enough memory??
Greg if you can ZIP up a MDB I'd run it here to see if I can reproduce
the leak.

--
Stephen Lebans

http://www.lebans.com
Access Code, Tips and Tricks


Quote:
> Hmmm. No, I haven't had the opportunity to reproduce the problem on
another
> computer, and the problem may very well be due to some condition with
my own
> system. I searched KB extensively and found nothing pertinent to this
> specific GDI leak. Still, the leak occurred consistently on my system
across
> two different Win98 installations, with two different video cards, and
in
> both Acc97 and Acc2K. Here is the specific section of code that caused
the
> leak to occur, and the notes I made while troubleshooting (the "ctl"
refers
> to a label):

>     ctl.FontName = gstrHighlightedFontName         'Causes leak
>     ctl.FontSize = gintHighlightedFontSize               'Causes leak
>     ctl.ForeColor = glngHighlightedForeColor         'No Problems
>     ctl.BackColor = glngHighlightedBackColor        'No Problems
>     ctl.BackStyle = gintHighlightedBackStyle           'No Problems
>     ctl.FontBold = gbooHighlightedBold                  'Causes leak
>     ctl.FontItalic = gbooHighlightedItalic                  'Causes
leak
>     ctl.FontUnderline = gbooHighlightedUnderline    'Causes leak
>     ctl.TextAlign = gintHighlightedAlignment             'No Problems

> There are several image controls on the form, which also get loaded
with
> different images based on user-input, but those operations cause no
> problems.... Curious, huh?

> These problems resulted in the exact error Derek was hitting, "Not
enough
> memory to update screen display", once GDI resources dropped too low.

> Greg Hansen
> Distinctive Data Solutions
> http://www.distinctivedata.com



> > Win98/A97  Win95/A97
> > Greg I am unable to duplicate the resource leak you mentioned. Is
this
> > documented anywhere at Microsoft?

> > I ran the following code with the TimerInterval set to 1 second for
> > approximately 1 hour.
> > Private Sub Form_Timer()
> > Dim x As Long

> > lngTimerCounter = lngTimerCounter + 1

> >     If (lngTimerCounter Mod 2 = 0) Then
> >     Me.Text1.FontName = "Arial"
> >     Else
> >      Me.Text1.FontName = "tahoma"
> >     End If

> >     Me.Text1.FontBold = Not Me.Text1.FontBold
> >     Me.Text1.FontItalic = Not Me.Text1.FontItalic
> >     Me.Repaint
> > End Sub

> > Have you been able to duplicate the resource leak you see on a
different
> > computer? I thought all of the documented "loss of resource" issues
had
> > to do with images on Forms, controls etc. Is there a chance that by
> > changing the Font you are forcing a general screen repaint and
bringing
> > one of the known resource leaks into play?
> > The only other OS resource leak issue I've run into has been with
> > Metafiles.

> > Just curious.

> > --
> > Stephen Lebans

> > http://www.lebans.com
> > Access Code, Tips and Tricks



> > > Almost surely caused by a GDI Resource Leak, which I've been
dealing
> > with
> > > myself lately. Running a memory-reporting utility that includes a
> > reading
> > > for GDI Resources may help you troubleshoot the problem.

> > > In my case, I get a GDI leak (in both Acc97 and Acc2K running
under
> > Win98),
> > > when frequently changing a control's  font characteristics
(FontName,
> > > FontSize, FontBold, FontItalic, FontUnderline).

> > > Is your program changing font characteristics of a control?

> > > Greg Hansen
> > > Distinctive Data Solutions
> > > http://www.distinctivedata.com



> > > > I had this posted in .formscoding for a while but had no
response,
> > so I'm
> > > > reposting here...

> > > > I seem to be getting this message a lot...
> > > > "Not enough memory to update screen display"

> > > > (Access 97, Windows 98 II)
> > > > Can someone tell me what causes this, or please point me in the
> > direction
> > > of
> > > > a solution?

> > > > Thanks,
> > > > Derek



Sat, 29 Mar 2003 08:35:59 GMT  
 Not enough memory??

Quote:

>I do have one screen which contains 2
>small graphs and one small bitmap --- surely this cannot be too much for
>mighty Microsoft Access.  

Have you tried removing that bitmap?  Is it a gif?  I've read postings
indicating tiled gifs are really the problem but could be quite wrong.

Quote:
>FWIW it never happens under NT workstation, only 98.  I haven't really
>tested it under ME, but it seems to me that ME is leaking resources all over
>the place.  (But that's another story).

Yeah, this makes sense.  While some resource areas have been made
large in Win 98 there's still some fundamental problems in that OS.

Tony
----
Tony Toews, Microsoft Access MVP
   Please respond only in the newsgroups so that others can
read the entire thread of messages.
   Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
   VolStar http://www.volstar.com Manage hundreds or
thousands of volunteers for special events.



Wed, 02 Apr 2003 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Not Enough Memory

2. error 7 in access 7.0 not enough memory

3. Not enough memory (Error 2004)

4. Not Enough Memory Excel Macro

5. Not enough memory !!

6. not enough memory to run

7. There is not enough memory or disk space to run word

8. There is not enough memory or disk space to run word

9. "not enough memory......"

10. Not enough memory - too big code

11. Not enough memory

12. "Not enough memory" error during compile

 

 
Powered by phpBB® Forum Software