System.Windows.Media.FontFamily exception

Aug 25, 2010 at 6:17 AM
Edited Aug 25, 2010 at 6:22 AM

I'm now running a batch automate on workbooks in a folder. As with my other message, I'm merging, computing directed graph metrics, autofilling columns with edgeweights, no subgraph images, no clusters, showing graph, and saving image to file. Process runs for 17 files, then throws an error below for each subsequent file. Analysis still appears to run, image files are still generated and look correct. Not so much fun clicking through errors with a batch of ~50 files left to go.

I'm running a 2.4GHz Q6600 with 4GB RAM on 32-bit Windows Vista Ultimate with Office 2007 and v131.

 

Microsoft Office Document Customization

The customization assembly could not be found or could not be loaded. You can still edit and save the document. Contact your administrator or the author of this document for further assistance.

 

[[Details]]

 

The type initializer for 'System.Windows.Media.FontFamily' threw an exception.


************** Exception Text **************
System.TypeInitializationException: The type initializer for 'System.Windows.Media.FontFamily' threw an exception. ---> System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
   at MS.Internal.FontCache.FileMapping.Create(String name, Int64 maxSize)
   at MS.Internal.FontCache.CacheManager.RenewCache(ElementCacher oldCache)
   at MS.Internal.FontCache.CacheManager.GetCurrentCache()
   at MS.Internal.FontCache.CacheManager.Lookup(IFontCacheElement e)
   at System.Windows.Media.FontFamily.PreCreateDefaultFamilyCollection()
   at System.Windows.Media.FontFamily..cctor()
   --- End of inner exception stack trace ---
   at System.Windows.Media.Typeface..ctor(FontFamily fontFamily, FontStyle style, FontWeight weight, FontStretch stretch)
   at Microsoft.NodeXL.Visualization.Wpf.VertexAndEdgeDrawerBase..ctor()
   at Microsoft.NodeXL.Visualization.Wpf.VertexDrawer..ctor()
   at Microsoft.NodeXL.Visualization.Wpf.GraphDrawer..ctor(Visual parentVisual)
   at Microsoft.NodeXL.Visualization.Wpf.NodeXLControl..ctor()
   at Microsoft.NodeXL.ExcelTemplate.ExcelTemplateNodeXLControl..ctor()
   at Microsoft.NodeXL.ExcelTemplate.TaskPane.CreateNodeXLControl(GeneralUserSettings oGeneralUserSettings)
   at Microsoft.NodeXL.ExcelTemplate.TaskPane..ctor(ThisWorkbook thisWorkbook, Ribbon ribbon)
   at Microsoft.NodeXL.ExcelTemplate.ThisWorkbook.set_GraphVisibility(Boolean value)
   at Microsoft.NodeXL.ExcelTemplate.ThisWorkbook.ThisWorkbook_Startup(Object sender, EventArgs e)
   at Microsoft.Office.Tools.Excel.Workbook.OnStartup()
   at Microsoft.NodeXL.ExcelTemplate.ThisWorkbook.FinishInitialization()
   at Microsoft.VisualStudio.Tools.Office.EntryPointComponentBase.Microsoft.VisualStudio.Tools.Applications.Runtime.IEntryPoint.FinishInitialization()
   at Microsoft.VisualStudio.Tools.Applications.AddInAdapter.ExecutePhase(ExecutionPhases executionPhases)
   at Microsoft.VisualStudio.Tools.Applications.AddInAdapter.CompleteInitialization()
   at Microsoft.VisualStudio.Tools.Office.Internal.OfficeAddInAdapter.ExecuteEntryPointsHelper()


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version:
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Runtime.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Runtime.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Runtime.v9.0.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version:
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.1 built by: SP
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.AddIn
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.1 built by: SP
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.AddIn/3.5.0.0__b77a5c561934e089/System.AddIn.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    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.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.AddIn.Contract
    Assembly Version: 2.0.0.0
    Win32 Version: 3.5.30729.1 built by: SP
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.AddIn.Contract/2.0.0.0__b03f5f7f11d50a3a/System.AddIn.Contract.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Hosting.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Hosting.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Hosting.v9.0.dll
----------------------------------------
System.Deployment
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version:
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Contract.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Contract.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Contract.v9.0.dll
----------------------------------------
Microsoft.Office.Tools.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Tools.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.v9.0.dll
----------------------------------------
Microsoft.NodeXL.ExcelTemplate
    Assembly Version: 1.0.1.131
    Win32 Version: 1.0.1.131
    CodeBase: file:///C:/Users/Brian/AppData/Local/Apps/2.0/JE0XPNYG.1MC/1JO46M5W.BZL/micr..vsto_89bba316835ec8ea_0001.0000_140c8a3d1512e1b2/Microsoft.NodeXL.ExcelTemplate.DLL
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Excel.AddInAdapter.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Excel.AddInAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Excel.AddInAdapter.v9.0.dll
----------------------------------------
Microsoft.Office.Tools.Excel.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Tools.Excel.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Excel.v9.0.dll
----------------------------------------
Microsoft.Office.Interop.Excel
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.6425.1000
    CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.Office.Interop.Excel/12.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Excel.dll
----------------------------------------
Microsoft.Office.Tools.Common.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Tools.Common.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.v9.0.dll
----------------------------------------
office
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.6425.1000
    CodeBase: file:///C:/Windows/assembly/GAC/office/12.0.0.0__71e9bce111e9429c/office.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
    Assembly Version: 0.0.0.0
    Win32 Version:
    CodeBase: file:///C:/Windows/assembly/GAC_32/mscorlib/2.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.AddInAdapter.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.AddInAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.AddInAdapter.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.AddInAdapter.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.AddInAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.AddInAdapter.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Contract.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.21022.123
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Contract.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Contract.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Excel.AddInProxy.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Excel.AddInProxy.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Excel.AddInProxy.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Excel.HostAdapter.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Excel.HostAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Excel.HostAdapter.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.HostAdapter.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.HostAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.HostAdapter.v9.0.dll
----------------------------------------
Microsoft.NodeXL.Core
    Assembly Version: 1.0.1.131
    Win32 Version: 1.0.1.131
    CodeBase: file:///C:/Users/Brian/AppData/Local/Apps/2.0/JE0XPNYG.1MC/1JO46M5W.BZL/micr..vsto_89bba316835ec8ea_0001.0000_140c8a3d1512e1b2/Microsoft.NodeXL.Core.DLL
----------------------------------------
Microsoft.NodeXL.ApplicationUtil
    Assembly Version: 1.0.1.131
    Win32 Version: 1.0.1.131
    CodeBase: file:///C:/Users/Brian/AppData/Local/Apps/2.0/JE0XPNYG.1MC/1JO46M5W.BZL/micr..vsto_89bba316835ec8ea_0001.0000_140c8a3d1512e1b2/Microsoft.NodeXL.ApplicationUtil.DLL
----------------------------------------
Microsoft.NodeXL.Util
    Assembly Version: 1.0.1.131
    Win32 Version: 1.0.1.131
    CodeBase: file:///C:/Users/Brian/AppData/Local/Apps/2.0/JE0XPNYG.1MC/1JO46M5W.BZL/micr..vsto_89bba316835ec8ea_0001.0000_140c8a3d1512e1b2/Microsoft.NodeXL.Util.DLL
----------------------------------------
Microsoft.NodeXL.Control.Wpf
    Assembly Version: 1.0.1.131
    Win32 Version: 1.0.1.131
    CodeBase: file:///C:/Users/Brian/AppData/Local/Apps/2.0/JE0XPNYG.1MC/1JO46M5W.BZL/micr..vsto_89bba316835ec8ea_0001.0000_140c8a3d1512e1b2/Microsoft.NodeXL.Control.Wpf.DLL
----------------------------------------
Microsoft.NodeXL.Visualization.Wpf
    Assembly Version: 1.0.1.131
    Win32 Version: 1.0.1.131
    CodeBase: file:///C:/Users/Brian/AppData/Local/Apps/2.0/JE0XPNYG.1MC/1JO46M5W.BZL/micr..vsto_89bba316835ec8ea_0001.0000_140c8a3d1512e1b2/Microsoft.NodeXL.Visualization.Wpf.DLL
----------------------------------------
Microsoft.Research.WinFormsControls
    Assembly Version: 1.0.1.6
    Win32 Version: 1.0.1.6
    CodeBase: file:///C:/Users/Brian/AppData/Local/Apps/2.0/JE0XPNYG.1MC/1JO46M5W.BZL/micr..vsto_89bba316835ec8ea_0001.0000_140c8a3d1512e1b2/Microsoft.Research.WinFormsControls.DLL
----------------------------------------
Microsoft.NodeXL.Algorithms
    Assembly Version: 1.0.1.131
    Win32 Version: 1.0.1.131
    CodeBase: file:///C:/Users/Brian/AppData/Local/Apps/2.0/JE0XPNYG.1MC/1JO46M5W.BZL/micr..vsto_89bba316835ec8ea_0001.0000_140c8a3d1512e1b2/Microsoft.NodeXL.Algorithms.DLL
----------------------------------------
PresentationFramework
    Assembly Version: 3.0.0.0
    Win32 Version:
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/PresentationFramework/3.0.0.0__31bf3856ad364e35/PresentationFramework.dll
----------------------------------------
WindowsBase
    Assembly Version: 3.0.0.0
    Win32 Version: 3.0.6920.4016 built by: VistaSP2GDR
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/WindowsBase/3.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
PresentationCore
    Assembly Version: 3.0.0.0
    Win32 Version:
    CodeBase: file:///C:/Windows/assembly/GAC_32/PresentationCore/3.0.0.0__31bf3856ad364e35/PresentationCore.dll
