Board index » delphi » Win 98 - Error Out of System Resources

Win 98 - Error Out of System Resources

Hi,

I am currently developing an accounting package in D5 with the BDE for one
of my customers. On running the software on a Win 95/98 machine, I get the
out of System Resource error message with Win crashing sometimes. (For
development I use Win NT without any problems.)

Currently the project includes 89 dialog boxes with a lot of database input,
grids and buttons. On completion, the project would include about 150 dialog
boxes. I suspect the culprit is the number of available windows handles in
Windows 95/98 is causing this problem. (Bad design ?????)

Because of the cost implication, I could not force my customer to upgrade to
NT/2000/XP to solve this problem and I would like to keep running one exe. I
use TLabel components as opposed to TEdit where possible.

Would the use of TButton over TBitButton make any difference in the Windows
handles used?

Any other suggestions to solve this problem?

Thanx

Johan Boshoff
Tallisman Software cc

 

Re:Win 98 - Error Out of System Resources


It could be that you need to increase the maxfilhandles property on the
users Win98 machine. Not sure how to do this through code, but on their
machine just access the BDE and increase the value to a max of 255.

Quote
"Johan Boshoff" <bos...@pixie.co.za> wrote in message

news:3e5a3c1c@newsgroups.borland.com...
Quote
> Hi,

> I am currently developing an accounting package in D5 with the BDE for one
> of my customers. On running the software on a Win 95/98 machine, I get the
> out of System Resource error message with Win crashing sometimes. (For
> development I use Win NT without any problems.)

> Currently the project includes 89 dialog boxes with a lot of database
input,
> grids and buttons. On completion, the project would include about 150
dialog
> boxes. I suspect the culprit is the number of available windows handles in
> Windows 95/98 is causing this problem. (Bad design ?????)

> Because of the cost implication, I could not force my customer to upgrade
to
> NT/2000/XP to solve this problem and I would like to keep running one exe.
I
> use TLabel components as opposed to TEdit where possible.

> Would the use of TButton over TBitButton make any difference in the
Windows
> handles used?

> Any other suggestions to solve this problem?

> Thanx

> Johan Boshoff
> Tallisman Software cc

Re:Win 98 - Error Out of System Resources


you obviously do not think about resources and its a problem with many
and just you.
 i bet you have alot of auto created forms that you do not need at start up.
think about creating the items as you need them and free them when your
done.
Quote
Johan Boshoff wrote:
> Hi,

> I am currently developing an accounting package in D5 with the BDE for one
> of my customers. On running the software on a Win 95/98 machine, I get the
> out of System Resource error message with Win crashing sometimes. (For
> development I use Win NT without any problems.)

> Currently the project includes 89 dialog boxes with a lot of database input,
> grids and buttons. On completion, the project would include about 150 dialog
> boxes. I suspect the culprit is the number of available windows handles in
> Windows 95/98 is causing this problem. (Bad design ?????)

> Because of the cost implication, I could not force my customer to upgrade to
> NT/2000/XP to solve this problem and I would like to keep running one exe. I
> use TLabel components as opposed to TEdit where possible.

> Would the use of TButton over TBitButton make any difference in the Windows
> handles used?

> Any other suggestions to solve this problem?

> Thanx

> Johan Boshoff
> Tallisman Software cc

Re:Win 98 - Error Out of System Resources


HI,
  The best solution I have found is to delete the handles. I just don't
remember how to do it. it's been awhile. Maybe try a post with deleting
handles as the topic.

Bob Y.

Quote
Johan Boshoff wrote:
> Hi,

> I am currently developing an accounting package in D5 with the BDE for one
> of my customers. On running the software on a Win 95/98 machine, I get the
> out of System Resource error message with Win crashing sometimes. (For
> development I use Win NT without any problems.)

> Currently the project includes 89 dialog boxes with a lot of database input,
> grids and buttons. On completion, the project would include about 150 dialog
> boxes. I suspect the culprit is the number of available windows handles in
> Windows 95/98 is causing this problem. (Bad design ?????)

> Because of the cost implication, I could not force my customer to upgrade to
> NT/2000/XP to solve this problem and I would like to keep running one exe. I
> use TLabel components as opposed to TEdit where possible.

> Would the use of TButton over TBitButton make any difference in the Windows
> handles used?

> Any other suggestions to solve this problem?

> Thanx

> Johan Boshoff
> Tallisman Software cc

Re:Win 98 - Error Out of System Resources


Hi Paul,

Thanx for the response. I tried it and just managed to crash Win 98
completely. I suspect the windows handles is part of the Win 98 design and
Delphi allocates a handle for every visual enabled TWinControl and
descendant objects. My guess would be that the designers of Win 95/98
decided that 512 or 1024 (?????) possible windows handles would be more than
anyone would need......

Johan Boshoff

Quote
"Paul Wilson" <angel1...@hotmail.com> wrote in message

