<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic “A fatal error has been detected By JVM” when I tried to open a CAD file twice in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/a-fatal-error-has-been-detected-by-jvm-when-i/m-p/530803#M1617</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;I want to use ArcEngine to read some CAD files on the server and I can not shut down the program. Now I meet the problem that when I open a FeatureClass of CAD file on the second time, &lt;/SPAN&gt;&lt;STRONG style="font-size: 15px; color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;A fatal error has been detected by the Java Runtime Environment:EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x5653d153, pid=4164, tid=7888.&lt;/STRONG&gt;&lt;SPAN style="color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;The code looks like below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;Here is the &lt;STRONG&gt;main&lt;/STRONG&gt; method:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;public static void main(String[] args){
&amp;nbsp; for(int i=0;i&amp;lt;2;i++){
&amp;nbsp; System.out.println("////////////////////"+i+"/////////////////");
&amp;nbsp; try {
&amp;nbsp; OpenCadMgr openCadMgr0 = new OpenCadMgr("0.dwg");
&amp;nbsp; openCadMgr0.showTexts();
&amp;nbsp; OpenCadMgr openCadMgr1 = new OpenCadMgr("1.dwg");
&amp;nbsp; openCadMgr1.showTexts();
&amp;nbsp; OpenCadMgr openCadMgr2 = new OpenCadMgr("2.dwg");
&amp;nbsp; openCadMgr2.showTexts();
&amp;nbsp; OpenCadMgr openCadMgr3 = new OpenCadMgr("3.dwg");
&amp;nbsp; openCadMgr3.showTexts();
&amp;nbsp; OpenCadMgr openCadMgr4 = new OpenCadMgr("4.dwg");
&amp;nbsp; openCadMgr4.showTexts();
&amp;nbsp; OpenCadMgr openCadMgr5 = new OpenCadMgr("5.dwg");
&amp;nbsp; openCadMgr5.showTexts();
&amp;nbsp; } catch (Exception e) {
&amp;nbsp; e.printStackTrace();
&amp;nbsp; }

&amp;nbsp; }
&amp;nbsp; System.out.println("end");
&amp;nbsp; }&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin-bottom: 1em; font-size: 15px; color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;the &lt;STRONG&gt;OpenCadMgr&lt;/STRONG&gt; code is below:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;public class OpenCadMgr {
&amp;nbsp; CADLayerCreator _cadLyrCreator;
&amp;nbsp; String nameOfCadFile = "";

&amp;nbsp; public OpenCadMgr(String fileName) throws Exception, IOException {
&amp;nbsp; nameOfCadFileString = fileName;
&amp;nbsp; String nameOfPathString = "C:\\Users\\test\\Documents\\code\\data";
&amp;nbsp; this._cadLyrCreator = new CADLayerCreator(nameOfPathString, fileName);
&amp;nbsp; nameOfCadFile = fileName;
&amp;nbsp; initLicence();
&amp;nbsp; }

&amp;nbsp; private void initLicence() {}

&amp;nbsp; public void showTexts() {
&amp;nbsp; try {
&amp;nbsp; IFeatureClass pTxtFeatureClass = this._cadLyrCreator.getCadFC(FeatureType.multitext);

&amp;nbsp; if (pTxtFeatureClass != null) {
&amp;nbsp; IFeatureCursor pFeatureCursor = pTxtFeatureClass.search(null, false);
&amp;nbsp; IFeature pFeature = pFeatureCursor.nextFeature();
&amp;nbsp; int featureIndex = 0;
&amp;nbsp; while (pFeature != null) {
&amp;nbsp; int index = pFeature.getFields().findField("text");
&amp;nbsp; String txtString = pFeature.getValue(index).toString();
&amp;nbsp; IPoint ptIPoint = (IPoint) pFeature.getShape();&amp;nbsp; 
&amp;nbsp; pFeature = pFeatureCursor.nextFeature();
&amp;nbsp; featureIndex++;
&amp;nbsp; }
&amp;nbsp; System.out.println(nameOfCadFile);
&amp;nbsp; Cleaner.release(pFeatureCursor);
&amp;nbsp; Cleaner.release(pFeature);
&amp;nbsp; }
&amp;nbsp; Cleaner.release(pTxtFeatureClass);
&amp;nbsp; this._cadLyrCreator.disposeAO();

&amp;nbsp; } catch (Exception e) {
&amp;nbsp; e.printStackTrace();
&amp;nbsp; }
&amp;nbsp; }
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;The &lt;/SPAN&gt;&lt;STRONG style="font-size: 15px; color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;CADLayerCreator&lt;/STRONG&gt;&lt;SPAN style="color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt; class code is here:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;public class CADLayerCreator {
&amp;nbsp; private static HashMap&amp;lt;String,IFeatureClass&amp;gt; fDict = new HashMap&amp;lt;String, IFeatureClass&amp;gt;();
&amp;nbsp; private String _nameOfPath;// the path of CAD file 
&amp;nbsp; private String _nameOfCADFile;// the name of CAD file
&amp;nbsp; IWorkspaceFactory pWorkspaceFactory;
&amp;nbsp; IWorkspace pWorkspace;
&amp;nbsp; IFeatureWorkspace pFeatureWorkspace;
&amp;nbsp; IFeatureClass pFeatureClass;


&amp;nbsp; public CADLayerCreator(String nameOfPath, String nameOfCADFile) {
&amp;nbsp; this._nameOfPath = nameOfPath;
&amp;nbsp; this._nameOfCADFile = nameOfCADFile;
&amp;nbsp; }

&amp;nbsp; public IFeatureClass getCadFC(FeatureType FT) throws Exception{
&amp;nbsp; try {
&amp;nbsp; if (!this.isFileExist()) {
&amp;nbsp; throw new IOException(String.format("can not find the file named '%s' in the path of '%s'!", this._nameOfPath, this._nameOfCADFile));
&amp;nbsp; }
&amp;nbsp; // get cad file full name
&amp;nbsp; String openString = getCadFullNameString(FT);
&amp;nbsp; // set the workspace factory
&amp;nbsp; pWorkspaceFactory = new CadWorkspaceFactory();
&amp;nbsp; // open the workspace
&amp;nbsp; pWorkspace = pWorkspaceFactory.openFromFile(this._nameOfPath, 0);
&amp;nbsp; pFeatureWorkspace = new IFeatureWorkspaceProxy(pWorkspace);
&amp;nbsp; pFeatureClass = pFeatureWorkspace.openFeatureClass(openString);

&amp;nbsp; fDict.put(openString,pFeatureClass);
&amp;nbsp; return pFeatureClass;
&amp;nbsp; } catch (Exception e) {
&amp;nbsp; throw new Exception("CADLayerCreator-&amp;gt; GetCadFC-&amp;gt; " + e.getMessage());
&amp;nbsp; }
&amp;nbsp; }

&amp;nbsp; public void disposeAO(){
&amp;nbsp; pWorkspaceFactory = null;
&amp;nbsp; pWorkspace = null;
&amp;nbsp; pFeatureWorkspace = null;
&amp;nbsp; pFeatureClass = null;

// Cleaner.release(pWorkspaceFactory);
// Cleaner.release(pWorkspace);
// Cleaner.release(pFeatureWorkspace);
// Cleaner.release(pFeatureClass);
&amp;nbsp; System.gc();
&amp;nbsp; }

&amp;nbsp; private IFeatureWorkspace getFW(String name) throws Exception {
&amp;nbsp; try {
&amp;nbsp; // set the workspace factory
&amp;nbsp; IWorkspaceFactory pWorkspaceFactory = new CadWorkspaceFactory();
&amp;nbsp; // open the workspace
&amp;nbsp; IWorkspace pWorkspace = pWorkspaceFactory.openFromFile(name, 0);
&amp;nbsp; // set the feature workspace
&amp;nbsp; IFeatureWorkspace pFeatureWorkspace = new IFeatureWorkspaceProxy(pWorkspace);

&amp;nbsp; return pFeatureWorkspace;
&amp;nbsp; } catch (Exception e) {
&amp;nbsp; // TODO: handle exception
&amp;nbsp; throw new Exception("CADLayerCreator-&amp;gt; getFW-&amp;gt; " + e.getMessage());
&amp;nbsp; }

&amp;nbsp; }

&amp;nbsp; private boolean isFileExist() {
&amp;nbsp; String fullPath = this._nameOfPath + "\\" + this._nameOfCADFile;
&amp;nbsp; File file = new File(fullPath);
&amp;nbsp; return file.exists();
&amp;nbsp; }

&amp;nbsp; private String getCadFullNameString(FeatureType pFT) throws Exception {
&amp;nbsp; try {
&amp;nbsp; switch (pFT) {
&amp;nbsp; case polyline:
&amp;nbsp; return this._nameOfCADFile + ":Polyline";
&amp;nbsp; case multitext:
&amp;nbsp; return this._nameOfCADFile + ":Annotation";
&amp;nbsp; default:
&amp;nbsp; return this._nameOfCADFile + ":Polyline";
&amp;nbsp; }
&amp;nbsp; } catch (Exception e) {
&amp;nbsp; throw new Exception("CADLayerCreator -&amp;gt; getCadFullNameString -&amp;gt; " + e.getMessage());
&amp;nbsp; }
&amp;nbsp; }&lt;/CODE&gt;
&lt;CODE&gt;
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;Here is the console log:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;////////////////////////////////////////0///////////////////////////////////
0.dwg
1.dwg
2.dwg
3.dwg
4.dwg
5.dwg
////////////////////////////////////////1///////////////////////////////////
0.dwg//the 0.dwg file can be read again,but the 1.dwg file can't
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x5653d153, pid=4164, tid=7888
#
# JRE version: Java(TM) SE Runtime Environment (7.0_79-b15) (build 1.7.0_79-b15)
# Java VM: Java HotSpot(TM) Client VM (24.79-b02 mixed mode windows-x86 )
# Problematic frame:
# C 0x5653d153
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\test\Documents\CadReader\hs_err_pid4164.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure whether it is the reason of ArcEngine cannot release the featureclass which I have created or the CAD files have some errors?Can anyone help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 23:06:43 GMT</pubDate>
    <dc:creator>tonylee</dc:creator>
    <dc:date>2021-12-11T23:06:43Z</dc:date>
    <item>
      <title>“A fatal error has been detected By JVM” when I tried to open a CAD file twice</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/a-fatal-error-has-been-detected-by-jvm-when-i/m-p/530803#M1617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;I want to use ArcEngine to read some CAD files on the server and I can not shut down the program. Now I meet the problem that when I open a FeatureClass of CAD file on the second time, &lt;/SPAN&gt;&lt;STRONG style="font-size: 15px; color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;A fatal error has been detected by the Java Runtime Environment:EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x5653d153, pid=4164, tid=7888.&lt;/STRONG&gt;&lt;SPAN style="color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;The code looks like below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;Here is the &lt;STRONG&gt;main&lt;/STRONG&gt; method:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;public static void main(String[] args){
&amp;nbsp; for(int i=0;i&amp;lt;2;i++){
&amp;nbsp; System.out.println("////////////////////"+i+"/////////////////");
&amp;nbsp; try {
&amp;nbsp; OpenCadMgr openCadMgr0 = new OpenCadMgr("0.dwg");
&amp;nbsp; openCadMgr0.showTexts();
&amp;nbsp; OpenCadMgr openCadMgr1 = new OpenCadMgr("1.dwg");
&amp;nbsp; openCadMgr1.showTexts();
&amp;nbsp; OpenCadMgr openCadMgr2 = new OpenCadMgr("2.dwg");
&amp;nbsp; openCadMgr2.showTexts();
&amp;nbsp; OpenCadMgr openCadMgr3 = new OpenCadMgr("3.dwg");
&amp;nbsp; openCadMgr3.showTexts();
&amp;nbsp; OpenCadMgr openCadMgr4 = new OpenCadMgr("4.dwg");
&amp;nbsp; openCadMgr4.showTexts();
&amp;nbsp; OpenCadMgr openCadMgr5 = new OpenCadMgr("5.dwg");
&amp;nbsp; openCadMgr5.showTexts();
&amp;nbsp; } catch (Exception e) {
&amp;nbsp; e.printStackTrace();
&amp;nbsp; }

&amp;nbsp; }
&amp;nbsp; System.out.println("end");
&amp;nbsp; }&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin-bottom: 1em; font-size: 15px; color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;the &lt;STRONG&gt;OpenCadMgr&lt;/STRONG&gt; code is below:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;public class OpenCadMgr {
&amp;nbsp; CADLayerCreator _cadLyrCreator;
&amp;nbsp; String nameOfCadFile = "";

&amp;nbsp; public OpenCadMgr(String fileName) throws Exception, IOException {
&amp;nbsp; nameOfCadFileString = fileName;
&amp;nbsp; String nameOfPathString = "C:\\Users\\test\\Documents\\code\\data";
&amp;nbsp; this._cadLyrCreator = new CADLayerCreator(nameOfPathString, fileName);
&amp;nbsp; nameOfCadFile = fileName;
&amp;nbsp; initLicence();
&amp;nbsp; }

&amp;nbsp; private void initLicence() {}

&amp;nbsp; public void showTexts() {
&amp;nbsp; try {
&amp;nbsp; IFeatureClass pTxtFeatureClass = this._cadLyrCreator.getCadFC(FeatureType.multitext);

&amp;nbsp; if (pTxtFeatureClass != null) {
&amp;nbsp; IFeatureCursor pFeatureCursor = pTxtFeatureClass.search(null, false);
&amp;nbsp; IFeature pFeature = pFeatureCursor.nextFeature();
&amp;nbsp; int featureIndex = 0;
&amp;nbsp; while (pFeature != null) {
&amp;nbsp; int index = pFeature.getFields().findField("text");
&amp;nbsp; String txtString = pFeature.getValue(index).toString();
&amp;nbsp; IPoint ptIPoint = (IPoint) pFeature.getShape();&amp;nbsp; 
&amp;nbsp; pFeature = pFeatureCursor.nextFeature();
&amp;nbsp; featureIndex++;
&amp;nbsp; }
&amp;nbsp; System.out.println(nameOfCadFile);
&amp;nbsp; Cleaner.release(pFeatureCursor);
&amp;nbsp; Cleaner.release(pFeature);
&amp;nbsp; }
&amp;nbsp; Cleaner.release(pTxtFeatureClass);
&amp;nbsp; this._cadLyrCreator.disposeAO();

&amp;nbsp; } catch (Exception e) {
&amp;nbsp; e.printStackTrace();
&amp;nbsp; }
&amp;nbsp; }
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;The &lt;/SPAN&gt;&lt;STRONG style="font-size: 15px; color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;CADLayerCreator&lt;/STRONG&gt;&lt;SPAN style="color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt; class code is here:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;public class CADLayerCreator {
&amp;nbsp; private static HashMap&amp;lt;String,IFeatureClass&amp;gt; fDict = new HashMap&amp;lt;String, IFeatureClass&amp;gt;();
&amp;nbsp; private String _nameOfPath;// the path of CAD file 
&amp;nbsp; private String _nameOfCADFile;// the name of CAD file
&amp;nbsp; IWorkspaceFactory pWorkspaceFactory;
&amp;nbsp; IWorkspace pWorkspace;
&amp;nbsp; IFeatureWorkspace pFeatureWorkspace;
&amp;nbsp; IFeatureClass pFeatureClass;


&amp;nbsp; public CADLayerCreator(String nameOfPath, String nameOfCADFile) {
&amp;nbsp; this._nameOfPath = nameOfPath;
&amp;nbsp; this._nameOfCADFile = nameOfCADFile;
&amp;nbsp; }

&amp;nbsp; public IFeatureClass getCadFC(FeatureType FT) throws Exception{
&amp;nbsp; try {
&amp;nbsp; if (!this.isFileExist()) {
&amp;nbsp; throw new IOException(String.format("can not find the file named '%s' in the path of '%s'!", this._nameOfPath, this._nameOfCADFile));
&amp;nbsp; }
&amp;nbsp; // get cad file full name
&amp;nbsp; String openString = getCadFullNameString(FT);
&amp;nbsp; // set the workspace factory
&amp;nbsp; pWorkspaceFactory = new CadWorkspaceFactory();
&amp;nbsp; // open the workspace
&amp;nbsp; pWorkspace = pWorkspaceFactory.openFromFile(this._nameOfPath, 0);
&amp;nbsp; pFeatureWorkspace = new IFeatureWorkspaceProxy(pWorkspace);
&amp;nbsp; pFeatureClass = pFeatureWorkspace.openFeatureClass(openString);

&amp;nbsp; fDict.put(openString,pFeatureClass);
&amp;nbsp; return pFeatureClass;
&amp;nbsp; } catch (Exception e) {
&amp;nbsp; throw new Exception("CADLayerCreator-&amp;gt; GetCadFC-&amp;gt; " + e.getMessage());
&amp;nbsp; }
&amp;nbsp; }

&amp;nbsp; public void disposeAO(){
&amp;nbsp; pWorkspaceFactory = null;
&amp;nbsp; pWorkspace = null;
&amp;nbsp; pFeatureWorkspace = null;
&amp;nbsp; pFeatureClass = null;

// Cleaner.release(pWorkspaceFactory);
// Cleaner.release(pWorkspace);
// Cleaner.release(pFeatureWorkspace);
// Cleaner.release(pFeatureClass);
&amp;nbsp; System.gc();
&amp;nbsp; }

&amp;nbsp; private IFeatureWorkspace getFW(String name) throws Exception {
&amp;nbsp; try {
&amp;nbsp; // set the workspace factory
&amp;nbsp; IWorkspaceFactory pWorkspaceFactory = new CadWorkspaceFactory();
&amp;nbsp; // open the workspace
&amp;nbsp; IWorkspace pWorkspace = pWorkspaceFactory.openFromFile(name, 0);
&amp;nbsp; // set the feature workspace
&amp;nbsp; IFeatureWorkspace pFeatureWorkspace = new IFeatureWorkspaceProxy(pWorkspace);

&amp;nbsp; return pFeatureWorkspace;
&amp;nbsp; } catch (Exception e) {
&amp;nbsp; // TODO: handle exception
&amp;nbsp; throw new Exception("CADLayerCreator-&amp;gt; getFW-&amp;gt; " + e.getMessage());
&amp;nbsp; }

&amp;nbsp; }

&amp;nbsp; private boolean isFileExist() {
&amp;nbsp; String fullPath = this._nameOfPath + "\\" + this._nameOfCADFile;
&amp;nbsp; File file = new File(fullPath);
&amp;nbsp; return file.exists();
&amp;nbsp; }

&amp;nbsp; private String getCadFullNameString(FeatureType pFT) throws Exception {
&amp;nbsp; try {
&amp;nbsp; switch (pFT) {
&amp;nbsp; case polyline:
&amp;nbsp; return this._nameOfCADFile + ":Polyline";
&amp;nbsp; case multitext:
&amp;nbsp; return this._nameOfCADFile + ":Annotation";
&amp;nbsp; default:
&amp;nbsp; return this._nameOfCADFile + ":Polyline";
&amp;nbsp; }
&amp;nbsp; } catch (Exception e) {
&amp;nbsp; throw new Exception("CADLayerCreator -&amp;gt; getCadFullNameString -&amp;gt; " + e.getMessage());
&amp;nbsp; }
&amp;nbsp; }&lt;/CODE&gt;
&lt;CODE&gt;
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #222426; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;Here is the console log:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;////////////////////////////////////////0///////////////////////////////////
0.dwg
1.dwg
2.dwg
3.dwg
4.dwg
5.dwg
////////////////////////////////////////1///////////////////////////////////
0.dwg//the 0.dwg file can be read again,but the 1.dwg file can't
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x5653d153, pid=4164, tid=7888
#
# JRE version: Java(TM) SE Runtime Environment (7.0_79-b15) (build 1.7.0_79-b15)
# Java VM: Java HotSpot(TM) Client VM (24.79-b02 mixed mode windows-x86 )
# Problematic frame:
# C 0x5653d153
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\test\Documents\CadReader\hs_err_pid4164.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure whether it is the reason of ArcEngine cannot release the featureclass which I have created or the CAD files have some errors?Can anyone help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:06:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/a-fatal-error-has-been-detected-by-jvm-when-i/m-p/530803#M1617</guid>
      <dc:creator>tonylee</dc:creator>
      <dc:date>2021-12-11T23:06:43Z</dc:date>
    </item>
  </channel>
</rss>

