PDA

View Full Version : Bug Report (Crash, 2.1.1) - Unmasking in certain cases leads to crash



Dachannien
May 23rd, 2008, 19:24
Problem: Unmasking can lead to a crash under certain circumstances.

To reproduce:
1. Create a large map (larger than the max window size, preferably much larger) using an image. (Make the image all-black to make testing easier in step 4.)
2. Mask the map.
3. Zoom out two clicks.
4. Scroll the map left. If you do this right, you will see a tan-colored line at the left edge of the map, somewhat lighter colored than the mask color.
5. Unmask a portion of the map including that tan-colored line. One of two things will happen:
a) The unmask will happen successfully, but there will be a one-pixel-wide vertical line that also gets unmasked a few hundred pixels to the right and a few hundred pixels up of the part of the left edge that you unmasked.
b) If the vertical line mentioned in (a) would extend off the top of the map, the program will crash.

I suspect that what is happening is that a column of pixels just off the left edge of the map is being revealed when you zoom out and scroll left (due to rounding error or whatever). This is the actual bug, and the unmask crash is merely a symptom. When you try unmasking that column of pixels, the program calculates the unmask region using this invalid column of pixels. If the calculated unmask region then extends off the map, it crashes from trying to access memory outside the unmask buffer.

Hamish
March 5th, 2012, 18:54
This is a seriously old post, but I found it when searching the forum. I seem to have the exact same problem, if I unmask the edge of my map, FG crashes. I always seem to get scenario b, but that may be a coincidence.

I am running a much newer version of FG of course, I've always updated before a game, and this has happened to me a couple of times over the last few months.

Moon Wizard
March 5th, 2012, 22:13
Thanks, Hamish. I'll try and recreate on my machine. If not, I might need to get a copy of the image for testing.

Thanks,
JPG

Moon Wizard
March 7th, 2012, 05:24
I wasn't able to recreate using a 4096x4096 map. (max size of image window is now 2048x2048)

Can you recreate this consistently?
If so, can you send me campaign and steps to recreate? ([email protected])

Thanks,
JPG