Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / Reading file bug!

Author
Message
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 18th Jun 2006 18:36
omg i never thought that there will be some kind of bug with file reading...

but here it is.

(download the attachment)

all the code i puted is:


and it crashes.


it seems like dbp cant catch something inside that temp.txt file i attached

MyNewSite:http://gogetax.com
Forums(About BLO and more):http://gogetax.com/forum

Attachments

Login to view attachments
UDun
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: France
Posted: 18th Jun 2006 20:13
Yes the program crashes. If you open the file in the notepad,
you'll see that the lines are very long (only 4 lines). If you cut them into smaller lines, it works.

I don't know if it's a memory problem or a string one...

Coding is dangerous for health ...
spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 18th Jun 2006 20:16
Just done some tests, and like UDun says, one line in that html file is very long, but DBPro should easily cope with it.

After some test I have found that any line longer than 1331 characters causes a crash.

Only way round it for now is to use read byte and break when you read characters 13 (carriage return) or 10 (line feed)

Boo!
spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 18th Jun 2006 20:21
Some simple code for Lee to debug problem. Run this and all is ok. Change the 'chars' variable to 1332 or more and crash happens.



Boo!
Graphiboc
17
Years of Service
User Offline
Joined: 16th Jun 2006
Location:
Posted: 28th Jun 2006 11:01
or use this only for file thait contains strings :


open to read 1,"file.txt"
DO
l$=read string 1
if l$="" then exit
LOOP
close file 1

Sry for mybad english
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Jun 2006 19:55
We might be a little more impressed if that actually compiled ...

For free Plug-ins and source code http://www.matrix1.demon.co.uk
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 21st Aug 2006 16:21
I think im getting similar problems if you go to this thread http://forum.thegamecreators.com/?m=forum_view&t=87200&b=22 you will notice that my sample source dont find and strings and one variable read by the dbReadString command produces abstract data unless i am blind and someone swapped the keys around on my touch pads. Anyway its worth a check, I have the source, The text file and a really small output file to show here.

fubar

Login to post a reply

Server time is: 2024-05-22 12:48:34
Your offset time is: 2024-05-22 12:48:34