A layer/shape file cause map to stop working.

Discussion created by thekryan on Oct 19, 2011
I have problem with Java GIS application which was developed using ESRI Engine Runtime (9.3.1) and arcobjects.jar library. The application uses multi-layer map including few dynamics layer, the main one is displaying cars which is updated in real-time based on gps information.

In development phase we used shape files with WGS-84 spatial reference system. We changed it recently and replaced them with equivalent shape files with new coordinate system which is called PUWG-1992 (currently standard in Poland) with Geographic coordinate system name: GCS_ETRS_1989.

There is one specific shape file that causes the map to stop responding after it is added. There is  no specific error in log after it is added. However map just stops working, it doesn't refresh, white screen etc. Also it only occurs in working environment (the application is used there already), and in my development environment it doesn't seem to cause any problem. Probably because there is more data for application to handle there. So it might seem like kind of efficiency problem, but still there are two layers which are bigger (shape files have 250 MB and 300 MB) and they don't cause any problems.

Coordinate system information of the problematic layer doesn't differ from other shape files. Its FeatureClass shape geometry is line (layer contains roads), it has 9 text fields and one double type field - OBJECT_ID (route identifier).

The application is run with following JVM settings at the moment:

-Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=128m

I tried to increase Xms and Xmx but it doesn't help. When I increased MaxPermSize to 256m, map crashed with AutomationExceptions. It seemed like it caused other feature classes stop working.
Here are examples:

AutomationException: 0x80070057 - One or more arguments are invalid
        at com.esri.arcgis.carto.FeatureLayer.isValid(Unknown Source) 

 AutomationException: 0x80010108 - The object invoked has disconnected from its c 
            at com.esri.arcgis.controls.MapControl.getLayer(Unknown Source) 
            at Source) 

AutomationException: 0x80010012 - The callee (server [not server application]) is not available and disappeared); all connections are invalid.  The call did not execute.
 at com.esri.arcgis.controls.ControlsSelectAllCommand.setLayerIndex(Unknown Source)

Any suggestions?
Thanks in advance.