ルーティングを行うために、古いIntergraphルーティングライブラリを使用しています。
複数のActiveXオブジェクトとCOMオブジェクトを問題なく作成できましたが、作成時にCOMExceptionをスローする「Location」と「LocationCtrl」の1つのタイプがあります。
関連するコードは次のとおりです
_sourceLocation.Streets = _streets;
_sourceLocation.VerifyAutomatic = fa_sourceLocationse;
_sourceLocation.VerifyType = VerifyTypeConstants.VerifyUsingA_sourceLocation_sourceLocation;
_sourceLocation.ReplaceTextAfterParse = true;
_sourceLocation.ReplaceTextAfterVerify = true;
_sourceLocation.Map = _mapOcx;
Streetsプロパティを設定すると、COMExceptionがスローされました。
例外は次のとおりです。
System.Runtime.InteropServices.COMException was unhandled
Message="Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))"
Source="mscorlib"
ErrorCode=-2147418113
StackTrace:
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Intergraph.LocationCtrlClass.set_Streets(Object )
at ECNavigator.Routing.<InitializeRouting>b__0(LocationCtrl l) in C:\Users\Chakrit\Projects\NavigatorService\Experimental\Routing.cs:line 92
at ECNavigator.Util.FrameworkExtensions.ForEach[T](IEnumerable`1 enum, Action`1 action) in C:\Users\Chakrit\Projects\NavigatorService\Experimental\Util\FrameworkExtensions.cs:line 18
at ECNavigator.Routing.InitializeRouting() in C:\Users\Chakrit\Projects\NavigatorService\Experimental\Routing.cs:line 90
at ECNavigator.Routing..ctor(String mapFile, LocationCtrl sourceLocation, LocationCtrl destinationLocation) in C:\Users\Chakrit\Projects\NavigatorService\Experimental\Routing.cs:line 62
at ECNavigator.Program.Main() in C:\Users\Chakrit\Projects\NavigatorService\Experimental\Program.cs:line 23
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
アプリケーション全体は非常に単純で、サポートオブジェクトの一部を初期化するコードのみが含まれていましたが、この特定Location
のタイプは問題なく初期化されますが、プロパティゲッター/セッターを最初に呼び出すと、上記の例外がスローされます。
私はすでに数日間これをデバッグしていて、Location
クラスを適切にインスタンス化して初期化する方法を見つけられませんでした。
どんな手掛かり?これをさらに調査する方法に関するいくつかの指針はありますか?