Bug 12989 - Mono "NullReferenceException" crash on specific referenced assembly
Summary: Mono "NullReferenceException" crash on specific referenced assembly
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2013-07-01 16:09 UTC by Brett van Swelm
Modified: 2013-07-03 11:40 UTC (History)
1 user (show)

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


Attachments
Gemini.dll (51.50 KB, application/x-msdownload)
2013-07-02 13:12 UTC, Brett van Swelm
Details


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 GitHub or Developer Community 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:
Status:
RESOLVED FIXED

Description Brett van Swelm 2013-07-01 16:09:48 UTC
The DLL in question is "Gemini.dll" v1.2.8 (http://nuget.org/packages/gemini/1.2.8).

With "D:\Applications\Mono-2.11.4\bin" and "C:\Windows\Microsoft.NET\Framework\v4.0.30319" in the path on my Windows 7 machine:

$ csc /target:library /noconfig /r:Gemini.dll Empty.cs 
Microsoft (R) Visual C# Compiler version 4.0.30319.17929
for Microsoft (R) .NET Framework 4.5
Copyright (C) Microsoft Corporation. All rights reserved.

$ mcs /target:library /noconfig /r:Gemini.dll Empty.cs 

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
  at Mono.CSharp.MemberCache.FindNestedType (Mono.CSharp.TypeSpec container, System.String name, Int32 arity) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.MetadataImporter.CreateType (IKVM.Reflection.Type type, Mono.CSharp.TypeSpec declaringType, DynamicTypeReader dtype, Boolean canImportBaseType) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.MetadataImporter.CreateType (IKVM.Reflection.Type type, DynamicTypeReader dtype, Boolean canImportBaseType) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.MetadataImporter.ImportTypeBase (Mono.CSharp.TypeSpec spec, IKVM.Reflection.Type type) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.MetadataImporter.CreateType (IKVM.Reflection.Type type, Mono.CSharp.TypeSpec declaringType, DynamicTypeReader dtype, Boolean canImportBaseType) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.MetadataImporter.ImportTypes (IKVM.Reflection.Type[] types, Mono.CSharp.Namespace targetNamespace, Boolean hasExtensionTypes) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.StaticImporter.ImportAssembly (IKVM.Reflection.Assembly assembly, Mono.CSharp.RootNamespace targetNamespace) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.StaticLoader.LoadReferences (Mono.CSharp.ModuleContainer module) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
  at Mono.CSharp.MemberCache.FindNestedType (Mono.CSharp.TypeSpec container, System.String name, Int32 arity) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.MetadataImporter.CreateType (IKVM.Reflection.Type type, Mono.CSharp.TypeSpec declaringType, DynamicTypeReader dtype, Boolean canImportBaseType) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.MetadataImporter.CreateType (IKVM.Reflection.Type type, DynamicTypeReader dtype, Boolean canImportBaseType) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.MetadataImporter.ImportTypeBase (Mono.CSharp.TypeSpec spec, IKVM.Reflection.Type type) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.MetadataImporter.CreateType (IKVM.Reflection.Type type, Mono.CSharp.TypeSpec declaringType, DynamicTypeReader dtype, Boolean canImportBaseType) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.MetadataImporter.ImportTypes (IKVM.Reflection.Type[] types, Mono.CSharp.Namespace targetNamespace, Boolean hasExtensionTypes) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.StaticImporter.ImportAssembly (IKVM.Reflection.Assembly assembly, Mono.CSharp.RootNamespace targetNamespace) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.StaticLoader.LoadReferences (Mono.CSharp.ModuleContainer module) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 

Thanks,

Brett van Swelm | Senior Engineer
Coverity | 185 Berry Street | Suite 6500, Lobby 3 | San Francisco, CA 94107
The Leader in Development Testing
Read our profile in Forbes, Coverity Gets Code Right 25% Faster
Comment 1 Marek Safar 2013-07-02 05:11:59 UTC
Could you attach the dll?

http://nuget.org/packages/gemini/1.2.8 has only sources and manually compiled dll works fine with master
Comment 2 Brett van Swelm 2013-07-02 13:12:07 UTC
Created attachment 4259 [details]
Gemini.dll

Attached is the Gemini.dll I am using.
Comment 3 Marek Safar 2013-07-03 11:40:13 UTC
Fixed in master