TTxtFile class broken?

TTxtFile class broken?

Postby James Bott » 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: Select all  Expand view
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 )
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: TTxtFile class broken?

Postby James Bott » 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: TTxtFile class broken?

Postby James Bott » 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: TTxtFile class broken?

Postby James Bott » Tue Sep 01, 2015 1: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: TTxtFile class broken?

Postby Antonio Linares » Tue Sep 01, 2015 6:33 am

very good :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42077
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 28 guests