0
Under review

Error opening game4automation project in a different PC

looi 4 years ago in realvirtual.io Starter and Professional updated by Support 4 years ago 5

I've started a project with the game4automation asset. I have a robot connected with the roboDK interface. When I try to open the project with another PC, It appears this error:

ArgumentNullException: Value cannot be null.
Parameter name: String
System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) (at <9577ac7a62ef43179789031239ba8798>:0)
System.Number.ParseInt32 (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) (at <9577ac7a62ef43179789031239ba8798>:0)
System.Int32.Parse (System.String s) (at <9577ac7a62ef43179789031239ba8798>:0)
game4automation.PLCOutputInt.SetValue (System.String value) (at [old PC Path]/PLCOutputInt.cs:58)
game4automation.RoboDKInterface.UpdateSignals () (at [old PC Path]/RoboDK/RoboDKInterface.cs:320)
game4automation.RoboDKInterface.CommunicationThreadUpdate () (at [old PC Path]/RoboDK/RoboDKInterface.cs:537)
game4automation.InterfaceThreadedBaseClass.CommunicationThread () (at [old PC Path]/InterfaceThreadedBaseClass.cs:50)
System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at <9577ac7a62ef43179789031239ba8798>:0)
System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <9577ac7a62ef43179789031239ba8798>:0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <9577ac7a62ef43179789031239ba8798>:0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at <9577ac7a62ef43179789031239ba8798>:0)
System.Threading.ThreadHelper.ThreadStart () (at <9577ac7a62ef43179789031239ba8798>:0)
UnityEngine.<>c:b__0_0(Object, UnhandledExceptionEventArgs)

It seems like some paths from the old PC are still remembered by the asset. I have changed the RoboDK Application path and the RoboDK file path, but the error stays. Reinstalling the asset just works, but it is uncomfortable to do it every time I switch to another PC.

Answer

Answer

If you changed the RoboDK pathes I don't know why it not opens. The code is always just using this path. Is your path somehow uncommon with special characters or empty spaces?

You might need to set some breakpoints in RoboDKInterface.cs and check what is going wrong. If you don't find the issue we should do a Zoom Session and I will check on your computer.

Under review

Hmmm... does it directly happens when you open the project on the new PC or only if you start the simulation?

When I open the project, it appears only a message in the console containing the old PC path (it is white, not a red error) saying: 

No Spacenavigator installed
UnityEngine.Debug:Log(Object)
SpaceNavigatorDriver.SpaceNavigatorWindows:.ctor() (at [old path...]/Assets/game4automation/private/RuntimeUI/SpaceNavigator/Plugins/SpaceNavigatorWindows.cs:58)
SpaceNavigatorDriver.SpaceNavigatorWindows:get_SubInstance() (at [old path...]/Assets/game4automation/private/RuntimeUI/SpaceNavigator/Plugins/SpaceNavigatorWindows.cs:63)
SpaceNavigatorDriver.SpaceNavigator:get_Instance() (at [old path...]/Assets/game4automation/private/RuntimeUI/SpaceNavigator/Plugins/SpaceNavigator.cs:37)
SpaceNavigatorDriver.SpaceNavigator:get_Translation() (at [old path...]/Assets/game4automation/private/RuntimeUI/SpaceNavigator/Plugins/SpaceNavigator.cs:13)
SpaceNavigatorDriver.ViewportController:Update() (at [old path...]/Assets/game4automation/private/RuntimeUI/SpaceNavigator/Editor/ViewportController.cs:72)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

So when you open the project on the new PC you get these white messages. This is not an error and we can ignore it.

When does the log with the Old PC Path comes up. When you start the RobotDK example project on the new PC. Normally this could not happen because on your new PC the Unity Log should not show log messages with the Old PC pathes. It does not seems to be a RoboDK specific issue. 

How did you transferred the project to the new PC?  Did you copied the full project folder. If yes usually you should delete Unitys Library Folder before opening on the new PC.

Yes, I copied the entire project folder. Now I've tried to open it again after deleting the Library folder but te problem remains. In the new computer, the "Open RoboDK File" button  (in the RoboDK Interface script) doesn't work, althought I have updated the robodk .exe and .rdk paths. 

Answer

If you changed the RoboDK pathes I don't know why it not opens. The code is always just using this path. Is your path somehow uncommon with special characters or empty spaces?

You might need to set some breakpoints in RoboDKInterface.cs and check what is going wrong. If you don't find the issue we should do a Zoom Session and I will check on your computer.