news:3e5a3e2b@newsgroups.borland.com...
Quote
> It could be that you need to increase the maxfilhandles property on the
> users Win98 machine. Not sure how to do this through code, but on their
> machine just access the BDE and increase the value to a max of 255.

> "Johan Boshoff" <bos...@pixie.co.za> wrote in message
> news:3e5a3c1c@newsgroups.borland.com...
> > Hi,

> > I am currently developing an accounting package in D5 with the BDE for
one
> > of my customers. On running the software on a Win 95/98 machine, I get
the
> > out of System Resource error message with Win crashing sometimes. (For
> > development I use Win NT without any problems.)

> > Currently the project includes 89 dialog boxes with a lot of database
> input,
> > grids and buttons. On completion, the project would include about 150
> dialog
> > boxes. I suspect the culprit is the number of available windows handles
in
> > Windows 95/98 is causing this problem. (Bad design ?????)

> > Because of the cost implication, I could not force my customer to
upgrade
> to
> > NT/2000/XP to solve this problem and I would like to keep running one
exe.
> I
> > use TLabel components as opposed to TEdit where possible.

> > Would the use of TButton over TBitButton make any difference in the
> Windows
> > handles used?

> > Any other suggestions to solve this problem?

> > Thanx

> > Johan Boshoff
> > Tallisman Software cc

Re:Win 98 - Error Out of System Resources


Quote
"Johan Boshoff" <bos...@pixie.co.za> wrote:
>I am currently developing an accounting package in D5 with the BDE for one
>of my customers. On running the software on a Win 95/98 machine, I get the
>out of System Resource error message with Win crashing sometimes. (For
>development I use Win NT without any problems.)

>Currently the project includes 89 dialog boxes with a lot of database input,
>grids and buttons. On completion, the project would include about 150 dialog
>boxes. I suspect the culprit is the number of available windows handles in
>Windows 95/98 is causing this problem. (Bad design ?????)

Possibly. It could also be bitmaps and other types of resources. I
assume you only create these forms when necessary, however.

Quote
>Because of the cost implication, I could not force my customer to upgrade to
>NT/2000/XP to solve this problem and I would like to keep running one exe. I
>use TLabel components as opposed to TEdit where possible.

Your customer might be influenced to move by Microsoft's decision to
discontinue support for Windows 9x. Not to mention that it is a
discontinued product, so any new systems they buy will have to have
Windows 2000 or XP installed.

As for the single .exe, that isn't going to make a difference. The
limit isn't an .exe limit.

I don't understand why there is an issue of TLabel vs. TEdit. Those
are two completely different controls and you can't exchange them for
one another.

Quote
>Would the use of TButton over TBitButton make any difference in the Windows
>handles used?

No, but it would reduce resources since there aren't any bitmaps on
TButtons.

Good luck.

Kurt

Re:Win 98 - Error Out of System Resources


In article <3e5a64ed.318955...@newsgroups.borland.com>,
kbarthelm...@compuserve.com (Kurt Barthelmess (TeamB)) wrote:

Quote
>>Would the use of TButton over TBitButton make any difference in the Windows
>>handles used?

> No, but it would reduce resources since there aren't any bitmaps on
> TButtons.

I used to get a problem with D1 on *one* particular computer (W3.11), if I
had just one simple dialog with four or more TbitButtons on it crashed
trying to created it with a cascading infinite stream of 'out of resources'
messages.

Never found out why, someone suggested it was the video card; I've avoided
bitbuttons since!

Quote
> Possibly. It could also be bitmaps and other types of resources. I
> assume you only create these forms when necessary, however.

.. and free them properly when no longer required..

Re:Win 98 - Error Out of System Resources


Quote
"Johan Boshoff" <bos...@pixie.co.za> wrote:
>I suspect the windows handles is part of the Win 98 design

Right.

Quote
>Delphi allocates a handle for every visual enabled TWinControl and
>descendant objects.

Yes. That is the way Windows works. Delphi does cheat with some types
of components, such as a TLabel - Delphi wangles it so they don't need
handles.

Good luck.

Kurt

Re:Win 98 - Error Out of System Resources


Quote
"Iain Macmillan" <h...@ariesps.co.uk> wrote:
>I used to get a problem with D1 on *one* particular computer (W3.11), if I
>had just one simple dialog with four or more TbitButtons on it crashed
>trying to created it with a cascading infinite stream of 'out of resources'
>messages.

>Never found out why, someone suggested it was the video card; I've avoided
>bitbuttons since!

Sounds like the problem all right. Windows 3.x video drivers were very
difficult to write, and there were a lot more video cards available
then.

Quote
>> Possibly. It could also be bitmaps and other types of resources. I
>> assume you only create these forms when necessary, however.
>.. and free them properly when no longer required..

Exactly.

Kurt

Re:Win 98 - Error Out of System Resources


Hi Kurt,

On your suggestion:

Quote

> Possibly. It could also be bitmaps and other types of resources. I
> assume you only create these forms when necessary, however.

I solved the problem by creating the forms dynamically and destroying them
afterwards.

Thanx for the help

Johan Boshoff

Other Threads