[ms4w-users] ms4w 2.2.3 shp2img.exe crashes after repeated invocation.

Hong ljfong at sdf.lonestar.org
Wed Aug 29 20:51:08 EDT 2007


Hi,

I tried shp2img.exe from ms4w_2.2.3.zip against a map file that has many SDE
(9.1) layers. For the first 20x or so of invocation of shp2img.exe,
shp2img.exe generates the image correctly, but randomly, it will fail and
causes the pop-up window:

shp2img.exe - Application Error

The instruction at "0x7c93426d" referenced memory at "0x00000000". The memory
could not be "read".

Click on OK to terminate the program.
Click on CANCEL to debug the program.

I could use some suggestion here...

The map file that I use to test shp2img.exe:

NAME BC_RIMS
STATUS ON
SIZE 631 684
EXTENT 1336873.63541034 854783.183414605 1422831.94072305 947961.441471487
UNITS METERS
SCALE 386151.298686869
RESOLUTION 72
IMAGETYPE png
SYMBOLSET "D:\Projects\GENII5\Common\symbology.sym"
FONTSET "D:\Projects\GENII5\Common\fonts\fontset.list"


SCALEBAR
    COLOR 0 0 0
    BACKGROUNDCOLOR 255 255 255
    OUTLINECOLOR -1 -1 -1
    IMAGECOLOR -1 -1 -1
    INTERVALS 4
    POSITION LR
    UNITS MILES
    STATUS OFF
    POSTLABELCACHE OFF
END # end of SCALEBAR


PROJECTION
    "proj=aea"
    "lat_1=50"
    "lat_2=70"
    "lat_0=40"
    "lon_0=-96"
    "x_0=0"
    "y_0=0"
    "ellps=GRS80"
    "datum=NAD83"
    "units=m"
    "no_defs"
END # end of PROJECTION

LAYER # 0
    NAME "Vegetation"
    METADATA
        "aims_Id" "0"
        "aims_Name" "Vegetation"
        "aims_LayerType" "Feature"
    END # end of METADATA
    TYPE POLYGON
    CONNECTION "shogun,port:5151,sde,sde,sde"
    CONNECTIONTYPE SDE
    DATA "BC_RIMS.SDE.VEGETATION,SHAPE,SDE.DEFAULT"
    STATUS ON
    TRANSFORM ON
    CLASSITEM "DESCRIPTION"
    CLASS
        METADATA
            "aims_RendererType" "ValueMap"
        END # end of METADATA
        EXPRESSION ('[DESCRIPTION]' eq 'Cropland')
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 204 255 204
            OUTLINECOLOR -1 -1 -1
        END # end of STYLE
    END # end of CLASS
    CLASS
        METADATA
            "aims_RendererType" "ValueMap"
        END # end of METADATA
        EXPRESSION ('[DESCRIPTION]' eq 'Grassland')
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 204 255 51
            OUTLINECOLOR -1 -1 -1
        END # end of STYLE
    END # end of CLASS
    CLASS
        METADATA
            "aims_RendererType" "ValueMap"
        END # end of METADATA
        EXPRESSION ('[DESCRIPTION]' eq 'Marsh/Swamp')
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 153 153 255
            OUTLINECOLOR -1 -1 -1
        END # end of STYLE
    END # end of CLASS
    CLASS
        METADATA
            "aims_RendererType" "ValueMap"
        END # end of METADATA
        EXPRESSION ('[DESCRIPTION]' eq 'Trees')
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 204 204 255
            OUTLINECOLOR -1 -1 -1
        END # end of STYLE
    END # end of CLASS
    CLASS
        METADATA
            "aims_RendererType" "ValueMap"
        END # end of METADATA
        EXPRESSION ('[DESCRIPTION]' eq 'Tundra')
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 153 255 255
            OUTLINECOLOR -1 -1 -1
        END # end of STYLE
    END # end of CLASS
    CLASS
        METADATA
            "aims_RendererType" "ValueMap"
        END # end of METADATA
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 204 255 204
            OUTLINECOLOR -1 -1 -1
        END # end of STYLE
    END # end of CLASS
END # end of LAYER


LAYER # 1
    NAME "Lakes"
    METADATA
        "aims_Id" "1"
        "aims_Name" "Lakes"
        "aims_LayerType" "Feature"
    END # end of METADATA
    TYPE POLYGON
    CONNECTION "shogun,port:5151,sde,sde,sde"
    CONNECTIONTYPE SDE
    DATA "BC_RIMS.SDE.H_LAKES,SHAPE,SDE.DEFAULT"
    STATUS ON
    TRANSFORM ON
    CLASS
        METADATA
            "aims_RendererType" "Simple"
        END # end of METADATA
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 0 0 255
            OUTLINECOLOR -1 -1 -1
        END # end of STYLE
    END # end of CLASS
END # end of LAYER


LAYER # 2
    NAME "Arterial LRM"
    METADATA
        "aims_Id" "BC_RIMS.sde.ART_RT"
        "genii_LayerType" "Route"
        "aims_LayerType" "Feature"
        "aims_Name" "Arterial LRM"
    END # end of METADATA
    TYPE LINE
    CONNECTION "shogun,port:5151,sde,demo_user,demopwd"
    CONNECTIONTYPE SDE
    DATA "BC_RIMS.SDE.ART_RT,SHAPE,SDE.DEFAULT"
    STATUS OFF
    TRANSFORM ON
    CLASS
        METADATA
            "aims_GroupRendererName" "Arterial LRM"
            "aims_RendererType" "Simple"
        END # end of METADATA
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 32 32 48
            OUTLINECOLOR -1 -1 -1
        END # end of STYLE
    END # end of CLASS
END # end of LAYER


LAYER # 3
    NAME "Arterial LRM Annotation"
    METADATA
        "aims_GroupRendererName" "Arterial LRM"
        "aims_RendererType" "SimpleLabel"
    END # end of METADATA
    TYPE ANNOTATION
    CONNECTION "shogun,port:5151,sde,demo_user,demopwd"
    CONNECTIONTYPE SDE
    DATA "BC_RIMS.SDE.ART_RT,SHAPE,SDE.DEFAULT"
    STATUS OFF
    TRANSFORM ON
    LABELITEM "OBJECTID"
    CLASS
        LABEL
            TYPE TRUETYPE
            POSITION LL
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 0 0 0
            OUTLINECOLOR -1 -1 -1
            FONT "arial"
            SIZE 12
            MINSIZE 4
            MAXSIZE 256
        END # end of LABEL
    END # end of CLASS
END # end of LAYER


LAYER # 4
    NAME "Data Sharing Application LRM"
    METADATA
        "aims_Id" "BC_RIMS.sde.DSA_RT"
        "genii_LayerType" "Route"
        "aims_LayerType" "Feature"
        "aims_Name" "Data Sharing Application LRM"
    END # end of METADATA
    TYPE LINE
    CONNECTION "shogun,port:5151,sde,demo_user,demopwd"
    CONNECTIONTYPE SDE
    DATA "BC_RIMS.SDE.DSA_RT,SHAPE,SDE.DEFAULT"
    STATUS OFF
    TRANSFORM ON
    CLASS
        METADATA
            "aims_GroupRendererName" "Data Sharing Application LRM"
            "aims_RendererType" "Simple"
        END # end of METADATA
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 32 32 48
            OUTLINECOLOR -1 -1 -1
        END # end of STYLE
    END # end of CLASS
END # end of LAYER


LAYER # 5
    NAME "Data Sharing Application LRM Annotation"
    METADATA
        "aims_GroupRendererName" "Data Sharing Application LRM"
        "aims_RendererType" "SimpleLabel"
    END # end of METADATA
    TYPE ANNOTATION
    CONNECTION "shogun,port:5151,sde,demo_user,demopwd"
    CONNECTIONTYPE SDE
    DATA "BC_RIMS.SDE.DSA_RT,SHAPE,SDE.DEFAULT"
    STATUS OFF
    TRANSFORM ON
    LABELITEM "OBJECTID"
    CLASS
        LABEL
            TYPE TRUETYPE
            POSITION LL
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 0 0 0
            OUTLINECOLOR -1 -1 -1
            FONT "arial"
            SIZE 12
            MINSIZE 4
            MAXSIZE 256
        END # end of LABEL
    END # end of CLASS
END # end of LAYER


LAYER # 6
    NAME "Landmark Kilometre LRM"
    METADATA
        "aims_Id" "BC_RIMS.sde.LKI_RT"
        "genii_LayerType" "Route"
        "aims_LayerType" "Feature"
        "aims_Name" "Landmark Kilometre LRM"
    END # end of METADATA
    TYPE LINE
    CONNECTION "shogun,port:5151,sde,demo_user,demopwd"
    CONNECTIONTYPE SDE
    DATA "BC_RIMS.SDE.LKI_RT,SHAPE,SDE.DEFAULT"
    STATUS OFF
    TRANSFORM ON
    CLASS
        METADATA
            "aims_GroupRendererName" "Landmark Kilometre LRM"
            "aims_RendererType" "Simple"
        END # end of METADATA
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 32 32 48
            OUTLINECOLOR -1 -1 -1
        END # end of STYLE
    END # end of CLASS
END # end of LAYER


LAYER # 7
    NAME "Landmark Kilometre LRM Annotation"
    METADATA
        "aims_GroupRendererName" "Landmark Kilometre LRM"
        "aims_RendererType" "SimpleLabel"
    END # end of METADATA
    TYPE ANNOTATION
    CONNECTION "shogun,port:5151,sde,demo_user,demopwd"
    CONNECTIONTYPE SDE
    DATA "BC_RIMS.SDE.LKI_RT,SHAPE,SDE.DEFAULT"
    STATUS OFF
    TRANSFORM ON
    LABELITEM "OBJECTID"
    CLASS
        LABEL
            TYPE TRUETYPE
            POSITION LL
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 0 0 0
            OUTLINECOLOR -1 -1 -1
            FONT "arial"
            SIZE 12
            MINSIZE 4
            MAXSIZE 256
        END # end of LABEL
    END # end of CLASS
END # end of LAYER


LAYER # 8
    NAME "Service Areas"
    METADATA
        "aims_Id" "BC_RIMS.sde.MOT_SERVICE_AREAS"
        "genii_LayerType" "DynamicFeature"
        "aims_LayerType" "Feature"
        "aims_Name" "Service Areas"
    END # end of METADATA
    TYPE POLYGON
    CONNECTION "shogun,port:5151,sde,demo_user,demopwd"
    CONNECTIONTYPE SDE
    DATA "BC_RIMS.SDE.MOT_SERVICE_AREAS,SHAPE,SDE.DEFAULT"
    STATUS ON
    TRANSFORM ON
    CLASS
        METADATA
            "aims_GroupRendererName" "Service Areas"
            "aims_RendererType" "Simple"
        END # end of METADATA
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR -1 -1 -1
            OUTLINECOLOR 0 0 0
        END # end of STYLE
    END # end of CLASS
END # end of LAYER


LAYER # 9
    NAME "Service Areas Annotation"
    METADATA
        "aims_GroupRendererName" "Service Areas"
        "aims_RendererType" "SimpleLabel"
    END # end of METADATA
    TYPE ANNOTATION
    CONNECTION "shogun,port:5151,sde,demo_user,demopwd"
    CONNECTIONTYPE SDE
    DATA "BC_RIMS.SDE.MOT_SERVICE_AREAS,SHAPE,SDE.DEFAULT"
    STATUS ON
    TRANSFORM ON
    LABELITEM "DIST_NAME"
    CLASS
        LABEL
            TYPE TRUETYPE
            POSITION LL
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 255 0 255
            OUTLINECOLOR -1 -1 -1
            FONT "times-italic"
            SIZE 12
            MINSIZE 4
            MAXSIZE 256
        END # end of LABEL
    END # end of CLASS
END # end of LAYER


LAYER # 10
    NAME "Culvert Inventory"
    METADATA
        "aims_Id" "BC_RIMS.sde.INV_CULVERT_PT"
        "genii_LayerType" "DynamicFeature"
        "aims_LayerType" "Feature"
        "aims_Name" "Culvert Inventory"
    END # end of METADATA
    TYPE POINT
    CONNECTION "shogun,port:5151,sde,demo_user,demopwd"
    CONNECTIONTYPE SDE
    DATA "BC_RIMS.SDE.INV_CULVERT_PT,SHAPE,SDE.DEFAULT"
    STATUS ON
    TRANSFORM ON
    CLASSITEM "INV_CULV_TYPE"
    CLASS
        METADATA
            "aims_GroupRendererName" "Culvert Inventory"
            "aims_RendererType" "ValueMap"
        END # end of METADATA
        EXPRESSION ('[INV_CULV_TYPE]' eq 'D')
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 95 86 241
            OUTLINECOLOR -1 -1 -1
            SIZE 5
            SYMBOL "triangle"
        END # end of STYLE
    END # end of CLASS
    CLASS
        METADATA
            "aims_GroupRendererName" "Culvert Inventory"
            "aims_RendererType" "ValueMap"
        END # end of METADATA
        EXPRESSION ('[INV_CULV_TYPE]' eq 'E')
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 255 215 0
            OUTLINECOLOR -1 -1 -1
            SIZE 5
            SYMBOL "triangle"
        END # end of STYLE
    END # end of CLASS
    CLASS
        METADATA
            "aims_GroupRendererName" "Culvert Inventory"
            "aims_RendererType" "ValueMap"
        END # end of METADATA
        EXPRESSION ('[INV_CULV_TYPE]' eq 'F')
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 208 143 4
            OUTLINECOLOR -1 -1 -1
            SIZE 5
            SYMBOL "triangle"
        END # end of STYLE
    END # end of CLASS
    CLASS
        METADATA
            "aims_GroupRendererName" "Culvert Inventory"
            "aims_RendererType" "ValueMap"
        END # end of METADATA
        EXPRESSION ('[INV_CULV_TYPE]' eq 'H')
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 0 255 0
            OUTLINECOLOR -1 -1 -1
            SIZE 5
            SYMBOL "triangle"
        END # end of STYLE
    END # end of CLASS
    CLASS
        METADATA
            "aims_GroupRendererName" "Culvert Inventory"
            "aims_RendererType" "ValueMap"
        END # end of METADATA
        EXPRESSION ('[INV_CULV_TYPE]' eq 'N')
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 255 20 147
            OUTLINECOLOR -1 -1 -1
            SIZE 5
            SYMBOL "triangle"
        END # end of STYLE
    END # end of CLASS
    CLASS
        METADATA
            "aims_GroupRendererName" "Culvert Inventory"
            "aims_RendererType" "ValueMap"
        END # end of METADATA
        EXPRESSION ('[INV_CULV_TYPE]' eq 'R')
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 184 69 34
            OUTLINECOLOR -1 -1 -1
            SIZE 5
            SYMBOL "triangle"
        END # end of STYLE
    END # end of CLASS
    CLASS
        METADATA
            "aims_GroupRendererName" "Culvert Inventory"
            "aims_RendererType" "ValueMap"
        END # end of METADATA
        EXPRESSION ('[INV_CULV_TYPE]' eq 'Z')
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 154 212 169
            OUTLINECOLOR -1 -1 -1
            SIZE 5
            SYMBOL "triangle"
        END # end of STYLE
    END # end of CLASS
END # end of LAYER


LAYER # 11
    NAME "Culvert Inventory Annotation"
    METADATA
        "aims_GroupRendererName" "Culvert Inventory"
        "aims_RendererType" "SimpleLabel"
    END # end of METADATA
    TYPE ANNOTATION
    CONNECTION "shogun,port:5151,sde,demo_user,demopwd"
    CONNECTIONTYPE SDE
    DATA "BC_RIMS.SDE.INV_CULVERT_PT,SHAPE,SDE.DEFAULT"
    STATUS OFF
    TRANSFORM ON
    LABELITEM "OBJECTID"
    CLASS
        LABEL
            TYPE TRUETYPE
            POSITION LL
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 0 0 0
            OUTLINECOLOR -1 -1 -1
            FONT "arial"
            SIZE 12
            MINSIZE 4
            MAXSIZE 256
        END # end of LABEL
    END # end of CLASS
END # end of LAYER


LAYER # 12
    NAME "North Arrow"
    METADATA
        "aims_LayerType" "Acetate"
        "aims_Name" "Map Elements"
        "aims_Id" "map_elements"
    END # end of METADATA
    TYPE POINT
    STATUS ON
    TRANSFORM OFF
    FEATURE
        POINTS
            50 500
        END # end of POINTS
    END # end of FEATURE
    CLASS
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR -1 -1 -1
            OUTLINECOLOR -1 -1 -1
            SIZE 85
            SYMBOL "northarrow"
        END # end of STYLE
    END # end of CLASS
END # end of LAYER


LAYER # 13
    NAME "Culvert Inventory (selected)"
    METADATA
        "aims_Id" "BC_RIMS.sde.INV_CULVERT_PT_FeHighlight"
        "genii_LayerType" "DynamicFeature"
        "aims_LayerType" "Feature"
        "aims_Name" "Culvert Inventory (selected)"
    END # end of METADATA
    TYPE POINT
    CONNECTION "shogun,port:5151,sde,demo_user,demopwd"
    CONNECTIONTYPE SDE
    DATA "BC_RIMS.SDE.INV_CULVERT_PT,SHAPE,SDE.DEFAULT"
    STATUS OFF
    TRANSFORM ON
    CLASSITEM "INV_CULV_TYPE"
    CLASS
        METADATA
            "aims_RendererType" "Simple"
        END # end of METADATA
    END # end of CLASS
END # end of LAYER


LAYER # 14
    NAME "Culvert Inventory (current)"
    METADATA
        "aims_Id" "BC_RIMS.sde.INV_CULVERT_PT_CurrHighlight"
        "genii_LayerType" "DynamicFeature"
        "aims_LayerType" "Feature"
        "aims_Name" "Culvert Inventory (current)"
    END # end of METADATA
    TYPE POINT
    CONNECTION "shogun,port:5151,sde,demo_user,demopwd"
    CONNECTIONTYPE SDE
    DATA "BC_RIMS.SDE.INV_CULVERT_PT,SHAPE,SDE.DEFAULT"
    STATUS OFF
    TRANSFORM ON
    CLASSITEM "INV_CULV_TYPE"
    CLASS
        METADATA
            "aims_RendererType" "Simple"
        END # end of METADATA
        STYLE
            BACKGROUNDCOLOR -1 -1 -1
            COLOR 0 255 255
            OUTLINECOLOR -1 -1 -1
            SIZE 10
        END # end of STYLE
    END # end of CLASS
END # end of LAYER

END # end of MAP




More information about the ms4w-users mailing list