Bugs item #1919364, was opened at 2008-03-19 17:44
Message generated for change (Comment added) made by malesh
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1919364&group_id=105970

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: dark
Group: v3.0
Status: Pending
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Daniel Hegener (dnickless)
Assigned to: sameer garde (sameerg)
Summary: control table import: casting throws exception

Initial Comment:
Dear WiX developers,

thank you very much for delivering this great piece of software.

I'd like to report the following:

Using any version from 3.0.3815 to the newest (currently 3.0.3907) I get
the following error message when trying to "dark" a msi package that has
been created using vs2005.

-----%<---------%<---------%<---------%<---------%<---------%<---------%
<---------%<---------%<---------%<----
[exec] Decompiling the Control table.
[exec] dark.exe : error DARK0001 : Unable to cast object of type
'System.Int32' to type 'System.String'.
[exec] Exception Type: System.InvalidCastException
[exec] Stack Trace:
[exec]    at Microsoft.Tools.WindowsInstallerXml.ControlRow.get_X()
[exec]    at
Microsoft.Tools.WindowsInstallerXml.Decompiler.DecompileControlTable(Tab
le table)
[exec]    at
Microsoft.Tools.WindowsInstallerXml.Decompiler.DecompileTables(Output
output)
[exec]    at
Microsoft.Tools.WindowsInstallerXml.Decompiler.Decompile(Output output)
[exec]    at Microsoft.Tools.WindowsInstallerXml.Tools.Dark.Run(String[]
args)
-----%<---------%<---------%<---------%<---------%<---------%<---------%
<---------%<---------%<---------%<----

Version 3.0.3808 is the last one that works fine for me. I assume
something got broken or I am missing something...

The problem can be traced back to the following code (ControlRow.cs):

-----%<---------%<---------%<---------%<---------%<----
public string X
{
    get { return (string)this.Fields[3].Data; }
    set { this.Fields[3].Data = value; }
}
-----%<---------%<---------%<---------%<---------%<----

As a quick fix, you might want to consider using Convert.ToString()
instead of casting from object to string all over the place... On the
other hand, I'm not quite sure, whether this might result in a slight
loss of performance.

Drop me a line if you need additional information!

Kind regards,



Daniel

----------------------------------------------------------------------

Comment By: Andrew Sampson (malesh)
Date: 2008-05-28 14:06

Message:
Logged In: YES 
user_id=1939857
Originator: NO

I've received the same error in a different place, using 3.0.4123. For me,
it occurs when decompiling the RadioButton table:
dark.exe : error DARK0001 : Unable to cast object of type 'System.Int32'
to type 'System.String'.

Exception Type: System.InvalidCastException

Stack Trace:
   at
Microsoft.Tools.WindowsInstallerXml.Decompiler.DecompileRadioButtonTable(Table
table)
   at
Microsoft.Tools.WindowsInstallerXml.Decompiler.DecompileTables(Output
output)
   at Microsoft.Tools.WindowsInstallerXml.Decompiler.Decompile(Output
output)
   at Microsoft.Tools.WindowsInstallerXml.Tools.Dark.Run(String[] args)

----------------------------------------------------------------------

Comment By: Daniel Hegener (dnickless)
Date: 2008-03-19 17:46

Message:
Logged In: YES 
user_id=2040342
Originator: YES

This is a duplicate of bug #1911850. Sorry for that! Take it as some
additional input... ;)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1919364&group_id=105970

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to