Crashes Right Before It Finishes

Aug 22, 2011 at 7:49 AM

Every time I run the GUI setup it crashes right as it's finishing. Any idea what the problem could be?

Aug 23, 2011 at 12:58 AM

It's possible that this is the GDI issue another user was experiencing. I'm looking into it.

Aug 23, 2011 at 3:33 AM

I couldn't fix it but I uploaded a new version that should display a message box with detailed error information about what's going wrong. It should also continue and write the map.html file for you, you just won't see any markers when you selected them from the toggle buttons.

Aug 25, 2011 at 5:31 PM

This crash, or one like it, happens with my attempts to run it too.

 (I created a word doc with screenshots of all the error messages, of the map.html opened in notepad etc, but I can't get it to paste into this page)

Anyhow - the first error message goes like this:

There was an error exporting the map images to


System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.

at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters,encoderParams)

at System.Drawing.Image.Save(String filename,ImageFormat format)

at TerrariaMap Tool.MapGenerator.WriteMapHtml(World world)

I still get the "Open Map" button, but when I click on it I get the following message in internet explorer:-

Internet explorer restricted this webpage from running scripts or ActiveX controls

On clicking "Allow blocked content" I suffer the grey screen of nothingness described elsewhere in the posts.

Finally, here is the script in my generated map.html

<!DOCTYPE html>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />

    <style type="text/css">
      html { height: 100% }
      body { height: 100%; margin: 0px; padding: 0px }
      #map_canvas { height: 100% }

      table.Chest { font-family: verdana; font-size: 10pt; border: 1px solid #99AAFF }
      table.Chest th { text-align: left; background: #CFE6FF; padding: 2px }
      table.Chest th.Item { width: 200px; }
      table.Chest th.Count { width: 50px; text-align: right }
      table.Chest td { padding: 2px }
      table.Chest td.Item { background: #DFDFDF }
      table.Chest td.Count { background: #DFDFDF; text-align: right }

    <script type="text/javascript" src=""></script>
    <script type="text/javascript" src=""></script>

    <script type="text/javascript">
      /// The base path of the map tiles.
      /// You need to update this value in order for this web page to
      /// work!
      var basePath = "file:///C:/Users/Niri/Desktop/Maps/world1/";

      var mapBlockWidth = 4200;
      var mapBlockHeight = 1200;

    <script type="text/javascript" src="file:///C:/Users/Niri/Desktop/Maps/world1/Terraria.js"></script>
  <body onload="initialize()">
    <div id="map_canvas" style="width:100%; height:100%"></div>

Aug 25, 2011 at 9:20 PM

Try editing this

var basePath = "file:///C:/Users/Niri/Desktop/Maps/world1/";

to this

var basePath = "./";

and this

<script type="text/javascript" src="file:///C:/Users/Niri/Desktop/Maps/world1/Terraria.js"></script>

to this

<script type="text/javascript" src="./Terraria.js"></script>

and see if it helps.

Aug 28, 2011 at 9:28 AM


Thanks -

However I tried the suggested edits to no avail

I'm now going to move to a completely different machine, generate a new world, download the application again and see if it will play ball

Will let you know....