Menu

#1610 Empty Merge ConfigurationData throws exception

v3.0
closed
light (353)
2012-09-15
2009-03-24
No

When adding a Merge-Module to wxs without a ConfigurationData element an IndexOutOfBounds exception occurs at Line 4402 in Binder.cs (newval[1])
It's because the pairs[i].Split("=") returns only one empty value because the original configData was empty.

Discussion

  • Rob Mensching

    Rob Mensching - 2009-03-24

    Can you share some example authoring that demonstrates this bug? I'm not immediately seeing how the bad data got past the compiler.

     
  • Instyler Software

    <Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="APPDIR">
    <Merge Language="0" Id="MSM1" FileCompression="yes" SourceFile="C:\\Profiles\\sebastian\\Desktop\\PDF.MSM" DiskId="1"/>
    </Directory>
    </Directory>
    <Feature Level="1" Id="Bla" Absent="disallow" ConfigurableDirectory="APPDIR" Description="My Application" Display="3" InstallDefault="local" Title="My Application" AllowAdvertise="no">
    <MergeRef Id="MSM1"/>
    </Feature>

    I'm not getting the exception on the command line. We are using Wix.Binder.Bind() to create the msi. There it will hang with an IndexOutOfBoundsException

    System.IndexOutOfRangeException was unhandled
    Message="Index was outside the bounds of the array."
    Source="wix"
    StackTrace:
    at Microsoft.Tools.WindowsInstallerXml.Binder.ConfigurationCallback..ctor(String configData)
    at Microsoft.Tools.WindowsInstallerXml.Binder.MergeModules(String tempDatabaseFile, Output output, FileRowCollection fileRows, StringCollection suppressedTableNames)
    at Microsoft.Tools.WindowsInstallerXml.Binder.BindDatabase(Output output, String databaseFile)
    at Microsoft.Tools.WindowsInstallerXml.Binder.Bind(Output output, String file)
    at Instyler.Shape.Compiler.WixToMsiCompiler.Compile(WixElementBase wix, String msiFileName, Boolean iceValidation, MsiTransformDescription[] transforms) in C:\Instyler\Shape\trunk\Shape\ShapeEXE\Source\Compiler\WixToMsiCompiler\WixToMsiCompiler.cs:line 168
    at Instyler.Shape.Compiler.ShapeCompiler.Compile(ProgressTask task, Boolean iceValidation, LanguageBuildModeEnum languages, PlatformBuildModeEnum platformMode, Nullable`1 platforms, WhatToCompileEnum whatToCompile, String destinationFolder, Object[] args) in C:\Instyler\Shape\trunk\Shape\ShapeEXE\Source\Compiler\ShapeCompiler.cs:line 268
    (..)

    Thank you Rob

     
  • Rob Mensching

    Rob Mensching - 2009-03-25

    Okay, I figured this out. There are small differences in the .wixobjs and .wixouts when they are not saved to disk. This is one of those cases.

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 21 days (the time period specified by
    the administrator of this Tracker).