It's all about the answers!

Ask a question

Getting error while RQMExcel exporting System.NullReferenceException: Object reference not set to an instance of an object


Deepak Sharma (1511) | asked Oct 13 '16, 11:57 p.m.
Sometimes, I'm getting error while RQMExcel exporting System.NullReferenceException: Object reference not set to an instance of an object. There're few images which are supposed to be exported. If I remove those images, error goes away. I'm not sure. why this is happening. Can you please help me here.

Using following are few lines from CFG file:- 
// the literal "execution" will be put into the step type tag, so all steps will be of type execution
testscript.steps.type=N
testscript.steps.description=P & "" & image(P)
testscript.steps.title=O
testscript.steps.name=O
testscript.steps.expectedResult=Q & "" & image(Q)
testscript.steps.comment=R
testscript.category term="Test Script Review Status".value=V


Below is the log. 

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 Mso2Rqm_Common.AttachmentArtifact.CreateImageAttachment(Picture pict, String sArtifactPath)
   at Mso2Rqm_Common.ArtifactFactory.addPictureAttachments(String& currentXML, String artifactPath, Worksheet worksheet, Int32 row, Int32 column, Boolean isImage)
   at Mso2Rqm_Common.ArtifactFactory.GetAttachmentXML(Int32 iArtifactRow, List`1 IDCells, Worksheet worksheet, String sFilePath, String fileDelimiter, Boolean image)
   at Mso2Rqm_Common.ArtifactFactory.getAttachmentXML(Int32 iArtifactRow, Worksheet worksheet, String IDCell, Boolean isImage, Hashtable refMap)
   at Mso2Rqm_Common.ArtifactFactory.evaluate(Target function, Worksheet worksheet, String sCurrentRow)
   at Mso2Rqm_Common.ArtifactFactory.reduceFunctionCalls(Target[] lines, Worksheet worksheet, String sCurrentRow)
   at Mso2Rqm_Common.ArtifactFactory.reduce(Target line, Worksheet worksheet, String sCurrentRow)
   at Mso2Rqm_Common.ArtifactFactory.getVal(String sCurRow, Worksheet worksheet, Target target)
   at Mso2Rqm_Common.ArtifactFactory.getXMLforSteps(String sCurRow, StepMap stepHash, Worksheet workSheet, String sName, String sDelim, Target tID, String sFilePath, String tag)
   at Mso2Rqm_Common.ArtifactFactory.getArtifactsFromWorksheet(PreferenceStore artifactDefs, String sType, String origArtPath, Worksheet currentWorksheet, String& artPath, List`1 artsInWorksheet, Hashtable linksMap)
   at Mso2Rqm_Common.ArtifactFactory.createArtifacts(String configFile, Workbook workbook, String sProjectName)
   at RQMExcelExporter.ExcelExportRepositoryDialog.handleExportToRepository(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.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.OnMessage(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.5485 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
RQMExcelImporter
    Assembly Version: 6.0.2.19868
    Win32 Version: 6.0.2.19868
    CodeBase: file:///C:/Program%20Files%20(x86)/IBM/RQMExcelImporter/RQMExcelImporter.dll
----------------------------------------
Extensibility
    Assembly Version: 7.0.3300.0
    Win32 Version: 7.00.9466
    CodeBase: file:///C:/WINDOWS/assembly/GAC/Extensibility/7.0.3300.0__b03f5f7f11d50a3a/Extensibility.dll
----------------------------------------
Mso2Rqm_Common
    Assembly Version: 6.0.2.19867
    Win32 Version: 6.0.2.*
    CodeBase: file:///C:/Program%20Files%20(x86)/IBM/RQMExcelImporter/Mso2Rqm_Common.DLL
----------------------------------------
Microsoft.Office.Interop.Excel
    Assembly Version: 15.0.0.0
    Win32 Version: 15.0.4569.1506
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Interop.Excel/15.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Excel.dll
----------------------------------------
office
    Assembly Version: 15.0.0.0
    Win32 Version: 15.0.4719.1001
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/office/15.0.0.0__71e9bce111e9429c/office.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5491 (Win7SP1GDR.050727-5400)
    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.5491 (Win7SP1GDR.050727-5400)
    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.5483 (Win7SP1GDR.050727-5400)
    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.5485 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Web
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5491 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
CustomMarshalers
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/CustomMarshalers/2.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.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.


2 answers



permanent link
Mehul Patel (9695) | answered Oct 14 '16, 1:54 p.m.
FORUM MODERATOR
Deepak,

Could you please specify if few specific images are causing reported error OR it occurs with any image ?

Regards,
Mehul

Comments
Deepak Sharma commented Oct 14 '16, 9:24 p.m.

Dear Mehul, Thanks for the reply. 


This issue can occurs with one or few image(s). 
I'm adding those pictures to specific excel rows and column using VBA code(inserting images from file to this excel) then I use RQMExcelImporter tool to start exporting them to RQM. During this I get this error.
 


permanent link
Mehul Patel (9695) | answered Oct 19 '16, 7:06 a.m.
FORUM MODERATOR
Deepak,

Could you please try with 'Test Cases made from scripts with images.xls' from sample folder of installation location? 

Regards,
Mehul

Comments
Deepak Sharma commented Oct 19 '16, 11:25 p.m.

Hi Mehul, Thanks for the reply. 


I've tried  'Test Cases made from scripts with images.xls' from sample folder. And its seems to be working okay, 
But when I add new pictures to excel and try to export it then sometimes, following error occurs.



Mehul Patel commented Oct 20 '16, 2:19 a.m.
FORUM MODERATOR

Deepak,


It seems related to specific data format of image, I need data to investigate further. I would suggest to raise a support ticket or file defect.

Regards,
Mehul

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.