1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not in the dictionary?

Discussion in 'ModelConverterX' started by gary20, 10/4/10.

  1. gary20

    gary20

    Joined:
    23/9/08
    Messages:
    41
    Country:
    canada
    Error on trying to import FS9 Mdl:

    "the given key was not present in the dictionary"

    The pop up box allows to continue, but it doesnt open.

    No indication of the "given key" can be found to identify.

    Any ideas on what the error is?

    Thanks

    Gary
  2. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,263
    Country:
    netherlands
    Hi Gary,

    Not sure, do you have the exact error message or the object so I can test? Looks like the reader is not robust enough for something unexpected.
  3. gary20

    gary20

    Joined:
    23/9/08
    Messages:
    41
    Country:
    canada
    Not in the Library?

    Thanks Arno

    Error message below:

    The pop up box states an unhandled exception error with the message as above that some key is not in the dictionary.
    The option to continue doesnt compile so you have to quit.

    I'll send the file. Can you remind me of the email addy for you. Last time I tried to send a file I wasnt successful.

    Best

    Gary

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
    at System.ThrowHelper.ThrowKeyNotFoundException()
    at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
    at ASToFra.SCASMReader.DrawTriList2TriList(SCASMCommand sca)
    at ASToFra.SCASMReader.Generate3DModel(List`1 cmdList, Dictionary`2 labelDict)
    at ASToFra.MDL9Reader.ReadMDL(Int64 len)
    at ASToFra.MDL9Reader.Read(String filename)
    at ASToFra.MDLReader.Read(String filename)
    at ASToFra.ObjectReader.read(String fileName)
    at ASToFra.MainWindow.bwImporter_DoWork(Object sender, DoWorkEventArgs e)
    at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
    at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3603 (GDR.050727-3600)
    CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    ModelConverterX
    Assembly Version: 1.0.0.0
    Win32 Version: 1.2.0.0
    CodeBase: file:///C:/FSUtils/ModelConverterX/ModelConverterX.exe
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    ObjectWriter
    Assembly Version: 1.0.0.0
    Win32 Version: 1.2.0.0
    CodeBase: file:///C:/FSUtils/ModelConverterX/ObjectWriter.DLL
    ----------------------------------------
    TextureObject
    Assembly Version: 1.0.0.0
    Win32 Version: 1.2.0.0
    CodeBase: file:///C:/FSUtils/ModelConverterX/TextureObject.DLL
    ----------------------------------------
    ObjectModel3D
    Assembly Version: 1.0.0.0
    Win32 Version: 1.2.0.0
    CodeBase: file:///C:/FSUtils/ModelConverterX/ObjectModel3D.DLL
    ----------------------------------------
    ObjectRenderer
    Assembly Version: 1.0.0.0
    Win32 Version: 1.2.0.0
    CodeBase: file:///C:/FSUtils/ModelConverterX/ObjectRenderer.DLL
    ----------------------------------------
    GRV11DLL
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/FSUtils/ModelConverterX/GRV11DLL.DLL
    ----------------------------------------
    ObjectReader
    Assembly Version: 1.0.0.0
    Win32 Version: 1.2.0.0
    CodeBase: file:///C:/FSUtils/ModelConverterX/ObjectReader.DLL
    ----------------------------------------
    ObjectEditor
    Assembly Version: 1.0.0.0
    Win32 Version: 1.2.0.0
    CodeBase: file:///C:/FSUtils/ModelConverterX/ObjectEditor.DLL
    ----------------------------------------
    TextureLoader
    Assembly Version: 1.0.0.0
    Win32 Version: 1.2.0.0
    CodeBase: file:///C:/FSUtils/ModelConverterX/TextureLoader.DLL
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
    <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

    Attached Files:

  4. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,263
    Country:
    netherlands
    Thanks, I would be happy to have the MDL file to test, this is an error I would not expect :). You can send it to arno _AT_ fsdeveloper _DOT_ com.
  5. gary20

    gary20

    Joined:
    23/9/08
    Messages:
    41
    Country:
    canada
    Thanks Arno

    Emailed the MDL.
    Hope you recieve it OK.

    Gary
  6. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,263
    Country:
    netherlands
    Thanks, I got the file and will take a look at it.
  7. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,263
    Country:
    netherlands
    Hi Gary,

    I found the issue. The vertexlist was not read in correctly because I mixed up an unsigned int16 with a signed one. It is fixed in the next development release and your object loads fine now.
  8. gary20

    gary20

    Joined:
    23/9/08
    Messages:
    41
    Country:
    canada
    Thanks Arno

    You are the master :D

    I only wish I had half your talent.

    Gary

Share This Page