Re: Getting an error while running C# application

[email protected]
Newsgroups gmane.comp.java.ikvm.devel
Message-ID <[email protected]>
Hi Jeroen,

Thanks for your response, any suggestion to overcome this issue.

best regards,
Amr


On 2014-07-04 02:11, Jeroen Frijters wrote:
> Hi,
> 
> I'm not sure what's going on here, but it unlikely that it is an IKVM
> issue (although it could be a JNI bug).
> 
> Regards,
> Jeroen
> 
>> -----Original Message-----
>> From: [email protected] [mailto:[email protected]]
>> Sent: Friday, July 4, 2014 1:02
>> To: [email protected]
>> Subject: [Ikvm-developers] Getting an error while running C# 
>> application
>> 
>> Hi,
>> I am trying to use convert three jar files as follow in Linux:
>> - sudo ikvmc -sharedclassloader pi4j-core.jar pi4j-device.jar
>> pi4j-gpio-extension.jar
>> - the convert was successful with no error and create pi4j-core.dll.
>> - I use the new dll in C# application as follow:
>> 
>> using com.pi4j.io.gpio;
>> using com.pi4j.wiringpi;
>> //using IKVM.Reflection;
>> using java.lang;
>> using System.Reflection;
>> namespace SPI_PI
>> {
>> class Program
>> {
>> static void Main(string[] args)
>> {
>> ikvm.runtime.Startup.addBootClassPathAssemby(Assembly.Load("pi4j-
>> core"));
>> GpioController gpio = GpioFactory.getInstance();
>> GpioPinDigitalOutput pin =
>> gpio.provisionDigitalOutputPin(RaspiPin.GPIO_08, "MyLED",
>> PinState.HIGH);
>> pin.low();
>> Thread.sleep(5000);
>> pin.toggle();
>> Thread.sleep(5000);
>> }
>> }
>> }
>> 
>> 
>> -then I try compile the application using the command sudo mcs 
>> SPI_PI.cs
>> -r:pi4j-core.dll and no error.
>> -I copy the pi4j-core.dll to /usr/lib/ikvm/ as well as the same
>> directory of the exe application.
>> -then I run the application using sudo mono SPI_PI.exe and I get the
>> following error:
>> 
>> Unhandled Exception:
>> System.ExecutionEngineException: SIGILL
>> at java.util.concurrent.ConcurrentHashMap..ctor (Int32 
>> initialCapacity,
>> Single loadFactor, Int32 concurrencyLevel) [0x00000] in :0
>> at java.util.concurrent.ConcurrentHashMap..ctor () [0x00000] in :0
>> at com.pi4j.io.gpio.GpioProviderBase..ctor () [0x00000] in :0
>> at com.pi4j.io.gpio.RaspiGpioProvider..ctor () [0x00000] in :0
>> at com.pi4j.io.gpio.GpioFactory.getDefaultProvider () [0x00000] in :0
>> at com.pi4j.io.gpio.impl.GpioControllerImpl..ctor () [0x00000] in :0
>> at com.pi4j.io.gpio.GpioFactory.getInstance () [0x00000] in :0
>> at SPI_PI.Program.Main (System.String[] args) [0x00000] in :0
>> [ERROR] FATAL UNHANDLED EXCEPTION: System.ExecutionEngineException:
>> SIGILL
>> at java.util.concurrent.ConcurrentHashMap..ctor (Int32 
>> initialCapacity,
>> Single loadFactor, Int32 concurrencyLevel) [0x00000] in :0
>> at java.util.concurrent.ConcurrentHashMap..ctor () [0x00000] in :0
>> at com.pi4j.io.gpio.GpioProviderBase..ctor () [0x00000] in :0
>> at com.pi4j.io.gpio.RaspiGpioProvider..ctor () [0x00000] in :0
>> at com.pi4j.io.gpio.GpioFactory.getDefaultProvider () [0x00000] in :0
>> at com.pi4j.io.gpio.impl.GpioControllerImpl..ctor () [0x00000] in :0
>> at com.pi4j.io.gpio.GpioFactory.getInstance () [0x00000] in :0
>> at SPI_PI.Program.Main (System.String[] args) [0x00000] in :0
>> 
>> any suggestion.
>> thanks,
>> Amr
>> 
>> ------------------------------------------------------------------------
>> ------
>> Open source business process management suite built on Java and 
>> Eclipse
>> Turn processes into business applications with Bonita BPM Community
>> Edition
>> Quickly connect people, data, and systems into organized workflows
>> Winner of BOSSIE, CODIE, OW2 and Gartner awards
>> http://p.sf.net/sfu/Bonitasoft
>> _______________________________________________
>> Ikvm-developers mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/ikvm-developers

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.