[Mono-bugs] [Bug 661940] New: Method Invokation raises Exception w/ fsintellisense sample on Mac OS X, while it doesn't happen on Ubuntu or Windows.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Dec 31 03:54:02 EST 2010


https://bugzilla.novell.com/show_bug.cgi?id=661940

https://bugzilla.novell.com/show_bug.cgi?id=661940#c0


           Summary: Method Invokation raises Exception w/ fsintellisense
                    sample on Mac OS X, while it doesn't happen on Ubuntu
                    or Windows.
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.8.x
          Platform: x86
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: hokagawa60 at hotmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Community User
           Blocker: ---


Created an attachment (id=406651)
 --> (http://bugzilla.novell.com/attachment.cgi?id=406651)
test code to reproduce the problem.

Description of Problem:

fsintellisense sample in F# cross platform package doesn't work.
Following the instruction written in http://bit.ly/fncC3g, it stops working
after typing "tip 0 6".
Invoke()-ing UntypedParse() at FSharpCompiler.fs:49 raised exception.

Actually, the sample code does not raise exception, as its exception handling
is not good.
Attached is the shorten code to reproduce the problem, which has to be compiled
with FSharpCompier.fs.

Reproducibility for various environment is written below.
* Mac OS X(10.6.5), Mono-2.8.1 ... Exception
* Mac OS X(10.6.5), Mono-trunk(2.9) ... Exception
* Ubuntu(x64) 10.10, Mono-2.6.7 ... Success
* Ubuntu(x64) 10.10, Mono-2.8.1 ... Success
* Windows 7(32bit), .NET framework ... Success

Steps to reproduce the problem:
1. Install Mono-2.8.1 and F# cross-platform package
(http://fsxplat.codeplex.com/releases/view/55463)
2. Clone fsxplat sample codes.
     $ hg clone https://hg01.codeplex.com/fsxplat
3. Go to the fsintellisense sample directory.
     $ cd fsxplat/samples/compiler/fsintellisense
4. Copy attached file to the directory.
5. Compile it with FSharpCompiler.fs which comes with fsintellisense sample.
     $ fsharpc FSharpCompiler.fs testProgram2.fs
6. Run it.
     $ mono testProgram2.exe

Actual Results:
Following exception is reported.
----------------------------------------------------------------------------
> Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.FSharp.Compiler.ErrorLogger+ReportedError: Exception of type 'Microsoft.FSharp.Compiler.ErrorLogger+ReportedError' was thrown.
>   at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ErrorLogger.Error[ImportedAssembly] (ErrorLogger x, System.Exception exn) [0x00000] in <filename unknown>:0 
>   at Microsoft.FSharp.Compiler.Build+TcImports.BuildFrameworkTcImports (Microsoft.FSharp.Compiler.TcConfigProvider tcConfigP, Microsoft.FSharp.Collections.FSharpList`1 frameworkDLLs, Microsoft.FSharp.Collections.FSharpList`1 nonFrameworkDLLs) [0x00000] in <filename unknown>:0 
>   at Microsoft.FSharp.Compiler.IncrementalFSharpBuild.GetFrameworkTcImports (Microsoft.FSharp.Compiler.TcConfig tcConfig) [0x00000] in <filename unknown>:0 
>   at Microsoft.FSharp.Compiler.IncrementalFSharpBuild.Create (Microsoft.FSharp.Compiler.TcConfig tcConfig, System.String projectDirectory, System.String assemblyName, Microsoft.FSharp.Compiler.NiceNameGenerator niceNameGen, Microsoft.FSharp.Compiler.LexResourceManager resourceManager, Microsoft.FSharp.Collections.FSharpList`1 sourceFiles, Boolean ensureReactive, Microsoft.FSharp.Compiler.BuildEvents buildEvents, ErrorLogger errorLogger, Microsoft.FSharp.Core.FSharpFunc`2 errorRecovery) [0x00000] in <filename unknown>:0 
>   at Microsoft.FSharp.Compiler.SourceCodeServices.BackgroundCompiler.CreateIncrementalBuilder (Microsoft.FSharp.Compiler.SourceCodeServices.CheckOptions options) [0x00000] in <filename unknown>:0 
>   at <StartupCode$FSharp-Compiler>.$Service+-ctor at 3967-56.Invoke (Microsoft.FSharp.Compiler.SourceCodeServices.CheckOptions options) [0x00000] in <filename unknown>:0 
>   at <StartupCode$FSharp-Compiler>.$InternalCollections.Compute at 157[CheckOptions,Tuple`4] (Internal.Utilities.Collections.MruCache`2 bc, Microsoft.FSharp.Compiler.SourceCodeServices.CheckOptions key, Microsoft.FSharp.Core.Unit unitVar0) [0x00000] in <filename unknown>:0 
>   at Internal.Utilities.Collections.MruCache`2[Microsoft.FSharp.Compiler.SourceCodeServices.CheckOptions,System.Tuple`4[Microsoft.FSharp.Compiler.Build+TcConfig,Microsoft.FSharp.Compiler.IncrementalBuild+Build,Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Compiler.IncrementalFSharpBuild+FileDependency],Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Compiler.SourceCodeServices.ErrorInfo]]].Get (Microsoft.FSharp.Compiler.SourceCodeServices.CheckOptions key) [0x00000] in <filename unknown>:0 
>   at Microsoft.FSharp.Compiler.SourceCodeServices.BackgroundCompiler.UntypedParseImpl (System.String filename, System.String source, Microsoft.FSharp.Compiler.SourceCodeServices.CheckOptions options, Microsoft.FSharp.Core.FSharpFunc`2 syncop) [0x00000] in <filename unknown>:0 
>   at <StartupCode$FSharp-Compiler>.$Service+UntypedParseOp at 4122.Invoke (Microsoft.FSharp.Core.Unit unitVar0) [0x00000] in <filename unknown>:0 
>   at Microsoft.FSharp.Compiler.SourceCodeServices.Reactor.HandleSyncOp at 116 (Microsoft.FSharp.Core.FSharpFunc`2 op, Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1 channel, Microsoft.FSharp.Compiler.SourceCodeServices.ReactorState state) [0x00000] in <filename unknown>:0 
>   --- End of inner exception stack trace ---
>   at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
>   at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
>   at Microsoft.FSharp.Compiler.Reflection+op_Dynamic at 26-48.Invoke (System.Object args) [0x00000] in <filename unknown>:0 
>   at <StartupCode$FSharp-Core>.$Reflect+Invoke at 617-4[System.Tuple`3[System.String,System.String,System.Object],System.Object].Invoke (System.Tuple`3 inp) [0x00000] in <filename unknown>:0 
>   at Microsoft.FSharp.Compiler.SourceCodeServices+InteractiveChecker.UntypedParse (System.String filename, System.String source, Microsoft.FSharp.Compiler.CheckOptions options) [0x00000] in <filename unknown>:0 
>   at FSharp.Test.IntelliSenseAgent.GetToolTip[Int32,Int32,String,FSharpOption`1] (FSharp.Test.RequestOptions opts, System.Tuple`2 _arg2, System.String lineStr, Microsoft.FSharp.Core.FSharpOption`1 time) [0x00000] in <filename unknown>:0 
>   at <StartupCode$testProgram2>.$TestProgram2.main@ () [0x00000] in <filename unknown>:0 
> <<EOF>>
----------------------------------------------------------------------------


Expected Results:
No exception is reported. Following is the result of Ubuntu(x64) 10.10 and
Mono-2.8.1
----------------------------------------------------------------------------
> Microsoft.FSharp.Compiler.SourceCodeServices+UntypedParseInfo
> <<EOF>>
----------------------------------------------------------------------------


How often does this happen? 
Reproducible.


Additional Information:
I think this problem is somewhat important, because same Reflection code is
used for F# plugin for MonoDevelop.

Also tried Mono-trunk(as of Dec.30th JST) on OS X. It also failed. 
(I don't know following result is relevant or not, as this is my first build of
Mono-trunk on OS X)
----------------------------------------------------------------------------
> * Assertion at mini-generic-sharing.c:833, condition `oti' not met
> 
> Stacktrace:
> 
> * Assertion at mini-exceptions.c:461, condition `class' not met
> 
> zsh: abort      mono testProgram2.exe
----------------------------------------------------------------------------

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list