i tried opening it in fl 6, i got the same meesage. There is no details and there isnt another one in the trash bin. But after some research i found a solution from this other guy on another forum somewhere. The only problem is i have no idea how to fix it.
If you came here from a google search on corrupt FL files and couldn't be bothered to read the entire thread, at least read this part: I WILL NOT FIX YOUR FILE FOR YOU. STOP ASKING. YOU MORON.
Now back to our regularly scheduled post.
After working on a remix for about 30 hours, I tried to load a VST effect which crashed FL Studio right after a save. I hit save again (FL was still running, it just stopped making sound) to be sure everything would be OK, and closed the program. When I restarted and tried to load my song I got this:
"An error occured while reading the FLP file. It may be corrupted, or some plugin caused an error while opening."
Long story short, it was a corrupt file (verified by trying to open the FLP on another computer). A google search found nothing other than forum messages like "you're ****ed. Start over."
But it turns out every FLP file has this in the first 32 bytes of its header:
46 4C 68 64 06 00 00 00 00 00 04 00 60 00 46 4C
64 74 B1 77 00 00 C7 06 35 2E 30 2E 31 00 C8 10
The text side looks like this:
FLhd........`.FL
dt±w..Ç.5.0.1.È.
The first line is exactly the same in every FLP I looked at. The second line is similar, but the last half contains the FL Studio version number (5.01 in my case, as seen on the second text line above). Additionally, the first two bytes of the second line (64 74; bytes 17 and 18 of the header) are exactly the same in all files, but the third and fourth (B1 77 above) are not consistent even in files saved from the same version of FL. My corrupt file had nulls in the 19th and 20th bytes of its header, so I overwrote them with data from another FLP header.
Edit: it turns out those two bytes are a pointer to an address 22 bytes from the end of the file, consistent among all files I looked at. I believe this is due to the really sloppy way FL handles files...instead of putting a pointer to various sections (i.e., "go to this address for instrument data; this one for pattern info; etc.), FL just crams information in and the program has to scan for headers to find various sections. With such small files it works, I guess, it's just weird. So what happened in my case was that the pointer to the "end" of the file was really pointing to the very first byte, before the start of data. I imagine that confused FL.
Edit 2: to get the correct pointer address (see Edit 1), look at the end of the file. There should be several repetitions of "1\" with other characters (if not, the end of your file is hosed and this probably won't work). Look at the last byte of your file. That's byte #1 for our purposes. Let's say the end of your file looks like this:
0000a150h: 00 00 81 1F 00 31 5C 44 00 00 00 00 00 00 82 1F ; ..?..1\D......‚.
0000a160h: 00 31 5C 44 00 00 85 04 01 00 00 ; .1\D..…....
Starting with the last byte and counting backwards, find byte #22 from the end of the file. In the example, that's the "31" in the first line. This is where you need to point. Now look at the address of that line: 0000a150h (the "h" stands for Hexadecimal). The byte "31" occurs in the fifth position of that line (counting bytes from the left, like so):
0 1 2 3 4 5
00 00 81 1F 00 31
Note that there are 16 bytes per line, and this is in hex, so if the byte you're interested in happens to be the last one on a line, its "number" is F.
OK. "31" is byte 5 on that line. Add that to the line's address to get 0000a155. The last four characters (representing two bytes) are the address we want: A1 55. I don't remember my assembly programming enough to recall why, but these need to be reversed for pointer purposes (EDIT 3: it's because Little-endian systems (e.g. microcomputers) store the least-significant byte of addresses first in memory). So now we have the byte string "55 A1". Go back to the top of the file. The second line (which is always address 00000010h) Must begin with "64 74" on the left (corresponding to "dt" on the text side). The next two bytes are the address pointer you just got. Overwrite whatever two bytes come after "64 74" to get "64 74 55 A1" as the first four bytes of the second line in the file. Congratulations. If it still doesn't work, you're ****ed. Start over.
BEFORE:
46 4C 68 64 06 00 00 00 00 00 04 00 60 00 46 4C ; FLhd........`.FL
64 74 00 00 00 00 C7 06 35 2E 30 2E 31 00 C8 10 ; dt....Ç.5.0.1.È.
AFTER:
46 4C 68 64 06 00 00 00 00 00 04 00 60 00 46 4C ; FLhd........`.FL
64 74 B1 77 00 00 C7 06 35 2E 30 2E 31 00 C8 10 ; dt±w..Ç.5.0.1.È.
This brought back all of my instruments with intact settings, and all of the patterns I had written. Unfortunately, the Playlist pattern data (how you build different patterns together--don't know the right terminology) was lost, but all the parts are there and all my pattern labels were still on the playlist. In any event I'm happy it will only take me a few hours to rebuild the playlist data instead of having to start from scratch.
So if you have a corrupt FLP that has data in it (i.e., you don't have a 0-byte file), this will at least let you open the damn thing. I don't know if it will work on FL 6.
I'll keep comparing FLPs and post anything else I learn about the format, but at this point I'm just happy I got my **** working again. So I'll probably get lazy.