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 / Failed To Open File For Reading Issue

Author
Message
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 20th Feb 2013 22:59 Edited at: 20th Feb 2013 23:01
Hello

I have some problems, at a certain time with the message "Failed To Open File For Reading [FileName]" ... The file exists and it works several times before. i have checked for memory leaks .. but i'm freeing objects,images,sprites,texts etc etc ... and nothing seems to remain.

It use "OpenToRead" function to read my Tracks files for my WIP Game Speed Racer... and i can load them entirely 5 times (lot of OpenToRead functions each time in loops ... 450 files to open for one track) and it's always the same file which can't load ... if i change some things to reduce the number of files to read ... it breaks with the same error but in another file ... at another point of the program ...

it's doing the same issue whatever the platform is ... (on android the player quits to home screen lol)

I'm looping through a file (...while FileEOF(FileID)=0 ...) where each line is a reference to a "child" file (and i load it and close it within the parent file loop)....

Very Strange ... MemoryLeak in a File command maybe ? iq CloseFile command is freeing all the memory used by the file ?

Any Idea ?
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 20th Feb 2013 23:08
Hmmm, can you post your source code for this part?
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 20th Feb 2013 23:26 Edited at: 20th Feb 2013 23:27
Resolved after having reproduced the issue in a small test program ... ... a CloseFile was missing in a subroutine LOL damned !!!! 3 days for that ...

Thanks
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 21st Feb 2013 08:30
hehe, it's happened to all of us

Login to post a reply

Server time is: 2024-05-02 22:09:23
Your offset time is: 2024-05-02 22:09:23