Why is there exception runtime
zijiang
✭
System.TypeInitializationException was unhandled
Message="The type initializer for 'ABB.Robotics.Controllers.Internal.NetworkScanner' threw an exception."
Source="ABB.Robotics.Controllers"
TypeName="ABB.Robotics.Controllers.Internal.NetworkScanner"
StackTrace:
at ABB.Robotics.Controllers.Internal.NetworkScanner.get_Instance()
at ABB.Robotics.Controllers.Discovery.NetworkScanner..ctor()
at ControllerAPI.Create.DynamicCreation() in C:abbpc interfaceControllerAPIControllerAPICreateControllerCreate.cs:line 64
at ControllerAPI.Create.Main(String[] args) in C:abbpc interfaceControllerAPIControllerAPICreateControllerCreate.cs:line 55
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.BadImageFormatException
Message="Could not load file or assembly 'ABB.Robotics.Adapters.IRC5, Version=5.14.3070.3, Culture=neutral, PublicKeyToken=1da709b7d1f14b7b' or one of its dependencies. An attempt was made to load a program with an incorrect format."
Source="ABB.Robotics.Controllers"
FileName="ABB.Robotics.Adapters.IRC5, Version=5.14.3070.3, Culture=neutral, PublicKeyToken=1da709b7d1f14b7b"
FusionLog="=== Pre-bind state information ===
LOG: User = ASIAPACIFIC\CNZIQI
LOG: DisplayName = ABB.Robotics.Adapters.IRC5, Version=5.14.3070.3, Culture=neutral, PublicKeyToken=1da709b7d1f14b7b
(Fully-specified)
LOG: Appbase = file:///C:/abb/pc interface/ControllerAPI/ControllerAPI/CreateController/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : ABB.Robotics.Controllers, Version=5.14.3070.0, Culture=neutral, PublicKeyToken=1da709b7d1f14b7b.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Post-policy reference: ABB.Robotics.Adapters.IRC5, Version=5.14.3070.3, Culture=neutral, PublicKeyToken=1da709b7d1f14b7b
LOG: Attempting download of new URL file:///C:/abb/pc interface/ControllerAPI/ControllerAPI/CreateController/bin/Debug/ABB.Robotics.Adapters.IRC5.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
"
StackTrace:
at ABB.Robotics.Controllers.Internal.NetworkScanner..ctor()
at ABB.Robotics.Controllers.Internal.NetworkScanner..cctor()
InnerException:
Message="The type initializer for 'ABB.Robotics.Controllers.Internal.NetworkScanner' threw an exception."
Source="ABB.Robotics.Controllers"
TypeName="ABB.Robotics.Controllers.Internal.NetworkScanner"
StackTrace:
at ABB.Robotics.Controllers.Internal.NetworkScanner.get_Instance()
at ABB.Robotics.Controllers.Discovery.NetworkScanner..ctor()
at ControllerAPI.Create.DynamicCreation() in C:abbpc interfaceControllerAPIControllerAPICreateControllerCreate.cs:line 64
at ControllerAPI.Create.Main(String[] args) in C:abbpc interfaceControllerAPIControllerAPICreateControllerCreate.cs:line 55
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.BadImageFormatException
Message="Could not load file or assembly 'ABB.Robotics.Adapters.IRC5, Version=5.14.3070.3, Culture=neutral, PublicKeyToken=1da709b7d1f14b7b' or one of its dependencies. An attempt was made to load a program with an incorrect format."
Source="ABB.Robotics.Controllers"
FileName="ABB.Robotics.Adapters.IRC5, Version=5.14.3070.3, Culture=neutral, PublicKeyToken=1da709b7d1f14b7b"
FusionLog="=== Pre-bind state information ===
LOG: User = ASIAPACIFIC\CNZIQI
LOG: DisplayName = ABB.Robotics.Adapters.IRC5, Version=5.14.3070.3, Culture=neutral, PublicKeyToken=1da709b7d1f14b7b
(Fully-specified)
LOG: Appbase = file:///C:/abb/pc interface/ControllerAPI/ControllerAPI/CreateController/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : ABB.Robotics.Controllers, Version=5.14.3070.0, Culture=neutral, PublicKeyToken=1da709b7d1f14b7b.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Post-policy reference: ABB.Robotics.Adapters.IRC5, Version=5.14.3070.3, Culture=neutral, PublicKeyToken=1da709b7d1f14b7b
LOG: Attempting download of new URL file:///C:/abb/pc interface/ControllerAPI/ControllerAPI/CreateController/bin/Debug/ABB.Robotics.Adapters.IRC5.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
"
StackTrace:
at ABB.Robotics.Controllers.Internal.NetworkScanner..ctor()
at ABB.Robotics.Controllers.Internal.NetworkScanner..cctor()
InnerException:
0
Comments
-
We really need more info than just the stack.Is this PCSDK? If not then which SDK are you using?What command is executing when you get this error?Is this during developement or a deployed application?etc. The more surrounding info the more we will be able to help you.Now, just by going on the error message "Could not load file or assembly 'ABB.Robotics.Adapters.IRC5, Version=5.14.3070.3" I'd ask you to check out which version of RobotWare the controller has, and which version do you have installed with the APP.John
Developer Center0 -
0
-
Robotware version :RW5.14_03.01.3071
0 -
I have the very same problem, using the 5.13 version of the dlls. The funny thing is that it works on my Win7 32bit machine, but fails on the WinXP machine. I'm very thrilled to find a solution to this problem.EDIT: Oh dear. I had only installed the SDK. Installing the whole RobotStudio fixed the issue for me!CaptainAwesome2012-09-21 13:16:530 -
Make sure that you are building a 32-bit executable, by specifying x86 as the platform target in the VS project settings.If AnyCPU is specified, and you execute the application on a 64bit OS, a 64bit process will get started. Parts of PC SDK are implemented in COM (native code) which is not built for 64bit. The inner exception of the exception in your stack trace is a bad image format exception caused by the fact that a 32 bit assembly is attempted to get loaded into a 64 bit process.On a 32 bit OS there are only 32 bit processes and this mismatch can not happen.Please note that a 64 bit OS can run a 32 bit process, but not the opposite. That is why all your good old applications that you had on your 32 bit machine continues to function when you double your bits and go 64 ?0
-
Niklas Skoglund said:Make sure that you are building a 32-bit executable, by specifying x86 as the platform target in the VS project settings.If AnyCPU is specified, and you execute the application on a 64bit OS, a 64bit process will get started. Parts of PC SDK are implemented in COM (native code) which is not built for 64bit. The inner exception of the exception in your stack trace is a bad image format exception caused by the fact that a 32 bit assembly is attempted to get loaded into a 64 bit process.On a 32 bit OS there are only 32 bit processes and this mismatch can not happen.Please note that a 64 bit OS can run a 32 bit process, but not the opposite. That is why all your good old applications that you had on your 32 bit machine continues to function when you double your bits and go 64 ?0
-
i have the same problem .i solved it by two steps:firstly,robotstudio must be installed.secondly,you must specify x86 as the platform target in the VS project settings.0
-
Niklas Skoglund said:Make sure that you are building a 32-bit executable, by specifying x86 as the platform target in the VS project settings.If AnyCPU is specified, and you execute the application on a 64bit OS, a 64bit process will get started. Parts of PC SDK are implemented in COM (native code) which is not built for 64bit. The inner exception of the exception in your stack trace is a bad image format exception caused by the fact that a 32 bit assembly is attempted to get loaded into a 64 bit process.On a 32 bit OS there are only 32 bit processes and this mismatch can not happen.Please note that a 64 bit OS can run a 32 bit process, but not the opposite. That is why all your good old applications that you had on your 32 bit machine continues to function when you double your bits and go 64 ?
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings