VB.net/mono problem, I can not run it

General PhidgetSBC Discussion.
Post Reply
gabrielgc75
Phidgetsian
Posts: 5
Joined: Mon Sep 13, 2010 11:49 am
Contact:

VB.net/mono problem, I can not run it

Post by gabrielgc75 »

Hi guys, I have been working with the sbc3 since some time ago (I have 4 boards), I am using it as a remote system with vb.net, no problems.

But since 2 weeks ago I want to make my own programs inside of the sbc3 using mono and I can not make it to work. I am new with mono. I have been reading documents ...

I am using windows 7 x64, mono developer with vb.net language.

I upgraded all the packages.
first I followed the guide about installing mono using the putty SSH software:
apt-get install wget
apt-get install unzip
apt-get install mono-runtime
apt-get install mono-vbnc

when run the mono --version command I get:
root@phidgetsbc:/usr/userapps/Test1# mono --version
Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-8+deb7u1)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. http://www.mono-project.com
TLS: __thread
SIGSEGV: normal
Notifications: epoll
Architecture: armel,soft-float
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)
root@phidgetsbc:/usr/userapps/Test1#

Using monodeveloper I create a basic console program, "just hello world":
Public Class Application
Public Shared Sub Main()
System.Console.WriteLine("Hello world!")
End Sub
End Class

the result was the Test1.exe file

When I run it using mono in windows it works good:
mono.exe test1.exe
Hello world!


in the sbc3 I use the web to load the project:
Filesystem Browser: /usr/userapps/Test1
Root
Parent Directory Parent Directory
File Test1.exe 8192 Bytes Edit Delete

and using the putty software I am trying to test it but nothing happens:

root@phidgetsbc:/usr/userapps/Test1# mono Test1.exe
Native stacktrace:


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.
=================================================================

Aborted
root@phidgetsbc:/usr/userapps/Test1#


What I am doing wrong? Which step did I forget?
If I type mono abc.exe(this file does not exist) I get the same error.

Thank you for your support.
Attachments
Test1.zip
attached is the hello world file compiled with monodeveloper
(3.08 KiB) Downloaded 805 times
gabrielgc75
Phidgetsian
Posts: 5
Joined: Mon Sep 13, 2010 11:49 am
Contact:

Re: VB.net/mono problem, I can not run it

Post by gabrielgc75 »

I made another test in order to check if the problem was my exe file.
I found this example:

cat <<-END > HelloWorld.cs
using System;
public class HelloWorld
{
static public void Main()
{
Console.WriteLine("Hello World");
}
}
END


then I tried to compile it using the SSH putty software:

gmcs HelloWorld.cs && mono HelloWorld.exe

and I receive exactly the same error, so it seems something wrong with the mono installation.

root@phidgetsbc:/usr/userapps/Test# gmcs HelloWorld.cs

Native stacktrace:


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.
=================================================================

Aborted
root@phidgetsbc:/usr/userapps/Test#

User avatar
burley
Human-Cyborg Relations
Posts: 26
Joined: Tue Sep 27, 2011 2:37 pm
Location: Calgary
Contact:

Re: VB.net/mono problem, I can not run it

Post by burley »

Last time I checked (a while ago now, I admit) mono was broken for VB.net, it was only functional for C#.
Brian Burley
403-282-7335 ext. 6003
support@phidgets.com
gabrielgc75
Phidgetsian
Posts: 5
Joined: Mon Sep 13, 2010 11:49 am
Contact:

Re: VB.net/mono problem, I can not run it

Post by gabrielgc75 »

In my last post I wrote also that I test a C# example and it is not working either.
I tested it 2 sbc3 board that I bought a month ago

Board Name PhidgetSBC3
Board Revision 301
Webif Version 2.0.6
Firmware Version PhidgetSBC3 - Version 1.0.1 - Built Thu Jan 8 16:10:58 MST 2015
Kernel Version Linux version 3.14.27 (patrick@debian) (gcc version 4.4.5 (Debian 4.4.5-8) ) #12 Thu Jan 8 15:16:14 MST 2015
Distribution Debian GNU/Linux 7
Phidget Library Phidget21 - Version 2.1.8 - Built Oct 9 2015 10:57:45
Current Date/Time Wed Dec 2 08:46:44 CST 2015
MAC Address 00:1b:0b:10:1c:68

I found this example:

cat <<-END > HelloWorld.cs
using System;
public class HelloWorld
{
static public void Main()
{
Console.WriteLine("Hello World");
}
}
END


then I tried to compile it using the SSH putty software:

gmcs HelloWorld.cs && mono HelloWorld.exe

and I receive exactly the same error, so it seems something wrong with the mono installation.

root@phidgetsbc:/usr/userapps/Test# gmcs HelloWorld.cs

Native stacktrace:


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.
=================================================================

Aborted
root@phidgetsbc:/usr/userapps/Test#
Bob-666
Phidgetsian
Posts: 6
Joined: Fri Nov 06, 2015 4:38 am
Contact:

Re: VB.net/mono problem, I can not run it

Post by Bob-666 »

Have you tried copying your VB.Net source code to the SBC3 and compiling it on there by eg
vbnc stuff.vb -r:Phidget21.NET.dll
which creates stuff.exe
then run it:
mono stuff.exe
You only need the dll ref if calling phidget methods, of course.
gabrielgc75
Phidgetsian
Posts: 5
Joined: Mon Sep 13, 2010 11:49 am
Contact:

Re: VB.net/mono problem, I can not run it

Post by gabrielgc75 »

After 2 weeks finally I make mono work.
The problem is that the phidgets installation guide is obsolete and it is wrong for this sbc3 and firmware. Following it just fail the installation. The problem was mono no correctly installed. I am new using linux, but searching at the mono-project site I can use it now.

By the way, for the support guys that say VB.net will not run, that is not true. Now I compile my vb.net projects and they are running in the sbc3.

now I will search how to make a program start automatically with mono runtime.

Thank you for your time!!
Bob-666
Phidgetsian
Posts: 6
Joined: Fri Nov 06, 2015 4:38 am
Contact:

Re: VB.net/mono problem, I can not run it

Post by Bob-666 »

To run a VB.Net program at bootup you need to:
apt-get install mono-4.0-service
and create a file something like this one (astro):
#! /bin/sh
### BEGIN INIT INFO
# Provides: astro
# Required-Start: $sshd $network $remote_fs
# Required-Stop: $sshd $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Astro Controller
# Description: Debian init script for the Astro controller
# J-test launcher
### END INIT INFO
#
# Author: Bob 2015
#

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/bin/mono-service
PIDFILE=/var/run/astro.pid
STUFF=/home/phidgets/J-test.exe

test -x $DAEMON || exit 0

. /lib/lsb/init-functions

case "$1" in
start)
log_daemon_msg "Starting Astro Controller" "astro"
start_daemon -p $PIDFILE $DAEMON $STUFF
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping Astro Controller" "astro"
killproc -p $PIDFILE $DAEMON
log_end_msg $?
;;
force-reload|restart)
$0 stop
$0 start
;;
status)
status_of_proc -p $PIDFILE $DAEMON astro && exit 0 || exit $?
;;
*)
echo "Usage: /etc/init.d/astro {start|stop|restart|force-reload|status}"
exit 1
;;
esac

exit 0

put it in /etc/init.d and add to the boot list of services by:
insserv -v -d astro
You will need to chmod 755 J-test.exe or your equivalent and chmod 666 any log file it uses.
No console output or keyboard input permitted for a boot service.
I hope this is found usefull - it took quite a while to figure out.
gabrielgc75
Phidgetsian
Posts: 5
Joined: Mon Sep 13, 2010 11:49 am
Contact:

Re: VB.net/mono problem, I can not run it

Post by gabrielgc75 »

Thank you for your help, I will try it.
vitterrimo
Fresh meat
Posts: 2
Joined: Wed Jul 30, 2014 6:01 am
Contact:

Re: VB.net/mono problem, I can not run it

Post by vitterrimo »

gabrielgc75 wrote:After 2 weeks finally I make mono work.
The problem is that the phidgets installation guide is obsolete and it is wrong for this sbc3 and firmware. Following it just fail the installation. The problem was mono no correctly installed. I am new using linux, but searching at the mono-project site I can use it now.

By the way, for the support guys that say VB.net will not run, that is not true. Now I compile my vb.net projects and they are running in the sbc3.

now I will search how to make a program start automatically with mono runtime.

Thank you for your time!!
Hi, i have a sbc3 with last update firmware e kernel.
Can you write me the correct procedure for Install mono on SBC3 ?
vitterrimo
Fresh meat
Posts: 2
Joined: Wed Jul 30, 2014 6:01 am
Contact:

Re: VB.net/mono problem, I can not run it

Post by vitterrimo »

vitterrimo wrote:
gabrielgc75 wrote:After 2 weeks finally I make mono work.
The problem is that the phidgets installation guide is obsolete and it is wrong for this sbc3 and firmware. Following it just fail the installation. The problem was mono no correctly installed. I am new using linux, but searching at the mono-project site I can use it now.

By the way, for the support guys that say VB.net will not run, that is not true. Now I compile my vb.net projects and they are running in the sbc3.

now I will search how to make a program start automatically with mono runtime.

Thank you for your time!!
Hi, i have a sbc3 with last update firmware e kernel.
Can you write me the correct procedure for Install mono on SBC3 ?

i have a new board with

System information
Board Name PhidgetSBC3
Board Revision 301
Webif Version 2.0.6
Firmware Version PhidgetSBC3 - Version 1.0.2 - Built Mon Apr 25 10:00:20 MDT 2016
Kernel Version Linux version 3.14.27 (patrick@debian) (gcc version 4.9.2 ( 4.9.2-10) ) #5 Fri Apr 22 14:33:27 MDT 2016
Distribution Debian GNU/Linux 7
Phidget Library Phidget21 - Version 2.1.8 - Built Dec 17 2015 09:38:36
Current Date/Time Mon Apr 24 09:23:36 UTC 2017
MAC Address 00:1b:0b:10:24:e7

but i have same problem to install mono...

please can give me te correct proceure to install mono-complete?

thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests