Qbasicnews.com

Full Version: Problem with loading image files...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
in FL.

I am making a Fake OS and i just added a support to add pics to forms. When I try to load a BMP image >2.5Mb in size the prog just ends. I dont understand WTF is wrong with the code? The code is above 50000 lines and is *very* complex having 3 modules so I dont want to post it here.

When I try to load the same file in a fresh prog. i.e. make a new prog just to load the file it loads nicely without any problems.

Sometimes the windows closes the prog for performing an illegal function!

Any one have any clue what is wrong?
It's possible that you're running out of memory. Are you allocating a lot of EMS? How much EMS are you set up to have? Note this is usually less than the amount of ram your computer has - open a dos prompt and type mem.

If you allocate EMS and it fails for some reason, then you try to access it anyway, it can cause an illegal instruction.
Quote:It's possible that you're running out of memory. Are you allocating a lot of EMS? How much EMS are you set up to have? Note this is usually less than the amount of ram your computer has - open a dos prompt and type mem.

If you allocate EMS and it fails for some reason, then you try to access it anyway, it can cause an illegal instruction.

I am setup to have maximum EMS. I have taken failsafe measures to assure that my prog. doesnt crash if i am unable to allocate EMS so that wouldnt be the prob Sad.

Does FL have some sort of a limit that i can allocate > than 1mb of EMS? I feel it doesnt since i tried to allocate 2.5Mb of EMS and it worked!
Debug it (use break points, F8, etc) and figure out the exact line it crashes on.
Quote:Debug it (use break points, F8, etc) and figure out the exact line it crashes on.

I am trying that now. But its really elusive =P
Hmm... after spending a few minutes of extreme scrutiny I have come to the conclusion that FL has some problem with EMS buffers of big dimensions like 1024x768 in 800x600 modes but that is *highly* unlikely . The bug must be somewhere in my Windowing engine(WE). I'll have to go over the code which is going to be *hellish*.

Anyway when I dont allow defining of a EMS buffer greater than 800x600 it works without a hitch!