Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What the hell is a Stream Read Error???

2,888 views
Skip to first unread message

@hotmail.com Fredrik Larsson

unread,
Nov 22, 1997, 3:00:00 AM11/22/97
to

I believe the solution to your problem is that you need some more file
handles allocated to the BDE. If you start BDE Configuration and check the
page "System" you will see a numerical value called "MaxFileHandles"
increase that value with 20 or something and you app will probably work.

> Another Delphi 1.0 quirk! I have been using the same identical code
> in other applications for months now with no problems.

More likely a Windows quirk...

> the call is attached to a button click event from the main form which
> is called from a C++ application which also uses the BDE. If I
> comment out the BDE calls in the C++ app the Delphi code works.
> But as I said other identical apps with the same C++ BDE calls and
> identical Delphi code works fine.
>
> To what is the Stream Read Error referring? something to do with
> reading the form symbol data from the DLL?

If it works please let me know.

Regards, Fredrik Larsson, mail2fred @ hotmail.com

Martin Harvey

unread,
Nov 24, 1997, 3:00:00 AM11/24/97
to

Verily, aj...@ozemail.com.au (Adam Johnston) spake thus:

>G'Day,

>Another Delphi 1.0 quirk! I have been using the same identical code
>in other applications for months now with no problems.

>Suddenly I am getting a Stream Read Error dialog pop up when I try to
>create a form. The line that fails reads :

>BrowseCustomers := TBrowseCustomers.Create(Application);

Hmm... The main way a stream read error would occur is when the delphi
streaming system unexpectedly encounters EOF when reading published
properties from a .dfm file, or from the applications type info.

Have you removed any project files recently?

>the call is attached to a button click event from the main form which
>is called from a C++ application which also uses the BDE. If I
>comment out the BDE calls in the C++ app the Delphi code works.
>But as I said other identical apps with the same C++ BDE calls and
>identical Delphi code works fine.

I would refrain from calling the parent of TBrowseCustomers
"Application" and use the form instead.

Incidentally, have you checked the files= in your config.sys ?

if that's too small increasing the file handles available to the BDE
won't help.

>To what is the Stream Read Error referring? something to do with
>reading the form symbol data from the DLL?

Quite possibly... either reading, or opening / creating.

Another possibility is that another app has then file you want to read
open and locked. It might be worth checking what files your app
shares, and the fmShare file mode constants you are using.

>Is there any difference in the placement of the BrowseCustomers
>variable. I managed to get the Delphi code under certain situtation
>by making the BrowseCustomers a global variable instead of local to
>the Button Click procedure. Is there some bizaare difference in doing
>this? Its just a pointer isn't it?
>Is there any difference between Create(Self) and Create(Application)?

Yes.... this is a big difference. This sets the parent of the
component. I would normally make it the form, not the app. If you do
this you can be sure of several things:

1. Tje delphi streaming system is all set up (since it's already read
the data for the form).
2. Your component presumably will only work when theres a message loop
and main window in your app. it won't work without a form, thus it's
sensible to make it's parent the form not the application. If you make
it's parent the app... it's concievably possible that you could end up
with an orphaned component and no form :-(

>Any ideas where to start with this one?

Yeah... change Create(Application) to Create(Self) or failing that
Create(SomeAutoCreatedForm).

MH.


Vincent Parrett

unread,
Nov 24, 1997, 3:00:00 AM11/24/97
to

I came accross something similar recently when loading a project under
Delphi 1 that had been saved under Delphi 3. It compiled fine but cause the
'Stream read error' when running it. I just opened the form, clicked on
ignore all when prompted anout the charset property, save and recompiled.
Problem gone.
Could this be the cause of your problem??
HTH


--
Vincent Parrett
VSoft Technologies Pty Ltd
Author of DNotes Delphi VCL for Lotus Notes
and DNotesX ActiveX controls for Notes
Email : vparrett 'AT'ozemail.com.au
Web : http://www.ozemail.com.au/~vparrett/vsoft-tech

Martin Harvey wrote in message <65biar$d1n$1...@lyra.csx.cam.ac.uk>...

Adam Johnston

unread,
Nov 25, 1997, 3:00:00 AM11/25/97
to

"Fredrik Larsson" <mail2fred @ hotmail.com> wrote:

>I believe the solution to your problem is that you need some more file
>handles allocated to the BDE. If you start BDE Configuration and check the
>page "System" you will see a numerical value called "MaxFileHandles"
>increase that value with 20 or something and you app will probably work.

>If it works please let me know.

Nope! I tried raising the MAXFILEHANDLES from 48 to 64 with the same
deal. Also tried local share and low memory use settings but the same
deal also.

Regards
Adam Johnston


0 new messages