----------------------------------------
WindowsFormsIntegration
    Assembly Version: 3.0.0.0
    Win32 Version: 3.0.6920.4000 built by: QFE
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/WindowsFormsIntegration/3.0.0.0__31bf3856ad364e35/WindowsFormsIntegration.dll
----------------------------------------
Microsoft.NodeXL.Layouts
    Assembly Version: 1.0.1.131
    Win32 Version: 1.0.1.131
    CodeBase: file:///C:/Users/Brian/AppData/Local/Apps/2.0/JE0XPNYG.1MC/1JO46M5W.BZL/micr..vsto_89bba316835ec8ea_0001.0000_140c8a3d1512e1b2/Microsoft.NodeXL.Layouts.DLL
----------------------------------------


Aug 25, 2010 at 6:36 PM

I'll look into this problem along with the one you reported yesterday (they're related) and get back to you.

-- Tony

Sep 9, 2010 at 10:07 PM

I was able to reproduce the problem and I'm investigating how to fix it.  In the meantime, the short-term (and admittedly quite annoying) workaround is to run a smaller batch of workbooks at a time -- perhaps 10 on your machine -- and close Excel before running the next batch.

-- Tony

Sep 9, 2010 at 10:20 PM

Thanks for the update; it's good to know I don't have a schizophrenic machine :) In the grand scheme of things, it's actually not a huge inconvenience running batches of 10-15 especially since I'm probably a few standard deviations out from the typical/intended use case!

Nov 16, 2010 at 4:51 AM

It's a bit late, but this bug will be fixed in version 1.0.1.156 of NodeXL.  Thanks again for reporting it.

-- Tony

Jun 3, 2011 at 9:34 PM

hi i repeat the information i posted in other discussion because one the problem i have is : The type initializer for 'System.Windows.Media.FontFamily' threw an exception

I installed Node Xl on windows xp Spanish), office 2010

error are:

 

 

---------------------------

Assertion Failed: Abort=Quit, Retry=Debug, Ignore=Continue

---------------------------

 

 

 

at TaskPane.AssertValid()

at TaskPane.WorksheetContextMenuManager_RequestEdgeCommandEnable(Object sender, RequestEdgeCommandEnableEventArgs e)

at WorksheetContextMenuManager.AddEdgeContextMenuItems(Range oClickedRange)

at WorksheetContextMenuManager.EdgeTable_BeforeRightClick(Range Target, Boolean& Cancel)

at ListObject.OnBeforeRightClick(Range targetRange, Boolean& cancel)

at ListObjectSupport.Microsoft.VisualStudio.Tools.Excel.IListObjectListener.BeforeRightClick(Object targetRange, Boolean& Cancel)

at ListObjectListenerContractAdapter.BeforeRightClick(IntPtr targetRange, Boolean& cancel)

at ListObjectAdapter.OnBeforeRightClick(Range targetRange, Boolean& cancel)

at ListObjectAdapter.Worksheet_BeforeRightClick(Range targetRange, Boolean& cancel)

at DocEventSink.Microsoft.Office.Interop.Excel.DocEvents.BeforeRightClick(Range Target, Boolean& Cancel)

at RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, Si......

<truncated>

---------------------------

Anular Reintentar Omitir

 

---------------------------

Microsoft NodeXL

---------------------------

An unexpected problem occurred. If it occurs again, please copy the details to the clipboard by typing Ctrl-C, then post the details to http://www.codeplex.com/NodeXL/Thread/List.aspx.

 

Details:

 

[NullReferenceException]: Object reference not set to an instance of an object.

 

at Microsoft.NodeXL.ExcelTemplate.TaskPane.GetEdgeCommandEnableFlags(IEdge oClickedEdge, Boolean& bEnableSelectAllEdges, Boolean& bEnableDeselectAllEdges, Boolean& bEnableSelectAdjacentVertices, Boolean& bEnableDeselectAdjacentVertices)

at Microsoft.NodeXL.ExcelTemplate.TaskPane.WorksheetContextMenuManager_RequestEdgeCommandEnable(Object sender, RequestEdgeCommandEnableEventArgs e)

at Microsoft.NodeXL.ExcelTemplate.WorksheetContextMenuManager.AddEdgeContextMenuItems(Range oClickedRange)

at Microsoft.NodeXL.ExcelTemplate.WorksheetContextMenuManager.EdgeTable_BeforeRightClick(Range Target, Boolean& Cancel)

---------------------------

Aceptar

---------------------------

Jun 4, 2011 at 12:11 AM
Edited Jun 4, 2011 at 12:11 AM

[I'm copying the post from alguien2011 to a new discussion at http://nodexl.codeplex.com/discussions/260168. -- Tony]