Subject: Re: is there a bug ?
From: [email-masked] (Wei Ku)

12 Sep 1997 23:24:27 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
To: "Stiphane PADIQUE" <[email-masked]>, <[email-masked]>

Yes, I tested the files and even tried to 'fix' it to get around the problem
and fail. Exact same error message showed up.

By the way, to open files with the constructor is not a really good idea,
especially without destructor to close the files.

Wei Ku

-----Original Message-----
From: Stiphane PADIQUE <[email-masked]>
To: [email-masked] <[email-masked]>; [email-masked]
<[email-masked]>
Date: Friday, September 12, 1997 8:00 AM
Subject: is there a bug ?

>Hi,
>
>I think I've found a bug using file streams in a c++ class (ifstream
>class).
>
>When using two streams as private members and intitialysing them during
>construction, the second one seems to be unavailable for reading,
>although it is opened and flagged "good".
>
>
>here is the trace under Win NT:
>this is the file
>#1
><< read in SingleStream Class
>this is the file
>#2
><< first file in DoubleStreamClass
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) In
>cygwin_except_handler
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) Exception trapped!
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) exception C0000005 at
>402801
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) exception: ax 0 bx
>241F2D0 cx241F0D4 dx 50
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) exception: si 5 di
>1000B8B3 bp 241F19C sp 241F198
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) exception is:
>STATUS_ACCESS_VIOLATION
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) Stack trace:
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) frame 0: sp =
>0x241EFCC, pc =0x1000CEC2
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) frame 1: sp =
>0x241EFE8, pc =0x77F94492
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) frame 2: sp =
>0x241F00C, pc =0x77F88E93
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) frame 3: sp =
>0x241F098, pc =0x77F76202
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) frame 4: sp =
>0x241F19C, pc =0x4010AD
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) frame 5: sp =
>0x241F1AC, pc =0x401174
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) frame 6: sp =
>0x241F320, pc =0x1000C102
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) frame 7: sp =
>0x241FF94, pc =0x1000C113
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) frame 8: sp =
>0x241FFA0, pc =0x40E675
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) frame 9: sp =
>0x241FFB0, pc =0x40103B
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) frame 10: sp =
>0x241FFC0, pc = 0x77F1B26B
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) frame 11: sp =
>0x241FFF0, pc = 0x0
>(C:\developpement\gnuwin32\Accounting\a.exe 1000) End of stack trace
>
>The same source works fine under gnu g++ for Solaris.
>
>You'll find attached :
>- StreamBug.cpp, the source
>- fic1, fic2 and fic3, the test files
>- StreamBug, the binary for win32 made using b18
>
>Thanks.

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".