2
Vote

Win 7 x64, Exception: 'Object Reference not set to an Instance of an object'?

description

In Windows 7 x64 Build 7100 (Release Candidate)
 
It appearst to be attempting to print from the 0th page (it says 'inserting page 0 of x' just before the exception') not sure if this is unusual behaviour or not.
 
XPS source doesn't seem to matter. Tried from the printer driver, from Office 2007, and also this whitepaper: http://www.microsoft.com/downloads/details.aspx?FamilyId=F6EA2586-E397-4E93-8297-2B40A6A417EC&displaylang=en - Tried one page, multiple pages, etc.
 
-- exception details --
 
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
 
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Office.OneNote.Page.SerializeToXml(XmlNode parentNode)
at Microsoft.Office.OneNote.Page.ToString()
at Microsoft.Office.OneNote.Page.Commit()
at XPS2OneNote.OneNoteHelper.InsertXPSPagesInSection(String xpsFilePath, String sectionFilePath, Double scalePercent, ProgressDelegate reportProgress)
at XPS2OneNote.PrintForm.insertXPSButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
 
 
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll

XPS2OneNote
Assembly Version: 1.0.3395.37565
Win32 Version: 1.0.3395.37565

CodeBase: file:///C:/Program%20Files%20(x86)/CodePlex/XPS2OneNote/XPS2OneNote.exe

System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)

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.4918 (NetFXspW7.050727-4900)

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.4918 (NetFXspW7.050727-4900)

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.4918 (NetFXspW7.050727-4900)

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.4918 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

System.Core
Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.4918 built by: NetFXw7

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll

Microsoft.Office.Interop.OneNote
Assembly Version: 12.0.0.0
Win32 Version: 12.0.4518.1014

CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.Office.Interop.OneNote/12.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.OneNote.dll

System.Xml.Linq
Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.4918 built by: NetFXw7

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml.Linq/3.5.0.0__b77a5c561934e089/System.Xml.Linq.dll

ReachFramework
Assembly Version: 3.0.0.0
Win32 Version: 3.0.6920.4900 built by: NetFXw7

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/ReachFramework/3.0.0.0__31bf3856ad364e35/ReachFramework.dll

OneNoteImporter
Assembly Version: 11.0.0.0
Win32 Version: 11.0.0.0

CodeBase: file:///C:/Program%20Files%20(x86)/CodePlex/XPS2OneNote/OneNoteImporter.DLL

WindowsBase
Assembly Version: 3.0.0.0
Win32 Version: 3.0.6920.4900 built by: NetFXw7

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/WindowsBase/3.0.0.0__31bf3856ad364e35/WindowsBase.dll

PresentationFramework
Assembly Version: 3.0.0.0
Win32 Version: 3.0.6920.4900 built by: NetFXw7

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/PresentationFramework/3.0.0.0__31bf3856ad364e35/PresentationFramework.dll

PresentationCore
Assembly Version: 3.0.0.0
Win32 Version: 3.0.6920.4900 built by: NetFXw7

CodeBase: file:///C:/Windows/assembly/GAC_64/PresentationCore/3.0.0.0__31bf3856ad364e35/PresentationCore.dll

System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.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.

comments

superwolfi wrote Oct 17, 2009 at 6:31 AM

Same Error => it should impact high => because the program simple doesn't work

mgrill wrote Oct 18, 2009 at 8:34 PM

Windows 7 Professional 64-bit & Office 2007 Enterprise all up-to-date. On 18 October 2009, here is my error:


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

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Office.OneNote.Page.SerializeToXml(XmlNode parentNode)
at Microsoft.Office.OneNote.Page.ToString()
at Microsoft.Office.OneNote.Page.Commit()
at XPS2OneNote.OneNoteHelper.InsertXPSPagesInSection(String xpsFilePath, String sectionFilePath, Double scalePercent, ProgressDelegate reportProgress)
at XPS2OneNote.PrintForm.insertXPSButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll

XPS2OneNote
Assembly Version: 1.0.3395.37565
Win32 Version: 1.0.3395.37565

CodeBase: file:///C:/Program%20Files%20(x86)/CodePlex/XPS2OneNote/XPS2OneNote.exe

System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

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.4927 (NetFXspW7.050727-4900)

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.4927 (NetFXspW7.050727-4900)

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.4927 (NetFXspW7.050727-4900)

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.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

System.Core
Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.4926 built by: NetFXw7

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll

Microsoft.Office.Interop.OneNote
Assembly Version: 12.0.0.0
Win32 Version: 12.0.4518.1014

CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.Office.Interop.OneNote/12.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.OneNote.dll

System.Xml.Linq
Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.4926 built by: NetFXw7

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml.Linq/3.5.0.0__b77a5c561934e089/System.Xml.Linq.dll

ReachFramework
Assembly Version: 3.0.0.0
Win32 Version: 3.0.6920.4902 built by: NetFXw7

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/ReachFramework/3.0.0.0__31bf3856ad364e35/ReachFramework.dll

OneNoteImporter
Assembly Version: 11.0.0.0
Win32 Version: 11.0.0.0

CodeBase: file:///C:/Program%20Files%20(x86)/CodePlex/XPS2OneNote/OneNoteImporter.DLL

WindowsBase
Assembly Version: 3.0.0.0
Win32 Version: 3.0.6920.4902 built by: NetFXw7

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/WindowsBase/3.0.0.0__31bf3856ad364e35/WindowsBase.dll

PresentationFramework
Assembly Version: 3.0.0.0
Win32 Version: 3.0.6920.4902 built by: NetFXw7

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/PresentationFramework/3.0.0.0__31bf3856ad364e35/PresentationFramework.dll

PresentationCore
Assembly Version: 3.0.0.0
Win32 Version: 3.0.6920.4902 built by: NetFXw7

CodeBase: file:///C:/Windows/assembly/GAC_64/PresentationCore/3.0.0.0__31bf3856ad364e35/PresentationCore.dll

System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.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.

wrote Feb 21, 2013 at 10:45 PM