swoodhouse / SCNS-GUI

MIT License
2 stars 0 forks source link

Cannot run on Ubuntu #7

Open BoyuLyu opened 6 years ago

BoyuLyu commented 6 years ago

I have tried running mono SCNS_GUI.exe on Ubuntu 16.04, however it returns the errors below,

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
  at RDotNet.SymbolicExpression..ctor (RDotNet.REngine engine, IntPtr pointer) <0x41e76630 + 0x00079> in <filename unknown>:0 
  at RDotNet.Expression..ctor (RDotNet.REngine engine, IntPtr pointer) <0x41e774e0 + 0x00017> in <filename unknown>:0 
  at RDotNet.ExpressionVector.GetValue (Int32 index) <0x41e77300 + 0x0006f> in <filename unknown>:0 
  at RDotNet.ExpressionVector.get_Item (Int32 index) <0x41e77220 + 0x00073> in <filename unknown>:0 
  at RDotNet.Vector`1+<GetEnumerator>d__0[T].MoveNext () <0x41e770b0 + 0x00078> in <filename unknown>:0 
  at System.Linq.Enumerable.First[TSource] (IEnumerable`1 source) <0x41e76e10 + 0x000be> in <filename unknown>:0 
  at RDotNet.REngine.Parse (System.String statement, System.Text.StringBuilder incompleteStatement) <0x41e75b70 + 0x00243> in <filename unknown>:0 
  at RDotNet.REngine+<Defer>d__0.MoveNext () <0x41e74860 + 0x00263> in <filename unknown>:0 
  at System.Linq.Enumerable.LastOrDefault[TSource] (IEnumerable`1 source) <0x41e74500 + 0x000d6> in <filename unknown>:0 
  at RDotNet.REngine.Evaluate (System.String statement) <0x41e74310 + 0x00037> in <filename unknown>:0 
  at RProvider.RInteropInternal+eval@292.Invoke (Microsoft.FSharp.Core.Unit unitVar0) <0x41e663f0 + 0x000b3> in <filename unknown>:0 
  at RProvider.Internal.Logging.logWithOutput[a] (RProvider.CharacterDeviceInterceptor characterDevice, Microsoft.FSharp.Core.FSharpFunc`2 f) <0x41e65d10 + 0x001cc> in <filename unknown>:0 
  at RProvider.RInteropInternal.eval (System.String expr) <0x41e65980 + 0x0007b> in <filename unknown>:0 
  at Program.installRpackages () <0x41e59aa0 + 0x000bf> in <filename unknown>:0 
  at Program+ServerState..ctor () <0x41e57f60 + 0x009df> in <filename unknown>:0 
  at Program.main (System.String[] _arg1) <0x41e40d50 + 0x00043> in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
  at RDotNet.SymbolicExpression..ctor (RDotNet.REngine engine, IntPtr pointer) <0x41e76630 + 0x00079> in <filename unknown>:0 
  at RDotNet.Expression..ctor (RDotNet.REngine engine, IntPtr pointer) <0x41e774e0 + 0x00017> in <filename unknown>:0 
  at RDotNet.ExpressionVector.GetValue (Int32 index) <0x41e77300 + 0x0006f> in <filename unknown>:0 
  at RDotNet.ExpressionVector.get_Item (Int32 index) <0x41e77220 + 0x00073> in <filename unknown>:0 
  at RDotNet.Vector`1+<GetEnumerator>d__0[T].MoveNext () <0x41e770b0 + 0x00078> in <filename unknown>:0 
  at System.Linq.Enumerable.First[TSource] (IEnumerable`1 source) <0x41e76e10 + 0x000be> in <filename unknown>:0 
  at RDotNet.REngine.Parse (System.String statement, System.Text.StringBuilder incompleteStatement) <0x41e75b70 + 0x00243> in <filename unknown>:0 
  at RDotNet.REngine+<Defer>d__0.MoveNext () <0x41e74860 + 0x00263> in <filename unknown>:0 
  at System.Linq.Enumerable.LastOrDefault[TSource] (IEnumerable`1 source) <0x41e74500 + 0x000d6> in <filename unknown>:0 
  at RDotNet.REngine.Evaluate (System.String statement) <0x41e74310 + 0x00037> in <filename unknown>:0 
  at RProvider.RInteropInternal+eval@292.Invoke (Microsoft.FSharp.Core.Unit unitVar0) <0x41e663f0 + 0x000b3> in <filename unknown>:0 
  at RProvider.Internal.Logging.logWithOutput[a] (RProvider.CharacterDeviceInterceptor characterDevice, Microsoft.FSharp.Core.FSharpFunc`2 f) <0x41e65d10 + 0x001cc> in <filename unknown>:0 
  at RProvider.RInteropInternal.eval (System.String expr) <0x41e65980 + 0x0007b> in <filename unknown>:0 
  at Program.installRpackages () <0x41e59aa0 + 0x000bf> in <filename unknown>:0 
  at Program+ServerState..ctor () <0x41e57f60 + 0x009df> in <filename unknown>:0 
  at Program.main (System.String[] _arg1) <0x41e40d50 + 0x00043> in <filename unknown>:0 

Other than R and mono, what else should I install?

Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug 
    LLVM:          supported, not enabled.
    GC:            sgen

Above is the version of Mono. Is the issue caused by the version of mono? Also, can I compile the source code using xbuild, are there any instructions on this? Thanks a lot!

swoodhouse commented 6 years ago

It looks like F#/.NET is having difficulties connecting to R.

Could you check:

  1. Whether R is in your path
  2. Whether gplots is installed. If it isn't the program should install it but maybe that is not working
BoyuLyu commented 6 years ago

I have just installed the gplots library in R. Is this the one you referred? I tested it again, however, the error is the same. I also tested on win10 and osx just now, the errors were all the same.

swoodhouse commented 6 years ago

That's the right library.

Can you check whether R is in your path?

BoyuLyu commented 6 years ago

Yes, it is in my path.

which R
/usr/bin/R
BoyuLyu commented 6 years ago

By the way, do I need to install the "rDotNet" package?

swoodhouse commented 6 years ago

I don't believe so, that package is for R to call into .NET. The library for .NET to call into R is already packaged with SCNS-GUI.

I think this could be related to this issue: https://github.com/jmp75/rdotnet/issues/70, that a new version of R breaks rdotnet. What version of R are you running? I have tested the tool on Windows, macOS and Linux but this was several months ago with an older R version.

BoyuLyu commented 6 years ago

I am using the R version 3.5.0 (2018-04-23), I guess this might be the issue. What was the version you used for the test?

BoyuLyu commented 6 years ago

I have checked just now that using R 3.3.3 for osx can solve this issue. Thanks!

swoodhouse commented 6 years ago

No problem, thanks for bringing this to my attention. Hopefully it is resolved in a future release of rdotnet and then I will update the binaries.