Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullReferenceException in pyro.exe #4072

Closed
wixbot opened this issue Aug 15, 2013 · 4 comments
Closed

NullReferenceException in pyro.exe #4072

wixbot opened this issue Aug 15, 2013 · 4 comments
Labels
Milestone

Comments

@wixbot
Copy link

wixbot commented Aug 15, 2013

While creating a patch with pyro.exe v3.7 I receive the following exception:

pyro.exe : error PYRO0001:
[D:\3.10\Source\Installer.wix\Patch\ARMFull\ARMFull.wixproj]

Exception Type: System.NullReferenceException

Stack Trace:
in Microsoft.Tools.WindowsInstallerXml.PatchTransform.Validate()

Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object
in Microsoft.Tools.WindowsInstallerXml.PatchTransform.Validate()
in Microsoft.Tools.WindowsInstallerXml.Patch.AttachTransforms(ArrayList transforms)
in Microsoft.Tools.WindowsInstallerXml.Tools.Pyro.Run(String[] args) in e:\delivery\Dev\wix37_public\src\pyro\pyro.cs:line 257
in Microsoft.Tools.WindowsInstallerXml.Tools.Pyro.Main(String[] args) in e:\delivery\Dev\wix37_public\src\pyro\pyro.cs:line 101
in Microsoft.Tools.WindowsInstallerXml.Patch.AttachTransforms(ArrayList transforms)
in Microsoft.Tools.WindowsInstallerXml.Tools.Pyro.Run(String[] args) in e:\delivery\Dev\wix37_public\src\pyro\pyro.cs:line 210

I looked into the problem deeper, I built the WIX toolset from the source code and found that the problem occurs in the file PatchTransform.cs in line 171:

Table removeFileTable = this.Transform.Tables["RemoveFile"];
foreach (Row removeFileRow in removeFileTable.Rows)

The variable removeFileTable was null in my case. After having added an "if" check for null, the problem was gone and I saw the following warning:

warning PYRO1095: File 'libexslt.dll' was removed from component 'X'. Removing a file from a component will not result in the file being removed by a patch. You should author a RemoveFile element in your component to remove the file from the installation if you want the file to be removed.

Obviously in my project there was no RemoveFile and the tool failed to process it.

I propose to insert "if not null" check in the PatchTransform.cs file for the removeFileTable variable just the way it is done in the other lines of the file.

Originally opened by tpgalchenko from http://sourceforge.net/p/wix/bugs/3355/

@wixbot
Copy link
Author

wixbot commented Aug 22, 2013

Seems like a good thing to fix.

Originally posted by robmen

@wixbot
Copy link
Author

wixbot commented Aug 22, 2013

Originally changed by bmurri
AssignedTo set to wixsupport

@wixbot
Copy link
Author

wixbot commented Sep 19, 2013

fixed. Commit ccab831367f7.

Originally posted by bmurri
Resolution set to resolved
Status changed from Open to Resolved

@wixbot
Copy link
Author

wixbot commented Sep 19, 2013

Originally changed by bmurri
Resolution changed from resolved to fixed

@wixbot wixbot added the bug label Dec 20, 2015
@wixbot wixbot added this to the v3.8 milestone Dec 20, 2015
@wixbot wixbot closed this as completed Dec 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant