.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AccessViolationException when trying to add a new Shape Data Connection

1 REPLY 1
Reply
Message 1 of 2
thomas.croux
1924 Views, 1 Reply

AccessViolationException when trying to add a new Shape Data Connection

Hello all, Smiley Wink

 

Context :

  • AutoCAD Map 2013
  • Visual Studio 2012
  • .NET, C#, WPF
  • FDO
  • Oracle DataStore

 

When AutoCAD Map 3D has started, I manually netload the DLL I create.

During my module initialisation, a DWT file is downloaded into the temp directory. A new document based on this DWT is created. This document contains many layers pointing to an oracle datasource through FDO. When this new document is created, by the code, I close all other document windows.

Once all is loaded, I manually (not programmatically) want to open a new additional Shape Connection. I select SHP Connection type in the Display Manager of the Task Pane, then I select a single file or a directory to connect to. I push the connect button, then, after checking checkboxes, I click on Add to map button.

At this time, 2 out of 3 around, I'm facing an AutoCAD Map crash.

 

In Debug context with VS12, the raised exception is AccessViolationException. There is no stacktrace in VisualStudio. There is either no details. The Exception is raised between the "CommandWillStart" and "CommandEnded" events handled on the document. The GlobalCommandName is "DMUI_ADDLAYERSUICMD". The message is "Tentative de lecture ou d'écriture de mémoire protégée. Cela indique souvent qu'une autre mémoire est endommagée."

 

When running Map out of VS12, I get the Fatal Error dialog box, and the Bug Report Window. Here are the Report Details :

<?xml version="1.0" encoding="UTF-8"?>
<CERInfo ClientVersion="4">
<ProcessInfo
  AvailPhysicalMem="8BACE000"
  AvailPageFile="277024000"
  AvailVirtualMem="7FF87263000"
  LastWin32Error="1400"
  ErrNo="34"
/>
<UserInfo UserCanBeContacted="no" SerialNum="">
  <UserName value =""/>
  <UserPhone value=""/>
  <UserEmail value=""/>
  <UserSubscription macID="" userId=""/>
  <ErrorDescription id="20" CrashDate="09/04/2014" CrashID="" AllowRT="1"></ErrorDescription>
  <Metrics CalendarUptime="3443099456253" RequiredSend="0" WaitDur="10000" />  <WorkingDocument name="Dessin2.dwg"/>
</UserInfo>
<upipackage><upivalue version="1.0" type="product" requestingapp="true"><level name="productline" id="MAP"><level name="release" id="2013"><level name="master" id="{5783F2D7-B002-040C-2102-0060B0CE6BBA}"><level name="build" id="16.0.210.5"/></level></level></level></upivalue>
<upivalue version="1.0" type="product"><level name="productline" id="ADSKContentExplorer"><level name="release" id="2013"><level name="master" id="2013"><level name="build" id="3.0.0"/></level></level></level></upivalue>
<upivalue version="1.0" type="product"><level name="productline" id="ADSKContentExplorer"><level name="release" id="2013"><level name="master" id="2013"><level name="build" id="3.0.0"/></level></level></level></upivalue>
<upivalue version="1.0" type="product"><level name="productline" id="MAP"><level name="release" id="2014"><level name="master" id="{5783F2D7-D002-040C-2102-0060B0CE6BBA}"><level name="build" id="16.1.100.47"/></level></level></level></upivalue>
</upipackage><OSInfo  MajorVersion = "6" MinorVersion = "1" BuildNumber = "7601" PlatformId = "2" CSDVersion = "Service Pack 1" ServicePackMajor = "1" ServicePackMinor = "0" SuiteFlags = "100" KernelMajorVersion = "6" KernelMinorVersion = "1" KernelBuildNum = "7601" KernelReleaseNum = "18015"/>
<LocaleInfo> <LocalUserDefault IDefaultAnsiCodepage="1252"  IDefaultCodepage="850"  IDefaultLanguage="140c"  IDefaultCountry="352"  ILanguage="140c"  ICountry="352" />
 <LocalSystemDefault IDefaultAnsiCodepage="1252"  IDefaultCodepage="850"  IDefaultLanguage="140c"  IDefaultCountry="352"  ILanguage="140c"  ICountry="352" />
