Global Mapper Pro

Error in export to PNG

wayt
wayt Global Mapper User
edited July 2008 in Technical Support
I'm using a GM script to loop through a directory of data in the form of ASCII files containing area features. The script first opens a base map with an elevation map, a TIFF overlay, and a vector overlay containing line features (borders). Then it cycles through the directory of data files, importing each one, exporting a PNG, and then unloading the data file before repeating the loop.

The script has successfully worked on directories containing over 1000 data files. But in the latest run Global Mapper started malfunctioning on the 312th file. I'm running it from the command line, so there is no UI, but here is what the log file recorded:

Importing ASCII file C:\Run0050AverageResultsReport0312.dat...
Exporting raster data to file C:\Run0050AverageResultsReport0312.PNG...
WARNING: An error occurred attempting to render the screen contents. This may have occurred because the target resolution was larger than your video card can handle. Please try again with a lower resolution.
RasterOverlay.cpp - 395
Build Time: Jun 20 2008 12:54:51
The size of the image that you selected to create was too large to export vector data and/or scale/legend/grid data to. To decrease the size of the image, either increase the Sample Spacing or decrease the Export Bounds.

Importing ASCII file C:\Run0050AverageResultsReport0313.dat...
Exporting raster data to file C:\Run0050AverageResultsReport0313.PNG...
WARNING: An error occurred attempting to render the screen contents. This may have occurred because the target resolution was larger than your video card can handle. Please try again with a lower resolution.
RasterOverlay.cpp - 395
Build Time: Jun 20 2008 12:54:51
The size of the image that you selected to create was too large to export vector data and/or scale/legend/grid data to. To decrease the size of the image, either increase the Sample Spacing or decrease the Export Bounds.

and so on until file 320, at which point the program crashed. Here's what Vista's event log shows about the crash:
Faulting application global_mapper9.exe, version 9.3.0.0, time stamp 0x485bef07, faulting module MFC42.DLL, version 6.6.8063.0, time stamp 0x4791a6f4, exception code 0xc0000005, fault offset 0x0002b1a3, process id 0x10a4, application start time 0x01c8f2d12cafa5c8.

What is confusing about the problem is that, while the explanation in the log suggests that the problem might be a data overlay that is too large for the program to handle, the data files at this point in the series are actually smaller than those that preceded them, and have exactly the same format.

And, when I launch Global Mapper normally (rather than from the command line) and load the same base files and Run0050AverageResultsReport0312.dat, everything displays properly. Export to raster... in PNG format succeeds with no problems.

Any suggestions?

Wayt

Comments

  • global_mapper
    global_mapper Administrator
    edited July 2008
    Wayt,

    What it sounds like has happened is that something has leaked some kind of Windows resource somewhere, and eventually the resources ran out, resulting in the error. If you restart the script where the errors occurred, do they then run without problem?

    Also, what version of Global Mapper are you using? You might be interested to know that the v10.00 beta release includes new script commands for looping over the files in a directory, which could greatly simplify your script. You can download the v10 beta from Global Mapper - Download/Purchase to give it a try.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • wayt
    wayt Global Mapper User
    edited July 2008
    Mike:

    Your diagnosis is correct.

    I restarted the script at the point where errors occurred last time and it proceeded with the conversion process for another 320 data files, then crashed again.

    This time I kept the Windows Task Manager open and had it track the Peak Working Set (Memory). Sure enough, at the time of the crash, GM was peaking at memory usage of 3,927,260K. This machine has a lot more memory than that, but GM9 can of course only use 4GB of it, being a 32-bit program.

    I'm thrilled to hear that version 10 is now in beta!

    I'll download it right away and give it a try.

    If that doesn't solve the problem, I will also try running GM in WinXP SP2 compatibility mode. I've used GM previously on data sets even larger than this on an XP system with no memory leak problems, so I'm suspecting that the issue is particular to Vista.

    Cheers,
    Wayt
Sign In or Register to comment.