There is an add-in that create a version, in the process of creating the version, it verifies the existing of the version calling the existing versions.
Current it is throwing at exception when connected to ONE geodatabase:
Unhandled exception at 0x00007FFDF2C423EB (CoreInterop.dll) in ArcGISPro_2.9.5.32739_47FF8EC5-67F0-4891-8FB6-0A95A0AC38D0_07_13_2023_15_41_05.dmp: 0xC0000005: Access violation reading location 0x0000000000000000.
at the beginning I though the issue was related to my code but I was able to isolate the issue, Even I create a small snippet in PowerShell that horribly crash when executed:
Add-Type -Path 'C:\Program Files\ArcGIS\Pro\bin\ArcGIS.CoreHost.dll'
Add-Type -Path 'C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Core.dll'
[ArcGIS.Core.Hosting.Host]::Initialize()
[ArcGIS.Core.Data.DatabaseConnectionProperties]$connectionProperties = [ArcGIS.Core.Data.DatabaseConnectionProperties]::new([ArcGIS.Core.Data.EnterpriseDatabaseType]::SQLServer)
$connectionProperties.AuthenticationMode = [ArcGIS.Core.Data.AuthenticationMode]::DBMS
$connectionProperties.Instance = "YOUR_SQL_SERVER"
$connectionProperties.Database = "YOUR_DATABASE"
$connectionProperties.User = "YOUR_USER"
$connectionProperties.Password = "USER_PASSWORD"
$gdb = [ArcGIS.Core.Data.Geodatabase]::new($connectionProperties);
$versionManager = $gdb.GetVersionManager()
$existingVersions = $versionManager.GetVersions()
$existingVersions | %{$_.GetName()}
the issue here is that this error only happens with one database. What should i look into the database to detect the reason of this failure, and if possible solve it.
One really nice thing about it is the ArcGIS Pro allows me to list and create versions using its interface.