Menu

#57 Pipistrelle loses Native DLL settings from FCS file

Pipistrelle 2.1
open
nobody
None
1
2014-08-04
2014-06-07
John Barnes
No

This problem seen while building a composition using .omi and .fcs files (attached) generated by Component Builder for the FORTRAN implementation of the Pond tutorial example.

To reproduce the problem:

  • start Pipistrelle and add the component using the attach .omi file
  • right-click on the CB_Pond component and click on Properties...

The attached screenshot shows the NativeDll value is missing.

3 Attachments

Discussion

  • John Barnes

    John Barnes - 2014-06-10

    As a workaround I have made changes to BaseComponentWithEngine.UseNativeDll, at line 22 so that the field is initialised when the property is set true:

    Arguments.Add(new ArgumentNativeDll(GetArgumentIdentity(ArgsWithEngine.NativeDll),
    new ParametersNativeDll(EngineType,
    ParametersNativeDll.Interface.FluidEarth2_Sdk_Interfaces_IEngineTime,
    null, false)));

    Opinions on whether this is an appropriate fix would be welcome.

     
  • John Barnes

    John Barnes - 2014-06-21

    Non-default settings of other arguments (e.g. the Caption argument) are also not conveyed from the .fcs file.

    As a workaround, I added these lines at line 486 of composition.cs:

    var nativeDllArgValue = component.Arguments.Where(a => a.Id.Contains("NativeDll")).Select(a => a.ValueAsString).FirstOrDefault();

    if (!Omi.Component.OmiArgumentValuesSet(component, omiArgs, componentAccessor, reports))
    return false;

    if (nativeDllArgValue != null)
    {
    var nativeDllArg = component.Arguments.Where(a => a.Id.Contains("NativeDll")).Select(a => a).Single();
    nativeDllArg.ValueAsString = nativeDllArgValue;
    }

     
  • Anonymous

    Anonymous - 2014-08-01

    I get a different display due partly to the 5 warnings when loading the OMI into the composition - the warnings are as follows (I guess it's because it can't find the relevant assembly?)

    Session Log
    Report: Cannot find component argument from OMI Key
    Severity: "Warning"
    Resource ID: "InvalidOmiArgumentKey"
    FluidEarth2.Sdk.BaseComponentWithEngine.NativeDll

    Report: Cannot find component argument from OMI Key
    Severity: "Warning"
    Resource ID: "InvalidOmiArgumentKey"
    FluidEarthTutorial.Pond.Capacity

    Report: Cannot find component argument from OMI Key
    Severity: "Warning"
    Resource ID: "InvalidOmiArgumentKey"
    FluidEarthTutorial.Pond.CurrentLevel

    Report: Cannot find component argument from OMI Key
    Severity: "Warning"
    Resource ID: "InvalidOmiArgumentKey"
    FluidEarthTutorial.Pond.Flow

    Report: Cannot find component argument from OMI Key
    Severity: "Warning"
    Resource ID: "InvalidOmiArgumentKey"
    FluidEarthTutorial.Pond.TimeStep

    Report: Trace Stream
    Severity: "Info"
    Resource ID: "Trace"
    FluidEarth2_Pipistrelle.exe Information: 0 : Trace Stream New: 2014-08-01 10:59:34Z
    FluidEarth2_Pipistrelle.exe Information: 0 : TabControl Initialise
    FluidEarth2_Pipistrelle.exe Information: 0 : AssemblyLoader(TabControl).AddSearchUri(file:///C:/Program Files (x86)/FluidEarth/FluidEarth2_Pipistrelle 2.2.3.0 x86/FluidEarth2_Sdk.exe)
    FluidEarth2_Pipistrelle.exe Information: 0 : AssemblyLoader(Composition).AddSearchUri(file:///C:/Program Files (x86)/FluidEarth/FluidEarth2_Pipistrelle 2.2.3.0 x86/FluidEarth2_Sdk.exe)
    FluidEarth2_Pipistrelle.exe Information: 0 : AssemblyName.GetAssemblyName(C:\Program Files (x86)\FluidEarth\FluidEarth2_Pipistrelle 2.2.3.0 x86\FluidEarth2_Pipistrelle.exe);
    FluidEarth2_Pipistrelle.exe Information: 0 : = FluidEarth2_Pipistrelle, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null
    FluidEarth2_Pipistrelle.exe Information: 0 : AssemblyName.GetAssemblyName(C:\Program Files (x86)\FluidEarth\FluidEarth2_Pipistrelle 2.2.3.0 x86\FluidEarth2_Pipistrelle.exe);
    FluidEarth2_Pipistrelle.exe Information: 0 : = FluidEarth2_Pipistrelle, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null
    FluidEarth2_Pipistrelle.exe Information: 0 : AssemblyName.GetAssemblyName(C:\Program Files (x86)\FluidEarth\FluidEarth2_Pipistrelle 2.2.3.0 x86\FluidEarth2_Pipistrelle_UiBase.dll);
    FluidEarth2_Pipistrelle.exe Information: 0 : = FluidEarth2_Pipistrelle_UiBase, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null
    FluidEarth2_Pipistrelle.exe Information: 0 : Finding extensions (*.chip)
    FluidEarth2_Pipistrelle.exe Information: 0 : Searching... C:\Program Files (x86)\FluidEarth\FluidEarth2_Pipistrelle 2.2.3.0 x86
    FluidEarth2_Pipistrelle.exe Information: 0 : Searching... C:\Program Files (x86)\FluidEarth\FluidEarth2_Pipistrelle 2.2.3.0 x86\PipistrelleExtensions
    FluidEarth2_Pipistrelle.exe Information: 0 : Searching... C:\Program Files (x86)\FluidEarth\
    FluidEarth2_Pipistrelle.exe Information: 0 : Searching... C:\Program Files (x86)\FluidEarth\FluidEarth2_ComponentBuilder 2.2.3.0 x86
    FluidEarth2_Pipistrelle.exe Information: 0 : Searching... C:\Program Files (x86)\FluidEarth\FluidEarth2_Pipistrelle 2.2.3.0 x86\Help
    FluidEarth2_Pipistrelle.exe Information: 0 : Searching... C:\Program Files (x86)\FluidEarth\FluidEarth2_SDK 2.2.3.0 x86
    FluidEarth2_Pipistrelle.exe Information: 0 : Searching... C:\Program Files (x86)\FluidEarth\Pipistrelle 2.0 x86
    FluidEarth2_Pipistrelle.exe Information: 0 : Adding extension(s)...
    FluidEarth2_Pipistrelle.exe Information: 0 : C:\Program Files (x86)\FluidEarth\FluidEarth2_ComponentBuilder 2.2.3.0 x86\FluidEarth2_ComponentBuilder 2.2.3.0 x86.chip
    FluidEarth2_Pipistrelle.exe Information: 0 : AssemblyLoader(TabControl).AddSearchUri(file:///C:/Program Files (x86)/FluidEarth/FluidEarth2_ComponentBuilder 2.2.3.0 x86/FluidEarth2_ComponentBuilder 2.2.3.0 x86.chip)
    FluidEarth2_Pipistrelle.exe Information: 0 : AssemblyName.GetAssemblyName(C:\Program Files (x86)\FluidEarth\FluidEarth2_ComponentBuilder 2.2.3.0 x86\PipExt_ComponentBuilder.exe);
    FluidEarth2_Pipistrelle.exe Information: 0 : = PipExt_ComponentBuilder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
    FluidEarth2_Pipistrelle.exe Information: 0 : C:\Program Files (x86)\FluidEarth\FluidEarth2_ComponentBuilder 2.2.3.0 x86\PipExt_ComponentBuilder_DevDebug86.chip
    FluidEarth2_Pipistrelle.exe Information: 0 : AssemblyName.GetAssemblyName(C:\FluidEarth2_Pipistrelle_Extensions\PipExt_ComponentBuilder\bin\x86\Debug\PipExt_ComponentBuilder.exe);
    FluidEarth2_Pipistrelle.exe Error: 0 : Could not load file or assembly 'PipExt_ComponentBuilder.exe' or one of its dependencies. The system cannot find the path specified.
    FluidEarth2_Pipistrelle.exe Error: 0 : System.IO.FileNotFoundException
    FluidEarth2_Pipistrelle.exe Warning: 0 : Not added "Component Builder (Development Debug x86)" as external type not valid.
    FluidEarth2_Pipistrelle.exe Information: 0 : AssemblyLoader(Composition).AddSearchUri(file:///D:/work/downloads/CB_Pond_FORTRAN.omi)
    FluidEarth2_Pipistrelle.exe Information: 0 : Trace Stream Flushed: 2014-08-01 10:59:49Z

     
  • John Barnes

    John Barnes - 2014-08-04

    I get the same warnings as you and just ignore them - they are related to the way the Component is initialised. I don't get the errors in loading Pipistrelle extensions (but don't think they are relevant). I have copied the session log below.

    What does the Properties display look like for your?

    <sessionlog>
    <report id="user-content-InvalidOmiArgumentKey" severity="Warning" caption="Cannot find component argument from OMI Key"><![CDATA[FluidEarth2.Sdk.BaseComponentWithEngine.NativeDll]]></report>
    <report id="user-content-InvalidOmiArgumentKey" severity="Warning" caption="Cannot find component argument from OMI Key"><![CDATA[FluidEarthTutorial.Pond.Capacity]]></report>
    <report id="user-content-InvalidOmiArgumentKey" severity="Warning" caption="Cannot find component argument from OMI Key"><![CDATA[FluidEarthTutorial.Pond.CurrentLevel]]></report>
    <report id="user-content-InvalidOmiArgumentKey" severity="Warning" caption="Cannot find component argument from OMI Key"><![CDATA[FluidEarthTutorial.Pond.Flow]]></report>
    <report id="user-content-InvalidOmiArgumentKey" severity="Warning" caption="Cannot find component argument from OMI Key"><![CDATA[FluidEarthTutorial.Pond.TimeStep]]></report>
    <report id="user-content-Trace" severity="Info" caption="Trace Stream"><![CDATA[FluidEarth2_Pipistrelle.vshost.exe Information: 0 : Trace Stream New: 2014-08-04 11:30:01Z
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : TabControl Initialise
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : AssemblyLoader(TabControl).AddSearchUri(file:///C:/Source/FluidEarth2_Pipistrelle/bin/x86/Debug/FluidEarth2_Sdk.exe)
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : AssemblyLoader(Composition).AddSearchUri(file:///C:/Source/FluidEarth2_Pipistrelle/bin/x86/Debug/FluidEarth2_Sdk.exe)
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : AssemblyName.GetAssemblyName(C:\Source\FluidEarth2_Pipistrelle\bin\x86\Debug\FluidEarth2_Pipistrelle.exe);
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : = FluidEarth2_Pipistrelle, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : AssemblyName.GetAssemblyName(C:\Source\FluidEarth2_Pipistrelle\bin\x86\Debug\FluidEarth2_Pipistrelle.exe);
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : = FluidEarth2_Pipistrelle, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : AssemblyName.GetAssemblyName(C:\Source\FluidEarth2_Pipistrelle\bin\x86\Debug\FluidEarth2_Pipistrelle_UiBase.dll);
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : = FluidEarth2_Pipistrelle_UiBase, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : Finding extensions (*.chip)
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : Searching... C:\Source\FluidEarth2_Pipistrelle\bin\x86\Debug
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : Searching... C:\Source\FluidEarth2_Pipistrelle\bin\x86\Debug\PipistrelleExtensions
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : Searching... C:\Source\FluidEarth2_Pipistrelle\bin\x86\
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : Searching... C:\Source\FluidEarth2_Pipistrelle\bin\x86\Debug\Help
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : Adding extension(s)...
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : C:\Source\FluidEarth2_Pipistrelle\bin\x86\Debug\PipistrelleExtensions\Oatc_ConformanceTests_DevDebug86.chip
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : AssemblyLoader(TabControl).AddSearchUri(file:///C:/Source/FluidEarth2_Pipistrelle/bin/x86/Debug/PipistrelleExtensions/Oatc_ConformanceTests_DevDebug86.chip)
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : AssemblyName.GetAssemblyName(C:\Source\FluidEarth2_Pipistrelle_Extensions\Oatc_ConformanceTests\bin\x86\Debug\Oatc_ConformanceTests.exe);
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : = Oatc_ConformanceTests, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : C:\Source\FluidEarth2_Pipistrelle\bin\x86\Debug\PipistrelleExtensions\PipExt_ComponentBuilder_DevDebug86.chip
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : AssemblyName.GetAssemblyName(C:\Source\FluidEarth2_Pipistrelle_Extensions\PipExt_ComponentBuilder\bin\x86\Debug\PipExt_ComponentBuilder.exe);
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : = PipExt_ComponentBuilder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : C:\Source\FluidEarth2_Pipistrelle\bin\x86\Debug\PipistrelleExtensions\PipExt_Examples_Importer_DevDebug86.chip
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : AssemblyName.GetAssemblyName(C:\Source\FluidEarth2_Pipistrelle_Extensions\PipExt_Examples_Importer\bin\x86\Debug\PipExt_Examples_Importer.dll);
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : = PipExt_Examples_Importer, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : C:\Source\FluidEarth2_Pipistrelle\bin\x86\Debug\PipistrelleExtensions\PipExt_SpatialView_DevDebug86.chip
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : AssemblyName.GetAssemblyName(C:\Source\FluidEarth2_Pipistrelle_Extensions\PipExt_SpatialView\bin\x86\Debug\PipExt_SpatialView.dll);
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : = PipExt_SpatialView, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : C:\Source\FluidEarth2_Pipistrelle\bin\x86\Debug\PipistrelleExtensions\PipExt_UnitTests_DevDebug86.chip
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : AssemblyName.GetAssemblyName(C:\Source\FluidEarth2_Pipistrelle_Extensions\PipExt_UnitTests\bin\x86\Debug\PipExt_UnitTests.exe);
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : = PipExt_UnitTests, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : AssemblyLoader(Composition).AddSearchUri(file:///C:/Source/Tickets/%2357/CB_Pond_FORTRAN.omi)
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : Trace Stream Flushed: 2014-08-04 11:32:14Z
    ]
    ]></report>
    <report id="user-content-Trace" severity="Info" caption="Trace Stream"><![CDATA[FluidEarth2_Pipistrelle.vshost.exe Information: 0 : Trace Stream New: 2014-08-04 11:32:14Z
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : Trace Stream Flushed: 2014-08-04 11:34:00Z
    ]
    ]></report>
    <report id="user-content-Trace" severity="Info" caption="Trace Stream"><![CDATA[FluidEarth2_Pipistrelle.vshost.exe Information: 0 : Trace Stream New: 2014-08-04 11:34:00Z
    FluidEarth2_Pipistrelle.vshost.exe Information: 0 : Trace Stream Flushed: 2014-08-04 11:34:25Z
    ]
    ]></report>
    </sessionlog>

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB