#397 ERROR: Could not run Fanx.Tools.Fan

codeodor Tue 18 Nov 2008

I get ERROR: Could not run Fanx.Tools.Fan to standard output when I run fan -version --Dfan.runtime=net

I have .NET versions: .NET CLR 1.1.4322; .NET CLR 2.0.50727

I searched both google and fan.org for the error phrase, and neither turned up anything that looked like it might be relevant.

Running with fan_launcher_debug=true gives:

D:\Documents and Settings\Administrator>fan -versions --Dfan.runtime=net

launcher version 1.0 3-Jan-07

args[0] = "fan"

args[1] = "-versions"

args[2] = "--Dfan.runtime=net"

init

fanHome = c:\fan

sys.props:

fan.runtime=java

fan.java.options=-Xmx128M

  sql.mysql.driver=com.mysql.jdbc.Driver

  sql.test.connection=jdbc:mysql:

  sql.test.username=fantest

  sql.test.password=fantest

  sql.test.dialect=sql::MySqlDialect

  fan.runtime.substitutes=C:/dev/fan/src/buildall.fan = C:\dev\rel

C:/dev/fan/src/buildboot.fan = C:\dev\rel C:/dev/fan/src/jfan/build.fan = C:\dev\rel C:/dev/fan/src/nfan/build.fan = C:\dev\rel C:/dev/fan/s rc/sys/build.fan = C:\dev\rel C:/dev/fan/src/compiler/build.fan = C:\dev\ rel C:/dev/fan/src/build/build.fan = C:\dev\rel

fan.build.globalVersion=1.0.35

fan.build.jdkHome=/C:/dev/tools/java/

fan.build.netHome=/C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/

parseArgs

override prop fan.runtime=net

fanArgs (1)

  (0) -versions

checkSubstitutes

targetUri = /D:/Documents and Settings/Administrator/-versions

C:/dev/fan/src/buildall.fan = C:\dev\rel

C:/dev/fan/src/buildboot.fan = C:\dev\rel

C:/dev/fan/src/jfan/build.fan = C:\dev\rel

C:/dev/fan/src/nfan/build.fan = C:\dev\rel

C:/dev/fan/src/sys/build.fan = C:\dev\rel

C:/dev/fan/src/compiler/build.fan = C:\dev\rel

C:/dev/fan/src/build/build.fan = C:\dev\rel

getRuntime = net

findNetVer

registry keys:

  AppPatch

  standards

  Upgrades

  v1.1

  v2.0

loadClr

load mscoree.dll

sysPath = c:\fan\lib\net\sys.dll

fan.main =    Managed code returned 0

HRESULT = -2147024894

ERROR: Could not run Fanx.Tools.Fan

(I added extra line breaks because preview button showed debug output all on one line)

I'm on Windows 2003, 32 bit, using Fan 1.0.35. Use with Java seems to work fine.

Any ideas?

Thanks, Sam

PS: I got the following error when posting this. Not sure how I'll fix it yet.

You have errors in your fandoc:

* Invalid annotation [0] [Line 57]

Tried removing space with "= C:\dev\rel" as I noticed it was blockquotes / codified in preview. Didn't work.

Removed /C: in the c:/dev/rel. Didn't work.

Tried it in another group (from the "C:/dev/fan/src/" lines.

Removed all double dashes from Fan output, changed square brackets to parentheses. If this is posted, that fixed it.

brian Tue 18 Nov 2008

Hi Sam,

I've probably failed to mention it, but build 1.0.35 doesn't support .NET (sorry - I should have made that clear). The last few builds have all the compiler and fcode changes for nullable types and value types. However Andy just pushed .NET support for those changes to Mercurial this morning (and he still has some bugs to fix). So we won't have .NET up and running again until the next build.

You have errors in your fandoc:

The simplest thing is typically just to indent everything 2 or more spaces and it turns into a code block.

codeodor Tue 18 Nov 2008

Cool, thanks for the info.

Is there a place to download prior versions, and/or build from source? Failing that, when do you expect to make the next build available?

Thanks, Sam

brian Tue 18 Nov 2008

You can download old builds from here or really old builds from here.

You can review the changelog to pick an older build. I'd say build 1.0.32 is a good build if you want .NET.

Or you can rebuild from source - pull from hg here and follow these instructions (still a bit rough around the edges).

codeodor Fri 21 Nov 2008

Thanks Brian. Still having troubles with .NET in version 1.0.32. However, I was able to at least get the -Dfan.runtime=net to run under 1.0.30.

I've included error info below, if it will help you.

D:\Documents and Settings\Administrator>fan -version Fan Launcher Copyright (c) 2006-2008, Brian Frank and Andy Frank Licensed under the Academic Free License version 3.0

Java Runtime:

java.vm.name:    Java HotSpot(TM) Client VM
java.vm.vendor:  Sun Microsystems Inc.
java.vm.version: 1.6.0_02-b05
java.home:       D:\Program Files\Java\jre1.6.0_02
fan.home:        c:\fan
sys.version:     1.0.32

D:\Documents and Settings\Administrator>fan -version --Dfan.runtime=net ERROR: Sys.static System.Exception: Invalid fan.home dir: Eüc:\fan

sys::Sys.sysPropToDir (Unknown Source)
sys::Sys..cctor (Unknown Source)

System.TypeInitializationException: The type initializer for Fan.Sys.Sys threw

an exception.

sys::Sys.get_HomeDir (Unknown Source)
at Fanx.Tools.Tool.verifyDlls (Unknown Source)
at Fanx.Tools.Tool.sysInit (Unknown Source)

The type initializer for Fan.Sys.Sys threw an exception.

sys::Sys..cctor (Unknown Source)

Fan Launcher Copyright (c) 2006-2008, Brian Frank and Andy Frank Licensed under the Academic Free License version 3.0

.NET Runtime:

clr.version: 2.0.50727.42

System.TypeInitializationException: The type initializer for Fan.Sys.Sys threw

an exception.

sys::Sys.get_HomeDir (Unknown Source)
at Fanx.Tools.Fan.version (Unknown Source)
at Fanx.Tools.Fan.doRun (Unknown Source)
at Fanx.Tools.Fan.MainThread.run (Unknown Source)
sys::Thread.doRun (Unknown Source)

The type initializer for Fan.Sys.Sys threw an exception.

sys::Sys..cctor (Unknown Source)

codeodor Fri 21 Nov 2008

Now trying to run hello world example script under .NET (having used set fan_runtime=net) still getting Null reference errors:

D:\Documents and Settings\Administrator\workspace>fan shizzle.fan System.NullReferenceException: Object reference not set to an instance of an obj ect.

sys::Err.doDumpStack (Err.cs:236)
sys::Err.doDumpStack (Err.cs:294)
sys::Err.dumpStack (Err.cs:207)
sys::Err.dumpStack (Err.cs:203)
sys::Type.emit (Type.cs:808)
sys::Type.finish (Type.cs:835)

sys::Err: Cannot emitFinish: shizzle_0::Shizzle

sys::Type.finish (Type.cs:847)
sys::Method.MethodFunc.checkArgs (Method.cs:457)
sys::Method.MethodFunc.call (Method.cs:216)
sys::Method.call (Method.cs:179)
at Fanx.Tools.Fan.callMain (Fan.cs:132)

Cause:

sys::NullErr: Object reference not set to an instance of an object.
  sys::Err.doDumpStack (Err.cs:236)
  sys::Err.doDumpStack (Err.cs:294)
  sys::Err.dumpStack (Err.cs:207)
  sys::Err.dumpStack (Err.cs:203)
  sys::Type.emit (Type.cs:808)
  sys::Type.finish (Type.cs:835)

D:\Documents and Settings\Administrator\workspace>

The code was: class Shizzle {

static Void main(){ 

echo("hello world #2") } }

And of course works fine under Java.

Just letting you know - dunno if it's helpful.

andy Fri 21 Nov 2008

I played around with build 32 and couldn't reproduce that. If I followed that, no version really works is that correct? Are you running 64-bit .NET?

codeodor Fri 21 Nov 2008

No, this is in Windows 2003.

andy Fri 21 Nov 2008

Ok, well I tested on my machine against build 32 and it works ok, so something fishy is going on. However, a lot of code has changed since then, so lets hold off until we roll out the next build (probably next week), which has the new .NET runtime changes, and I'll get you to try it again.

codeodor Fri 21 Nov 2008

Sounds good to me.

Login or Signup to reply.