</LocaleInfo>
<ProductInformation name ="AutoCAD" build_version="G.204.0.0(x64)" registry_version="19.0" install_id_string="ACAD-B002:40C" registry_localeID="1036" uptime="138713125181" session_start_count="253" session_clean_close_count="105" current_session_length="180"/><AdLmInformation init="0" command="0" conditions="" /><AppCDATA><![CDATA[Command: DMUI_ADDLAYERSUICMD;Groupe de commandes;D�but de groupe de commandes;Groupe de commandes;Groupe de commandes;Mapconnect
UnloadedApps:aclaunchnfwws.arx(7fefa1e0000,13000);
Clr Data&colon;
   � AcMapDMUtilities.InsertGisElementFromFeatureSourceAndClasses(AcDbDatabase* , Char* , AcArray<wchar_t const \*\,AcArrayMemCopyReallocator<wchar_t const \*> >* , AcArray<wchar_t const \*\,AcArrayMemCopyReallocator<wchar_t const \*> >* , AcArray<wchar_t const \*\,AcArrayMemCopyReallocator<wchar_t const \*> >* , AcArray<wchar_t const \*\,AcArrayMemCopyReallocator<wchar_t const \*> >* , AcArray<int\,AcArrayMemCopyReallocator<int> >* , Boolean , Boolean , Boolean , Boolean )
   � AcMapDMUtilities.InsertGisElementFromFeatureSourceAndClasses(AcDbDatabase* , Char* , AcArray<wchar_t const \*\,AcArrayMemCopyReallocator<wchar_t const \*> >* , AcArray<wchar_t const \*\,AcArrayMemCopyReallocator<wchar_t const \*> >* , AcArray<wchar_t const \*\,AcArrayMemCopyReallocator<wchar_t const \*> >* , AcArray<wchar_t const \*\,AcArrayMemCopyReallocator<wchar_t const \*> >* , AcArray<int\,AcArrayMemCopyReallocator<int> >* , Boolean , Boolean , Boolean , Boolean )
   � AddLayersUICmd.Execute(AddLayersUICmd* )
]]></AppCDATA>
<GraphicsDriverInfo Driver = "acaddm11.hdi" />
<GraphicsInfo InfoType="D3D9Config"><![CDATA[
Driver: aticfx64.dll
DriverVersion: 8.17.10.1151
Description: AMD FirePro M5950
DeviceName: \\.\DISPLAY2
VendorId: 4098
DeviceId: 26432
SubSysId: 372248636
Revision: 0
WHQLLevel: 0
DeviceType: 1
AdapterOrdinal: 0
Caps: 131072
Caps2: 3758227456
Caps3: 928
Presentation: 2147483663
Cursor: 1
Dev: 1818352
PrimitiveMisc: 4181234
Raster: 259219857
ZCmp: 255
SrcBlend: 16383
DestBlend: 16383
AlphaCmp: 255
Shade: 541192
Texture: 126021
TextureFilter: 117638912
CubeTextureFilter: 50529024
VolumeTextureFilter: 117638912
TextureAddress: 63
VolumeTextureAddress: 63
Line: 31
MaxTextureWidth: 16384
MaxTextureHeight: 16384
MaxVolumeExtent: 16384
MaxTextureRepeat: 8192
MaxTextureAspectRatio: 8192
MaxAnisotropy: 16
MaxVertexW: 1e+010
GuardBandLeft: -32768
GuardBandTop: -32768
GuardBandRight: 32768
GuardBandBottom: 32768
ExtentsAdjust: 0
Stencil: 511
FVF: 1048584
TextureOp: 67108863
MaxTextureBlendStages: 8
MaxSimultaneousTextures: 8
VertexProcessing: 379
MaxActiveLights: 8
MaxUserClipPlanes: 6
MaxVertexBlendMatrices: 4
MaxVertexBlendMatrixIndex: 0
MaxPointSize: 256
MaxPrimitiveCount: 5592405
MaxVertexIndex: 16777215
MaxStreams: 16
MaxStreamStride: 508
VertexShaderVersion: 4294836992
MaxVertexShaderConst: 256
PixelShaderVersion: 4294902528
PixelShader1xMaxValue: 3.40282e+038
Dev2: 113
MasterAdapterOrdinal: 0
AdapterOrdinalInGroup: 0
NumberOfAdaptersInGroup: 2
DeclTypes: 1023
NumSimultaneousRTs: 4
StretchRectFilter: 50332416
VertexTextureFilter: 50332416
MaxVShaderInstructionsExecuted: 4294967295
MaxPShaderInstructionsExecuted: 4294967295
MaxVertexShader30InstructionSlots: 32768
MaxPixelShader30InstructionSlots: 32768
]]></GraphicsInfo>
<DxDiagInfo><SystemInformation><OperatingSystem><![CDATA[64-bit Windows 7 Professional 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.130828-1532)]]></OperatingSystem><Language><![CDATA[French (Regional Setting: French)]]></Language><SystemManufacturer><![CDATA[Hewlett-Packard]]></SystemManufacturer><SystemModel><![CDATA[HP EliteBook 8760w]]></SystemModel><BIOS><![CDATA[Default System BIOS]]></BIOS><Processor><![CDATA[Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz (4 CPUs), ~2.7GHz]]></Processor><SystemMemory><![CDATA[8192MB RAM]]></SystemMemory><PageFile><![CDATA[5642MB used, 10640MB available]]></PageFile><FullDirectXVersion><![CDATA[DirectX 11]]></FullDirectXVersion><DxDiagVersion><![CDATA[6.01.7601.17514]]></DxDiagVersion></SystemInformation><GraphicsDeviceInfo><DirectXVersion><![CDATA[10.0]]></DirectXVersion><DDIVersion><![CDATA[11]]></DDIVersion><DDIVersionNumber><![CDATA[b]]></DDIVersionNumber><DxDiagWHQLLevel><![CDATA[0]]></DxDiagWHQLLevel><DriverSignedValid><![CDATA[True]]></DriverSignedValid><DriverSigned><![CDATA[True]]></DriverSigned><Manufacturer><![CDATA[Advanced Micro Devices, Inc.]]></Manufacturer><ChipType><![CDATA[ATI display adapter (0x6740)]]></ChipType><DACType><![CDATA[Internal DAC(400MHz)]]></DACType><GraphicsHWMemory><![CDATA[727 MB]]></GraphicsHWMemory><DisplayMode><![CDATA[1680 x 1050 (32 bit) (60Hz)]]></DisplayMode><VendorID><![CDATA[0x1002]]></VendorID><DeviceID><![CDATA[0x6740]]></DeviceID><SubSystemID><![CDATA[0x1630103C]]></SubSystemID><RevisionID><![CDATA[0x0000]]></RevisionID><GraphicsDriverFile><![CDATA[aticfx64.dll,aticfx64.dll,aticfx64.dll,aticfx32,aticfx32,aticfx32,atiumd64.dll,atidxx64.dll,atidxx64.dll,atiumdag,atidxx32,atidxx32,atiumdva,atiumd6a.cap,atitmm64.dll]]></GraphicsDriverFile><DriverFileVersion><![CDATA[8.17.0010.1151]]></DriverFileVersion><DriverDate><![CDATA[11/21/2012 01:06:46]]></DriverDate><WHQLLevel><![CDATA[1]]></WHQLLevel></GraphicsDeviceInfo></DxDiagInfo><VideoDriverInfo><ATIPackagingVersion><![CDATA[9.003.3-121120a-151003C]]></ATIPackagingVersion></VideoDriverInfo>
<LicenseInfo><ProductKey><![CDATA[129E1]]></ProductKey><FeatureName><![CDATA[MAP_F_S]]></FeatureName><FeatureVersion><![CDATA[2012.0319]]></FeatureVersion><LicenseBehavior><![CDATA[1]]></LicenseBehavior><LicenseUsage><![CDATA[1]]></LicenseUsage><LicenseExpiration><![CDATA[1]]></LicenseExpiration></LicenseInfo>
</CERInfo>

 

 

Shape files seem to be good because I have no problem when connecting to them when my module is not netloaded.

 

What am I doing wrong ? Where could the problem ? Does anyone could help me ?

 

Best Regards,

 

Thomas.

1 REPLY 1
Message 2 of 2
Daniel.Du
in reply to: thomas.croux

As you side, you have this problem when "netload" your customized dll. Could you please clarify what did you do in your DLL? Can you send us a minim sample project to narrow down the problem?


Daniel Du
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost