Bug 21691 - T4 null-reference usage for fileName when creating a CompilerError object crashes CompilerError.ToString in the .NET framework
Summary: T4 null-reference usage for fileName when creating a CompilerError object cra...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: T4 ()
Version: Trunk
Hardware: PC Windows
: Normal normal
Target Milestone: master
Assignee: Mikayla Hutchinson [MSFT]
Depends on:
Reported: 2014-07-30 08:51 UTC by bernhard.jungk
Modified: 2014-08-06 17:38 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description bernhard.jungk 2014-07-30 08:51:08 UTC
When using the mono assembly in .NET, CompilerError.ToString() crashes because it contains the following statement:

if (FileName.Length > 0) {

The CompilerErrors were created with:

TextTransform.cs:58 Errors.Add (new CompilerError (null, -1, -1, null, message));


TextTransform.cs:63 var err = new CompilerError (null, -1, -1, null, message) {
TextTransform.cs:64   IsWarning = true,
TextTransform.cs:65 };
Comment 1 Prashant manu 2014-08-04 04:08:42 UTC
Could you please provide us the test steps you followed. If possible, attach a small complete project that demonstrates this behavior.

Also can you please add the logs from the following places?:
On XS IDE Log  Location: XS>Help> Open Log Directory> IDE.log file (with latest
Comment 2 Mikayla Hutchinson [MSFT] 2014-08-06 17:38:13 UTC
Fixed in https://github.com/mono/monodevelop/commit/1baa7e3d3b2df6f57f5a58280aa081c9d30e52a6