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

Patch build tries to set non-nullable field to null when deleting row #8689

Open
1 task done
barnson opened this issue Aug 13, 2024 · 0 comments · May be fixed by wixtoolset/wix#564
Open
1 task done

Patch build tries to set non-nullable field to null when deleting row #8689

barnson opened this issue Aug 13, 2024 · 0 comments · May be fixed by wixtoolset/wix#564
Assignees
Labels
Milestone

Comments

@barnson
Copy link
Member

barnson commented Aug 13, 2024

WiX Version

5.0.1

.NET or MSBuild or Visual Studio Version

8.0.400

HeatWave Version

n/a

Windows Version

n/a

Repro Repo

No response

Repro Steps

Create a patch where an update package has rows deleted in the RemoveFile table.

Actual Result

wix.exe : error WIX0001: System.InvalidOperationException: Cannot set column 'InstallMode' with a null value because this is a required field.
   at WixToolset.Data.WindowsInstaller.Field.ValidateValue(ColumnDefinition column, Object value) in D:\a\wix\wix\src\api\wix\WixToolset.Data\WindowsInstaller\Field.cs:line 191
   at WixToolset.Core.WindowsInstaller.Bind.BindTransformCommand.Execute() in D:\a\wix\wix\src\wix\WixToolset.Core.WindowsInstaller\Bind\BindTransformCommand.cs:line 265
   at WixToolset.Core.WindowsInstaller.Bind.GenerateDatabaseCommand.ImportSubStorages(Database db) in D:\a\wix\wix\src\wix\WixToolset.Core.WindowsInstaller\Bind\GenerateDatabaseCommand.cs:line 365
   at WixToolset.Core.WindowsInstaller.Bind.GenerateDatabaseCommand.Execute() in D:\a\wix\wix\src\wix\WixToolset.Core.WindowsInstaller\Bind\GenerateDatabaseCommand.cs:line 110
   at WixToolset.Core.WindowsInstaller.Bind.BindDatabaseCommand.Execute() in D:\a\wix\wix\src\wix\WixToolset.Core.WindowsInstaller\Bind\BindDatabaseCommand.cs:line 461
   at WixToolset.Core.WindowsInstaller.MspBackend.Bind(IBindContext context) in D:\a\wix\wix\src\wix\WixToolset.Core.WindowsInstaller\MspBackend.cs:line 67
   at WixToolset.Core.Binder.BackendBind(IBindContext context) in D:\a\wix\wix\src\wix\WixToolset.Core\Binder.cs:line 65
   at WixToolset.Core.Binder.Bind(IBindContext context) in D:\a\wix\wix\src\wix\WixToolset.Core\Binder.cs:line 40
   at WixToolset.Core.CommandLine.BuildCommand.BindPhase(Intermediate output, IReadOnlyCollection`1 localizations, IReadOnlyCollection`1 filterCultures, String cabCachePath, Int32 cabbingThreadCount, IReadOnlyCollection`1 bindPaths, Dictionary`2 bindVariables, InputsAndOutputs inputsOutputs, CancellationToken cancellationToken) in D:\a\wix\wix\src\wix\WixToolset.Core\CommandLine\BuildCommand.cs:line 343
   at WixToolset.Core.CommandLine.BuildCommand.ExecuteAsync(CancellationToken cancellationToken) in D:\a\wix\wix\src\wix\WixToolset.Core\CommandLine\BuildCommand.cs:line 150
   at WixToolset.Tools.Program.Run(IServiceProvider serviceProvider, IMessageListener listener, String[] args, CancellationToken cancellationToken) in D:\a\wix\wix\src\wix\wix\Program.cs:line 103
   at WixToolset.Tools.Program.Main(String[] args) in D:\a\wix\wix\src\wix\wix\Program.cs:line 48

Expected Result

Successful patch build.

The failure comes in BindTransformCommand.Execute at https:/wixtoolset/wix/blob/main/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs#L271. ColumnDefinition.MinValue is nullable as of WiX v4, so the assignment tries to set a non-nullable field to null. In WiX v3, ColumnDefinition.MinValue wasn't nullable so got a default value of 0, which isn't a legal value for that particular column, but survives the null check.

Acknowledgements

  • I acknowledge that this is a fully completed bug report. It is not a question or attempt to get help debugging my issue (because those should be sent to Discussions).
@barnson barnson added the triage label Aug 13, 2024
@barnson barnson self-assigned this Aug 20, 2024
@barnson barnson added binder and removed triage labels Aug 20, 2024
@barnson barnson added this to the v6.0.0-rc.1 milestone Aug 25, 2024
barnson added a commit to wixtoolset/wix that referenced this issue Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant