FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TTxtFile class broken?
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
TTxtFile class broken?
Posted: Mon Aug 31, 2015 11:00 PM
I just tried to recompile a program that uses the TxtFile class, and the program immediately crashes at line 182 in the TxtFile.prg source. The error log is below.

I did a file compare with my current 15.05 version and the 14.11 version and the files are identical. TxtFile inherits from TFile and those two files are also identical. So the change happened sometime before Nov of last year. Note that TFile does not inherit from another class. I will see if I can dig up an older version of FWH to see if I can find a change. My original EXE was compiled in 2003 so the change could have been a long time ago, but I would think others would be having problems with the TxtFile class. Either that, or nobody is using it.

I searched the forum but couldn't find any mention of this.

Anyone else having this issue?

James

Code (fw): Select all Collapse
Application
===========
   Path and name: C:\Users\James\Documents\Projects\Tussman\TP7a\function.exe (32 bits)
   Size: 2,843,136 bytes
   Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20141106)
   FiveWin  Version: FWHX 15.05
   Windows version: 6.2, Build 9200 

   Time from start: 0 hours 0 mins 0 secs 
   Error occurred at: 08/31/15, 15:51:31
   Error description: Error BASE/1086  Argument error: ++
   Args:
     [   1] = U   

Stack Calls
===========
   Called from: .\source\classes\TTXTFILE.PRG => TTXTFILE:ADD( 182 )
   Called from: function.prg => MAIN( 45 )
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: TTxtFile class broken?
Posted: Mon Aug 31, 2015 11:06 PM

Both TxtFile.prg and TFile.prg are also identical in the 13.04 and 15.05 versions. So the problem happened before April 2013.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: TTxtFile class broken?
Posted: Mon Aug 31, 2015 11:34 PM

Ok I think I have found a clue. I think it maybe something in the files I am trying to read that is causes the crash because it works OK for others. I am reading a bunch of files and then writing out the results. It may not be a change to the source, which makes more sense, but it may be something that the source can't write out to a file.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: TTxtFile class broken?
Posted: Tue Sep 01, 2015 01:24 AM

My bad.

I was opening the output file inside a loop, when it should have been outside the loop. Still the original EXE was working fine and now it doesn't when compiled with the new FWH. So, at some point there was a change that killed my app. The change was probably to fix a bug that my app was relying on.

However, all is well that ends well.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: TTxtFile class broken?
Posted: Tue Sep 01, 2015 06:33 AM

very good :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion