Bug 666427 - Mono profiler fails to load on OS X (10.6.6)
Summary: Mono profiler fails to load on OS X (10.6.6)
Status: NEW
Alias: None
Product: Mono: Runtime
Classification: Mono
Component: debug (show other bugs)
Version: 2.10.x
Hardware: x86-64 Mac OS X 10.6
: P5 - None : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-23 15:51 UTC by Johannes Roith
Modified: 2011-06-02 18:01 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Roith 2011-01-23 15:51:29 UTC
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.642.2 Safari/534.16

$ mono --profile /usr/local/lib/mono/4.0/fsc.exe 
Error loading profiler module 'mono-profiler-log': dlopen(libmono-profiler-log.bundle, 9): image not found
Microsoft (R) F# 2.0 Compiler build (private)
Copyright (c) 2002-2010 Microsoft Corporation. All Rights Reserved.

error FS0207: No inputs specified
$ mono --profile

Reproducible: Always
Comment 1 Geoff Norton 2011-01-23 17:12:47 UTC
As a workaround you can do

DYLD_FALLBACK_LIBRARY_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib mono --profile fsc.exe
Comment 2 Johannes Roith 2011-01-23 17:38:10 UTC
Ok, that almost worked.

I had to add /Library/Frameworks/Mono.framework/Versions/Current/bin to my path or it would complain that "mprof-report" could not be found.

This did in fact get the profiler to work properly, but when running mono with the --profile switch fsc.exe does now crash. (It runs fine if the switch is not used.)

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at Microsoft.FSharp.Core.PrintfImpl.capturePrecisionArg@334 (System.String fmt, Microsoft.FSharp.Core.FSharpFunc`2 go, Microsoft.FSharp.Core.FSharpOption`1 precision, Int32 i, Char intFormatChar, Microsoft.FSharp.Collections.FSharpList`1 args, System.Type ty) [0x00000] in \Users\jroith\git\fsharp\src\fsharp\FSharp.Core\printf.fs:337 
  at Microsoft.FSharp.Core.PrintfImpl.capture@537[Unit,String,String] (Microsoft.FSharp.Core.FSharpFunc`2 initialize, System.String fmt, Int32 len, Microsoft.FSharp.Collections.FSharpList`1 args, System.Type ty, Int32 i) [0x00092] in \Users\jroith\git\fsharp\src\fsharp\FSharp.Core\printf.fs:546 
  at Microsoft.FSharp.Core.PrintfImpl.gprintf[Unit,String,String,FSharpFunc`2] (Microsoft.FSharp.Core.FSharpFunc`2 initialize, Microsoft.FSharp.Core.PrintfFormat`4 fmt) [0x0002e] in \Users\jroith\git\fsharp\src\fsharp\FSharp.Core\printf.fs:537 
  at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThen[String,FSharpFunc`2] (Microsoft.FSharp.Core.FSharpFunc`2 continutation, Microsoft.FSharp.Core.PrintfFormat`4 format) [0x00000] in \Users\jroith\git\fsharp\src\fsharp\FSharp.Core\printf.fs:574 
  at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThen[FSharpFunc`2] (Microsoft.FSharp.Core.PrintfFormat`4 format) [0x00000] in \Users\jroith\git\fsharp\src\fsharp\FSharp.Core\printf.fs:592 
  at Microsoft.FSharp.Compiler.ErrorLogger+PhasedError.Create (System.Exception exn, Microsoft.FSharp.Compiler.BuildPhase phase) [0x00000] in \Users\jroith\git\fsharp\src\fsharp\ErrorLogger.fs:147 
  at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ErrorLogger.ErrorR (ErrorLogger x, System.Exception exn) [0x00019] in \Users\jroith\git\fsharp\src\fsharp\ErrorLogger.fs:277 
  at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ErrorLogger.ErrorRecovery (ErrorLogger x, System.Exception exn, range m) [0x00079] in \Users\jroith\git\fsharp\src\fsharp\ErrorLogger.fs:293
Comment 3 Geoff Norton 2011-01-23 17:52:19 UTC
Crashing with the profiler is a seperate issue, could you file another bug for that please so we can track it accordingly?