Hey guys, I've been looking into a bug in my program and it looks like it's a map window bug.
My C# program is simply loading a 1GB geotiff into my map then splitting it up into 4000x4000 pixel tiles that are exported as bitmaps. I'm using SnapShot3 to do this.
The problem looks like it occurs at line 531 in ImageDrawing.cpp in a part of the code that is padding the image to be 4 byte alligned. Creating the new padded array throws an exception. At the time this happens my process (as per the task manager) is using ~800MBs of RAM and the new array trying to be allocated would be 300MBs. As I understand a regular 32bit process should be able to handle 2GBs at the least so I'm not sure what the problem is here. Am I hitting some memory limit I don't know about?
I could possibly tweak the size of the tile I'm requesting to make sure that the resulting image never needs to be padded but these seems like a round-a-bout way of fixing the problem. Kinda looks like this could also happen during a regular redraw on a zoom event because I can also get it to crash the same way by just setting the map extents to my lat/lon bounds instead of calling the snapshot function.
Any insight would be much appreciated! Thanks!
My C# program is simply loading a 1GB geotiff into my map then splitting it up into 4000x4000 pixel tiles that are exported as bitmaps. I'm using SnapShot3 to do this.
The problem looks like it occurs at line 531 in ImageDrawing.cpp in a part of the code that is padding the image to be 4 byte alligned. Creating the new padded array throws an exception. At the time this happens my process (as per the task manager) is using ~800MBs of RAM and the new array trying to be allocated would be 300MBs. As I understand a regular 32bit process should be able to handle 2GBs at the least so I'm not sure what the problem is here. Am I hitting some memory limit I don't know about?
I could possibly tweak the size of the tile I'm requesting to make sure that the resulting image never needs to be padded but these seems like a round-a-bout way of fixing the problem. Kinda looks like this could also happen during a regular redraw on a zoom event because I can also get it to crash the same way by just setting the map extents to my lat/lon bounds instead of calling the snapshot function.
Any insight would be much appreciated! Thanks!