VRS on opensuse on Arm

Bug reports and questions about running Virtual Radar Server on Linux
gariac
Posts: 31
Joined: Sun Jan 13, 2013 6:25 am

VRS on opensuse on Arm

Post by gariac » Wed Jun 25, 2014 11:06 am

I'm trying to make a box that will run dump1090 and VRS on a beagle bone black (henceforth called BBB), with a wifi connection to a smartphone to display the tracking. I'm hoping at least the list of plane flying can be shown on the smart phone. The lack of an internet connection will make Google maps an issue.

Anyway, at this point, I can't get VRS to run. I am ssh-ing into the BBB using the -X option, i.e.
ssh -X me@xxx.xxx.xxx.xxx

I have installed VRS as a user on the BBB rather than run as root. That is how I run it on my opensuse desktop.

Code: Select all

dongle@linux:~/vrs> mono VirtualRadar.exe
Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdipCreateFont (intptr,single,System.Drawing.FontStyle,System.Drawing.GraphicsUnit,intptr&) <0xffffffff>
  at System.Drawing.Font.CreateFont (string,single,System.Drawing.FontStyle,System.Drawing.GraphicsUnit,byte,bool) <0x0013f>
  at System.Drawing.Font..ctor (string,single,System.Drawing.FontStyle,System.Drawing.GraphicsUnit,byte,bool) <0x0007f>
  at System.Drawing.Font..ctor (string,single,string) <0x00057>
  at (wrapper remoting-invoke-with-check) System.Drawing.Font..ctor (string,single,string) <0xffffffff>
  at System.Drawing.SystemFonts.get_DefaultFont () <0x0005b>
  at System.Windows.Forms.Theme.get_DefaultFont () <0x00027>
  at System.Windows.Forms.Control.get_DefaultFont () <0x0001f>
  at System.Windows.Forms.Control.get_Font () <0x00053>
  at System.Windows.Forms.Form..ctor () <0x00077>
  at VirtualRadar.WinForms.BaseForm..ctor () <0x00023>
  at VirtualRadar.WinForms.SplashView..ctor () <0x0001b>
  at (wrapper remoting-invoke-with-check) VirtualRadar.WinForms.SplashView..ctor () <0xffffffff>
  at VirtualRadar.Program.StartApplication (string[]) <0x00067>
  at VirtualRadar.Program.Main (string[]) <0x0034b>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono() [0xac3c8]
        mono() [0x2aad4]
        /lib/libc.so.6(__default_rt_sa_restorer_v2+0) [0xb6d69d50]
        /usr/lib/libgdiplus.so(GdipCreateFont+0x110) [0xb5cdbaec]

Debug info from gdb:


=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Hopefully this can be debugged, but have you considered a "server" only version of VRS, where the initiation of the VRS would not require any graphics? That is, a command line only feature that uses files for setup.

agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: VRS on opensuse on Arm

Post by agw » Thu Jun 26, 2014 12:30 am

I think that might be coming up because X windows isn't running.

The plan is to eventually add support for running VRS from the command-line without a GUI, but that isn't in there yet. However I have built a command-line version of VRS that just has the decoders and rebroadcast servers, I did it for a Raspberry Pi I installed around a friend's house. It's a bit rough'n'ready but if you want to have a go with it you're more than welcome. You can download it from here:

http://www.virtualradarserver.co.uk/Fil ... dRelay.zip

However, that one doesn't track aircraft or run a web server. It might be a bit too cut-down for what you're hoping to do :) I can flesh it out a bit over the weekend if you're looking for something a bit more complete.

When you do get it running you should be alright with running it offline - since 2.0.2 you can either wait for it to time out when loading Google Maps or you can force it to load without Google Maps by using the query string notOnline=1 (e.g. http://127.0.0.1/VirtualRadar/desktop.html?notOnline=1). Bear in mind that it doesn't matter if the server can't see the Internet, it's the client that loads Google Maps.

gariac
Posts: 31
Joined: Sun Jan 13, 2013 6:25 am

Re: VRS on opensuse on Arm

Post by gariac » Thu Jun 26, 2014 6:41 am

I do need the webserver part going, but the ability to not load google maps is OK. Basically where i plan to use it, I won't have internet service. Just the list of planes and the database would be good. If the program can be fooled by caching maps, that would work. I have noticed when I run VRS in areas without internet service, the planes are displayed on the last map in the cache.

What VRS needs is the "interested" flag that Kinetics uses. I'm sure somebody must have suggested this already, so there may be a technical reason why it hasn't been incorporated.

The Opensuse installation has X11 running, but I suspect it doesn't have a hook to make mono work with X11. But I can run yast in Qt just fine.

I also have Angstrom linux running, and will see if I can get VRS/mono to run on it. Angstrom doesn't have mono-complete, so I need to figure out the packages required. Dump1090 works fine on Angstrom.

There is a weird nuance that dump1090 won't compile on Opensuse on Arm. Not your problem of course. It works on Opensuse on Intel. But there is something I like about the phrase "Armed lizards."

manaesh
Posts: 25
Joined: Tue Jan 07, 2014 11:14 am

Re: VRS on opensuse on Arm

Post by manaesh » Thu Jun 26, 2014 8:40 am

agw wrote:I think that might be coming up because X windows isn't running.

The plan is to eventually add support for running VRS from the command-line without a GUI, but that isn't in there yet. However I have built a command-line version of VRS that just has the decoders and rebroadcast servers, I did it for a Raspberry Pi I installed around a friend's house. It's a bit rough'n'ready but if you want to have a go with it you're more than welcome. You can download it from here:

http://www.virtualradarserver.co.uk/Fil ... dRelay.zip

However, that one doesn't track aircraft or run a web server. It might be a bit too cut-down for what you're hoping to do :) I can flesh it out a bit over the weekend if you're looking for something a bit more complete.

When you do get it running you should be alright with running it offline - since 2.0.2 you can either wait for it to time out when loading Google Maps or you can force it to load without Google Maps by using the query string notOnline=1 (e.g. http://127.0.0.1/VirtualRadar/desktop.html?notOnline=1). Bear in mind that it doesn't matter if the server can't see the Internet, it's the client that loads Google Maps.
Hi Andrew

Do you have any documentation on how to get the relay running?

This looks like exactly what I am looking for with using remote Pi's. Can you use a compressed (to save the bandwidth) feed with this? I can then try out my ideas of some roaming remote feeders over 3G links...

I am hoping that the updated version of dump1090 comes with compressed feed - but there is no ETA on that as far as I am aware..

Cheers!

Mike

gariac
Posts: 31
Joined: Sun Jan 13, 2013 6:25 am

Re: VRS on opensuse on Arm

Post by gariac » Thu Jun 26, 2014 8:51 am

If you pick the "no google map" mode, you can't do the free form reports. That is a problem for my use.

agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: VRS on opensuse on Arm

Post by agw » Sat Jun 28, 2014 2:26 pm

gariac wrote:I do need the webserver part going
I'll take a look at adding the web server bits back in over the weekend.
gariac wrote:I have noticed when I run VRS in areas without internet service, the planes are displayed on the last map in the cache.
The maps aren't my responsibility, they're Google Maps'. If the site can't fetch the JavaScript for Google Maps from the Google mothership then it'll just show a blank map (as of 2.0.2).
gariac wrote:What VRS needs is the "interested" flag that Kinetics uses. I'm sure somebody must have suggested this already, so there may be a technical reason why it hasn't been incorporated.
VRS can display the interested flag but you can't set it through the site. This is because if you put the site onto the Internet then everyone would be able to set interested flags on anything they liked. In 2.0.3 I'm adding a better user's system (in that you can have more than one user for the web site), once that's in place then I can add stuff to the site that depends on being able to log in as a user with specific permissions.
gariac wrote:If you pick the "no google map" mode, you can't do the free form reports. That is a problem for my use.
I can't remember if I added support for no maps in the report pages - by the sounds of it I didn't :) I'll add it in for 2.0.3.

agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: VRS on opensuse on Arm

Post by agw » Sat Jun 28, 2014 2:41 pm

manaesh wrote:Hi Andrew

Do you have any documentation on how to get the relay running?

This looks like exactly what I am looking for with using remote Pi's. Can you use a compressed (to save the bandwidth) feed with this? I can then try out my ideas of some roaming remote feeders over 3G links...
You just need to unzip the RelayAndDecode zip somewhere and copy on a Configuration.xml from a running instance of VRS. Edit the XML file to set up the receivers and rebroadcast servers that you want to use on the Pi (you might want to do that with VRS rather than do it by hand, it'd be easier that way). Then from the command line do:

mono RelayAndDecode.exe -configFolder /whatever

where /whatever is the path to the folder containing the configuration file. If the configuration file is in the same folder as RelayAndDecode then -configFolder . should work.
manaesh wrote:Can you use a compressed (to save the bandwidth) feed with this?
Yes. However the CPU usage can be a problem, in that with a feed of ~100 aircraft DecodeAndRelay was running the processor at around 100% :) That was with it connected to a raw feed, you might find that using a cooked BaseStation feed instead will lower the CPU usage a bit.

If you're only interested in a passthrough rebroadcast server then using the -justRelay switch turns off the decoders, which also saves CPU. However in -justRelay mode you can't use compressed messages or merge feeds, all you can do is use passthrough rebroadcast servers. I imagine the situations where this is desirable are pretty limited.

manaesh
Posts: 25
Joined: Tue Jan 07, 2014 11:14 am

Re: VRS on opensuse on Arm

Post by manaesh » Sun Jun 29, 2014 7:09 am

Cheers Andrew!

Will have a play and see where i get!!

Thanks again

Mike

gariac
Posts: 31
Joined: Sun Jan 13, 2013 6:25 am

Re: VRS on opensuse on Arm

Post by gariac » Mon Jun 30, 2014 9:06 am

I thought it might prove beneficial to compile each dll in mono. I think this is a linux only thing. Basically
mono --aot=full whatever.dll

Now two of the dlls won't compile.
+++++++++++++++++++++++++++++++++++++
mono --aot=full VirtualRadar.Library.dll
Mono Ahead of Time compiler - compiling assembly /home/dongle/vrs/VirtualRadar.Library.dll
Could not load signature of VirtualRadar.Library.DotNetSpeechSynthesizerWrapper:<GetInstalledVoiceNames>b__0 due to: Could not load file or assembly or one of its dependencies.
Could not load signature of VirtualRadar.Library.DotNetSpeechSynthesizerWrapper:<GetInstalledVoiceNames>b__1 due to: Could not load file or assembly or one of its dependencies.
Could not load signature of VirtualRadar.Library.DotNetSpeechSynthesizerWrapper:<GetInstalledVoiceNames>b__0 due to: Could not load file or assembly or one of its dependencies.
Could not load signature of VirtualRadar.Library.DotNetSpeechSynthesizerWrapper:<GetInstalledVoiceNames>b__1 due to: Could not load file or assembly or one of its dependencies.
Missing method .ctor in assembly /home/dongle/vrs/VirtualRadar.Library.dll, type System.Speech.Synthesis.SpeechSynthesizer
Could not allocate -12 bytes
Stacktrace:


Native stacktrace:

mono() [0xac3c8]
/lib/libc.so.6(__default_rt_sa_restorer_v2+0) [0xb6dc7d50]
/lib/libc.so.6(gsignal+0x34) [0xb6dc6ae4]
/lib/libc.so.6(abort+0x19c) [0xb6dc7f28]
mono() [0x1e3838]
mono() [0x1e3874]
mono() [0x1e3688]
mono() [0xf0d98]
mono(mono_class_init+0x554) [0xef5f4]
mono() [0x17d568]
mono() [0x4baac]
mono() [0x277d4]
mono() [0x930d0]
mono() [0x94db8]
mono(mono_main+0x1380) [0x84738]
/lib/libc.so.6(__libc_start_main+0x114) [0xb6db12fc]

Debug info from gdb:


=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Aborted
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
mono --aot=full Microsoft.FlightSimulator.SimConnect.dll
Mono Ahead of Time compiler - compiling assembly /home/dongle/vrs/Microsoft.FlightSimulator.SimConnect.dll
* Assertion at aot-compiler.c:2339, condition `t->num_mods == 0' not met

Stacktrace:


Native stacktrace:

mono() [0xac3c8]
/lib/libc.so.6(__default_rt_sa_restorer_v2+0) [0xb6db8d50]
/lib/libc.so.6(gsignal+0x34) [0xb6db7ae4]
/lib/libc.so.6(abort+0x19c) [0xb6db8f28]
mono() [0x1e3838]
mono() [0x1e38ac]
mono() [0x8f06c]
mono() [0x8f164]
mono() [0x8dbb4]
mono() [0x95308]
mono(mono_main+0x1380) [0x84738]
/lib/libc.so.6(__libc_start_main+0x114) [0xb6da22fc]

Debug info from gdb:


=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: VRS on opensuse on Arm

Post by agw » Sat Jul 05, 2014 5:40 pm

Yes, those two won't compile aot. Or at least the first one certainly won't.

Regarding the error for VirtualRadar.Library - there are parts of the DLL that will only work under Windows, usually things that rely on a feature that Mono hasn't implemented. They don't cause a problem for Mono's jit compiler because that code is never run, but an aot compiler doesn't know that and it will try to compile it. It will fail because Mono is missing the implementation that the code relies upon.

Regarding Microsoft.FlightSimulator.SimConnect.dll - that's a .NET library that Microsoft ships, it comes with FSX. I distribute it so that I can be sure that VRS is connecting to the correct version of SimConnect. FSX support is switched off under Mono, it doesn't use that DLL. I probably don't need to ship it for Mono.

Doing an aot compilation won't make the program any quicker, all it will do is improve the load time. Once VRS has loaded and all of the common paths through the code have been jit compiled there won't be any difference in performance between the two.

Post Reply