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

pyro0001: object reference not set to an instance of an object #4629

Closed
wixbot opened this issue Dec 19, 2014 · 9 comments · Fixed by wixtoolset/wix#250
Closed

pyro0001: object reference not set to an instance of an object #4629

wixbot opened this issue Dec 19, 2014 · 9 comments · Fixed by wixtoolset/wix#250
Assignees
Milestone

Comments

@wixbot
Copy link

wixbot commented Dec 19, 2014

Hi,

I was building a msp file using candle, light torch and pyro as mentioned in tutorial.
And I got this error message when I try to build the .msp file from .wixout files.
The detail error message is:

Exception Type: System.NullReferenceException

Stack Trace:
at Microsoft.Tools.WindowsInstallerXml.MediaRow.get_LastSequence()
at Microsoft.Tools.WindowsInstallerXml.Patch.AttachTransforms(ArrayList transforms)
at Microsoft.Tools.WindowsInstallerXml.Tools.Pyro.Run(String[] args)

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Tools.WindowsInstallerXml.MediaRow.get_LastSequence()
at Microsoft.Tools.WindowsInstallerXml.Patch.AttachTransforms(ArrayList transforms)
at Microsoft.Tools.WindowsInstallerXml.Tools.Pyro.Run(String[] args)
at Microsoft.Tools.WindowsInstallerXml.Tools.Pyro.Main(String[] args)

I checked the source file where it causes problem but it is hard to understand for me why the corresponding object gives me null (I am not sure what are conditions to make the object null).

Please can you help me to solve the problem? I won't put the source file code because it is very large, but If needed I will post it later.

Thank you.

Originally opened by sblee

@wixbot
Copy link
Author

wixbot commented Dec 20, 2014

Which version of WiX are you using?

@wixbot
Copy link
Author

wixbot commented Dec 20, 2014

I tried with Wix v 3.8 and 3.9 and both version had same issue.
But finally I was able to fix this issue by replacing "MediaTemplate" element to "Media" and "Property" for that "Media" element. I don't know exactly the reason that "MediaTemplate" doesn't work (I was following the tutorial in the reference "Wix 3.6: A Developer's Guide to Windows Installer XML"), but after I followed the tutorial in the web ("SamplePatch") it was fine for me.

Originally posted by sblee

@wixbot
Copy link
Author

wixbot commented Dec 20, 2014

Could you post your before and after media authoring?

Originally posted by barnson

@wixbot
Copy link
Author

wixbot commented Dec 20, 2014

Here is the code wish was generating nullreferenceexception:

**** . . .

And here is the code which was solving the nullreferenceexception:

** **

Originally posted by sblee

@wixbot
Copy link
Author

wixbot commented Jan 8, 2015

Release changed from v3.9 to v3.10

@wixbot
Copy link
Author

wixbot commented Mar 4, 2015

Originally changed by barnson
AssignedTo set to bobarnson

@wixbot
Copy link
Author

wixbot commented Apr 28, 2015

Release changed from v3.10 to v3.11

@computerquip
Copy link

I'm still running into this issue and it's not clear what's going on at all. I'd like to avoid delving into internal errors if I can. Can I get any insight as to what's going on or at least how to proceed?

@JustinKaffenberger
Copy link

For anyone that is still having this issue, based on what I've dug up searching online, it seems the WiX team is not planning on fixing it for the 3.x WiX Toolset. The excuse is fine, in that there is a decent workaround. The problem I have, is the workaround is not well documented. So, I've documented the workaround as an answer to the following stackoverflow post:

https://stackoverflow.com/questions/46486520/wixtoolsets-error-pyro0001-object-reference-not-set-to-an-instance-of-an-objec

Hopefully this helps someone!

@robmen robmen assigned robmen and unassigned barnson Sep 22, 2022
@robmen robmen modified the milestones: v4.x, v4.0 Sep 22, 2022
@robmen robmen added this to To do in wix.4.0-preview.1 via automation Sep 22, 2022
wix.4.0-preview.1 automation moved this from To do to Done Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants