Author Topic: Linux Error Question  (Read 5364 times)

KanHaz

  • Newbie
  • *
  • Posts: 19
    • View Profile
Linux Error Question
« on: June 05, 2015, 01:19:25 PM »
Hello,

Trying to get AHMI running on Ubuntu and I get this error message:

Unhandled Exception:
System.InvalidOperationException: WinForms_SeeInnerException ---> System.NullReferenceException: Object reference not set to an instance of an object
  at AdvancedHMIDrivers.EthernetIPforCLXCom.CreateDLLInstance () [0x00000] in <filename unknown>:0
  at AdvancedHMIDrivers.EthernetIPforCLXCom.set_IPAddress (System.String value) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) AdvancedHMIDrivers.EthernetIPforCLXCom:set_IPAddress (string)
  at MfgControl.AdvancedHMI.MainForm.InitializeComponent () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) MfgControl.AdvancedHMI.MainForm:InitializeComponent ()
  at MfgControl.AdvancedHMI.MainForm..ctor () [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.Create__Instance__[MainForm] (MfgControl.AdvancedHMI.MainForm Instance) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.get_MainForm () [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.OnCreateMainForm () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: WinForms_SeeInnerException ---> System.NullReferenceException: Object reference not set to an instance of an object
  at AdvancedHMIDrivers.EthernetIPforCLXCom.CreateDLLInstance () [0x00000] in <filename unknown>:0
  at AdvancedHMIDrivers.EthernetIPforCLXCom.set_IPAddress (System.String value) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) AdvancedHMIDrivers.EthernetIPforCLXCom:set_IPAddress (string)
  at MfgControl.AdvancedHMI.MainForm.InitializeComponent () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) MfgControl.AdvancedHMI.MainForm:InitializeComponent ()
  at MfgControl.AdvancedHMI.MainForm..ctor () [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.Create__Instance__[MainForm] (MfgControl.AdvancedHMI.MainForm Instance) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.get_MainForm () [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.OnCreateMainForm () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0

I tried to search for it so I can find out whats wrong but no luck yet. I might try Linux-Mint after the weekend to see if it works better than Ubuntu. Any help is greatly appreciated.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Linux Error Question
« Reply #1 on: June 05, 2015, 01:28:56 PM »
Are you using the latest version of 3.98m? I think version before 3.98j will give that error.

KanHaz

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Linux Error Question
« Reply #2 on: June 05, 2015, 01:33:20 PM »
Yes, I have the new version 3.98m. I took the /AdvancedHMI folder from the old version I was using and put it in the new version and compiled it. Could that be causing the problem? Also, I get a small box that pops up and says "Incomplete Solution".

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Linux Error Question
« Reply #3 on: June 05, 2015, 01:37:58 PM »
In the folder with the executable, does it have at least 9 files? If some of the files are missing, you will get the Incomplete Solution.

KanHaz

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Linux Error Question
« Reply #4 on: June 05, 2015, 01:59:26 PM »
I have 16 files in the folder (I just copied over the whole Debug folder) which includes the system.speech.dll file for the MessageDisplayByValue function.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Linux Error Question
« Reply #5 on: June 05, 2015, 02:14:05 PM »
I'll have to test it out again with the latest version. I haven't tested it on Linux since about Version 3.98j.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Linux Error Question
« Reply #6 on: June 05, 2015, 02:18:05 PM »
When you start the application, do you first cd to the directory with the exe, then do "mono AdvancedHMI.exe"? I'm not sure what it will do if you start without being in the directory with the exe file.

KanHaz

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Linux Error Question
« Reply #7 on: June 05, 2015, 02:34:29 PM »
I use "mono AdvancedHMI.exe" from the Debug directory. I wanted to make it as easy as possible to start then try my luck from there.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Linux Error Question
« Reply #8 on: June 05, 2015, 03:00:02 PM »
I'll try this out on a Raspberry Pi this weekend to see if I can figure out what the problem is.

KanHaz

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Linux Error Question
« Reply #9 on: June 05, 2015, 03:16:18 PM »
Thanks Archie. I'm testing this out on an ESC Liva but I want to try it on a Raspberry Pi 2. I've seen the other guides on how to do it with a Rasp Pi 2 so I'll use those but let me know if you have to do anything different than what is in the guides.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Linux Error Question
« Reply #10 on: June 05, 2015, 07:38:18 PM »
I just tried this on the Raspberry Pi 2 and it works on that. So it must be something to do with Ubuntu. I don't have a PC right now that I can load Ubuntu on to try it. Does Ubuntu have an image that can be booted and ran from a CD?

KanHaz

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Linux Error Question
« Reply #11 on: June 08, 2015, 08:52:33 AM »
You can download the .iso image of Ubuntu and use PendriveLinux to create a bootable flash drive but the drive will need to be 4+ gb.

http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/

You can also create a bootable CD by burning the image to a CD but I'm not sure if you can modify the system.

I will have to look at the Raspberry Pi 2 guide again and try that method. I'm not stuck on Ubuntu, any Linux OS will work for me. And I had hoped we could use the Raspberry Pi 2 because it's so cheap.
« Last Edit: June 08, 2015, 09:35:18 AM by KanHaz »

KanHaz

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Linux Error Question
« Reply #12 on: June 11, 2015, 08:35:00 AM »
Did some testing last night and found the error I'm getting is caused by my program, unless something was changed in version 3.98n from 3.98m. Downloaded v3.98n and complied without any changes. Put it on both my Ubuntu 14.04 and Raspberry Pi 2 Rasbian systems and the program worked on both.

This is the error code I got when I tried my fully built program (v3.98m) on both systems:
(mono:8177): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-can-change-accels after class was initialised

(mono:8177): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-popup-delay after class was initialised

(mono:8177): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-popdown-delay after class was initialised

Unhandled Exception:
System.InvalidOperationException: WinForms_SeeInnerException ---> System.Exception: Incomplete Solution
  at MfgControl.AdvancedHMI.Drivers.CIP..ctor () [0x00000] in <filename unknown>:0
  at AdvancedHMIDrivers.EthernetIPforPLCSLCMicroCom.CreateDLLInstance () [0x00000] in <filename unknown>:0
  at AdvancedHMIDrivers.EthernetIPforPLCSLCMicroCom.set_IPAddress (System.String value) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) AdvancedHMIDrivers.EthernetIPforPLCSLCMicroCom:set_IPAddress (string)
  at MfgControl.AdvancedHMI.MainForm.InitializeComponent () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) MfgControl.AdvancedHMI.MainForm:InitializeComponent ()
  at MfgControl.AdvancedHMI.MainForm..ctor () [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.Create__Instance__[MainForm] (MfgControl.AdvancedHMI.MainForm Instance) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.get_MainForm () [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.OnCreateMainForm () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: WinForms_SeeInnerException ---> System.Exception: Incomplete Solution
  at MfgControl.AdvancedHMI.Drivers.CIP..ctor () [0x00000] in <filename unknown>:0
  at AdvancedHMIDrivers.EthernetIPforPLCSLCMicroCom.CreateDLLInstance () [0x00000] in <filename unknown>:0
  at AdvancedHMIDrivers.EthernetIPforPLCSLCMicroCom.set_IPAddress (System.String value) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) AdvancedHMIDrivers.EthernetIPforPLCSLCMicroCom:set_IPAddress (string)
  at MfgControl.AdvancedHMI.MainForm.InitializeComponent () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) MfgControl.AdvancedHMI.MainForm:InitializeComponent ()
  at MfgControl.AdvancedHMI.MainForm..ctor () [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.Create__Instance__[MainForm] (MfgControl.AdvancedHMI.MainForm Instance) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.get_MainForm () [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.OnCreateMainForm () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0


The warnings at the top are only happening on the Raspbian RPi2.
I would like to find out what is causing the Incomplete Solution error. Is it something in my program or something I'm not doing to make the program complete?


Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Linux Error Question
« Reply #13 on: June 11, 2015, 08:42:25 AM »
I get those same warnings on my Pi, they don't seem to affect anything.

The only changes from 3.98m to 3.98n related to the ControlLogix driver was some debugging code removed that would cause a crash during a write.

The Incomplete Solution occurs if some files are missing. For instance, if you remove parts of the original solution. That would also occur if you run the same application on Windows.

KanHaz

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Linux Error Question
« Reply #14 on: June 11, 2015, 08:50:59 AM »
Are there any .dll files that I need besides the system.speech.dll?