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.

AppGameKit Classic Chat / Is there a weird limitation on the size of a file agk writes?

Author
Message
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 2nd Jun 2013 16:40
Iam Writing files in the size of 98-104 kb and they get scrambled at the end somehow?

Agk miss lines at the end its supposed to write?

Iam only using writeline.

Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 2nd Jun 2013 17:00
seams to be a bug in agk if anyone else could confirme this.

if i do
opentowrite
for x=1 to 20
for y=1 to 20
write a silly amount of lines with writeline
next y
next x
closefile

But if i Close the file and open to write with append on inside the for to x loop.
so do i seam to reftesh something in agk and it works as it should.

So agk dont seam to like if you have the file open and write large chunks of dat in one go.

Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz
fog
21
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Newcastle, England
Posted: 2nd Jun 2013 18:29
I have an 888kb file (15200 lines) written entirely using WriteLine in one go and have had no problems.

I'm using 1.076 Tier 2 so maybe it's a Tier 1 problem or a new bug in a later version?

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 2nd Jun 2013 19:24
Quote: "I have an 888kb file (15200 lines) written entirely using WriteLine in one go and have had no problems.

I\'m using 1.076 Tier 2 so maybe it\'s a Tier 1 problem or a new bug in a later version?"

Thats pretty weird as in my program so does it Always scramble the last parts but i use alot of floats converted to strings and long lines.
But this coulkd maybe also be an str() bug somehow?
As van and i noticed in our Project that the output from str() gets messed up sometimes and we dont know why?

Her is how my file looks when its output right.
sections like this is repeated in the file 150-200 times.
I couldt post the entire file as its huge


Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz
swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 2nd Jun 2013 20:07
The last time I wrote a big file using this method it caused a BSOD

swis
Joined: Tue Dec 16th 2008
Interstellar
fog
21
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Newcastle, England
Posted: 3rd Jun 2013 14:44
Quote: "But this coulkd maybe also be an str() bug somehow?
As van and i noticed in our Project that the output from str() gets messed up sometimes and we dont know why?"

Quite possibly. My output is a load of scripts so they are mostly already strings with less use of str()

More like:


Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 3rd Jun 2013 18:39
If you can narrow it down to a small example that displays the problem I'll take a look
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 3rd Jun 2013 19:46
Here is the error recreated

I made a simple flag you can set to true and false to see wath works and wath dont

I only hope you dont find it to be an Cliff error


texture neaded is included.

Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz

Attachments

Login to view attachments
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 3rd Jun 2013 20:15
In this section of code

you are loading the file before it is closed. Before the CloseFile() command the contents of the file is undefined as the writes may be batched waiting for you to write more before actually writing it all to the file. Once it is closed everything is flushed to the file and you can use it with LoadObject.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 3rd Jun 2013 20:19 Edited at: 3rd Jun 2013 23:16
... nice one, i don't saw it
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 3rd Jun 2013 20:44
Paul caught it.

The Add_Plane_Floor function that works actively opens and closes the file as needed. The one that doesn't does NOT close the file.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 3rd Jun 2013 21:07 Edited at: 3rd Jun 2013 21:09
I missed that one

I have so many lines of code that i miss the one in front

Because iam sure i made it exactly as the first time ?

But it works in the editor now

Thats the reason i ask others to test Before reporting anything
But i did find the float rounding bug when Writing my raycaster

Quote: "@Cliff
i try your example with 108 beta 12, look same (without your random texture coords.)
for a while i had some strange linebreaks (windows<>linux) in editor
and the compiler saw different code as i saw in the editor.
did your code in agk ide looks same in notepad? "

The weirdness you mention do i belive i experienced when i copy code from the forum in to the compiler sometimes?

Iam not sure but i had this a short while back and it whas pretty weird.

Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz

Login to post a reply

Server time is: 2024-11-24 13:43:03
Your offset time is: 2024-11-24 13:43:03