Bug 16096 - TypeLoadException when loading F# code in FSI
Summary: TypeLoadException when loading F# code in FSI
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Reflection ()
Version: 3.2.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-11-10 17:33 UTC by robin.neatherway
Modified: 2013-11-18 14:27 UTC (History)
2 users (show)

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


Attachments
Repro (1.68 KB, application/octet-stream)
2013-11-10 17:33 UTC, robin.neatherway
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 robin.neatherway 2013-11-10 17:33:40 UTC
Created attachment 5388 [details]
Repro

Run `fsharpi --debug tmp.fsx` using the attached file to reproduce. This code can be compiled to an executable and run without issue. May be related to bug 15124.

System.TypeLoadException: A type load exception has occurred.
  at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[System.Char],FSI_0001+LazyList`1[System.Char]]].System-Collections-Generic-IEnumerable`1-GetEnumerator () [0x00000] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/fsharp-fsharp-f3c8ea8/src/fsharp/FSharp.Core/seq.fs:792
  at Microsoft.FSharp.Collections.SeqModule.ToList[Tuple`2] (IEnumerable`1 source) [0x00038] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/fsharp-fsharp-f3c8ea8/src/fsharp/FSharp.Core/seq.fs:1103
  at FSI_0001+bind@31[Microsoft.FSharp.Collections.FSharpList`1[System.Char],System.Char].Invoke (LazyList`1 inp) [0x00000] in <filename unknown>:0
  at FSI_0001+plus@35[Microsoft.FSharp.Collections.FSharpList`1[System.Char]].Invoke (LazyList`1 inp) [0x00000] in <filename unknown>:0
  at FSI_0001+bind@32-1[Microsoft.FSharp.Collections.FSharpList`1[System.Char],Microsoft.FSharp.Collections.FSharpList`1[System.Char]].GenerateNext (IEnumerable`1& next) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[System.Char],FSI_0001+LazyList`1[System.Char]]].MoveNextImpl () [0x00018] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/fsharp-fsharp-f3c8ea8/src/fsharp/FSharp.Core/seq.fs:771
  at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[System.Char],FSI_0001+LazyList`1[System.Char]]].System-Collections-IEnumerator-MoveNext () [0x00000] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/fsharp-fsharp-f3c8ea8/src/fsharp/FSharp.Core/seq.fs:800
  at Microsoft.FSharp.Collections.SeqModule.ToList[Tuple`2] (IEnumerable`1 source) [0x00047] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/fsharp-fsharp-f3c8ea8/src/fsharp/FSharp.Core/seq.fs:1105
  at FSI_0001+bind@31[Microsoft.FSharp.Collections.FSharpList`1[System.Char],Microsoft.FSharp.Collections.FSharpList`1[System.Char]].Invoke (LazyList`1 inp) [0x00000] in <filename unknown>:0
  at FSI_0001.apply[FSharpList`1] (Parser`1 _arg1, IEnumerable`1 str) [0x00000] in <filename unknown>:0
  at <StartupCode$FSI_0001>.$FSI_0001.main@ () [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.4/mcs/class/corlib/System.Reflection/MonoMethod.cs:230
Comment 1 Rodrigo Kumpera 2013-11-14 12:51:09 UTC
This is a separate issue, it's failing due to a method failing to compile.
Comment 2 Rodrigo Kumpera 2013-11-18 14:27:18 UTC
Fixed in master, will be part of 3.2.6