RobotStudio event

PC SDK 5.13 problem with VS2005 under Win 7 x64

Hi,

I have developed a PC application with PC SDK 5.13 in C# with Visual Studio 2005 under Windows 7 32bit and i haven't problem with it about build, compile and run... It's all perfect also deploy application for same operative system. But under Win7 x64 the same project throw a strange exception when i run it:

 

image

 

The Error code "0001" and the layout of MessageBox is mine and is not important, but the message shows explain catch when i call  the method that load ad istance all object of my app. (and is strange because throw only when call it and not when i'm into the method block while debugging it, for exampre if there are null reference or other logic error, ecc.).

I also loaded the ABB.Robotics.Adapters.IRC5.dll and i add his path (C:Program Files (x86)ABB Industrial ITRobotics ITSDKPC SDK 5.13..) into Refernce Path in the project Properties but continue to show this error and not run my method.

 

Example codes:

 

import....

import....

...

...

name space MyApp

{

public partial class MyForm : Form

{

public MyForm()

{

try
{


InitializeComponent(); //work good in debug
....

.... // no erros catch

 

MyMethod(); // strange!! catch Exception here and not when i enter in MyMethod, never enter into this method...

}

catch(Exception ex) { MessageBox.Show(ex.Message, "Error 0001:", MessageBoxButtons.OK, MessageBoxIcon.Error); }
}

 

void MyMethod()

{

try

{

....

//create my and ABB object...

....
}

catch(Exception ex) { MessageBox.Show(ex.Message, "Error 0002:", MessageBoxButtons.OK, MessageBoxIcon.Error); }
}
}
}

 

some Ideas??? I repeat IDE is always Visual Studio 2005, under Win XP and Win7 32bit all working good whitout strange things, under Win7 64bit, same codes, same project, there aren't compile errors but catch this error in execution/debug.

 

tanks Ema

 

Comments

  • Maybe can be help some other information, paste OUTPUT message:
     

    'FlexRemote.exe' (Managed): Loaded 'C:windowsassemblyGAC_64mscorlib2.0.0.0__b77a5c561934e089mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

     

    'FlexRemote.exe' (Managed): Loaded 'C:UsersecapitanioDesktopFlexRemote2.0_betaPCGUIinReleaseFlexRemote.exe', Symbols loaded.

    'FlexRemote.exe' (Managed): Loaded 'C:windowsassemblyGAC_MSILSystem.Windows.Forms2.0.0.0__b77a5c561934e089System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

    'FlexRemote.exe' (Managed): Loaded 'C:windowsassemblyGAC_MSILSystem2.0.0.0__b77a5c561934e089System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

    'FlexRemote.exe' (Managed): Loaded 'C:windowsassemblyGAC_MSILSystem.Drawing2.0.0.0__b03f5f7f11d50a3aSystem.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

    'FlexRemote.exe' (Managed): Loaded 'C:windowsassemblyGAC_MSILSystem.Xml2.0.0.0__b77a5c561934e089System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

    'FlexRemote.exe' (Managed): Loaded 'C:windowsassemblyGAC_MSILmscorlib.resources2.0.0.0_it_b77a5c561934e089mscorlib.resources.dll', No symbols loaded.

    'FlexRemote.exe' (Managed): Loaded 'C:windowsassemblyGAC_MSILABB.Robotics.Controllers5.13.1034.0__1da709b7d1f14b7bABB.Robotics.Controllers.dll', No symbols loaded.

    'FlexRemote.exe' (Managed): Loaded 'C:windowsassemblyGAC_MSILABB.Robotics5.13.1034.0__1da709b7d1f14b7bABB.Robotics.dll', No symbols loaded.

    A first chance exception of type 'System.BadImageFormatException' occurred in FlexRemote.exe

    'FlexRemote.exe' (Managed): Loaded 'C:windowsassemblyGAC_MSILSystem.Configuration2.0.0.0__b03f5f7f11d50a3aSystem.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

     


    And this is the LOCALS screen shot:

     

     


    image
  • The first time a method is called, the code is compiled at runtime (just-in-time from MSIL). It seems that this first compilation is the one that tries to load the class and fails to load one of the assemblies needed by classes used inside your method.
     

    BR/Carlos
    Carlos Martinez
    ABB
  • Tnx Carlos for your answer,
    Ok, it's true what you wrote, and i think that assembly that needed it's really the assembly referred in my message error "ABB.Robotics.Adapters.IRC5.dll". But i have just added this dll in my project, setted it to copy to local when build the project, and i added his path (C:Program Files...) in project properties reference path, but always don't work and i have the same message error.
    Some idea for resolve about this dependence???
    (Yes, i have just installed completely Robostudio Online 5.13 and his RoboWare and whole SDK in my local drive, and my users is a administrator account on my workstation).

    bye Ema

  • This is a easy example of code that explain my problem under Win7 x64.


    bye Ema Ouch




  • Hi ECapitano,
     

    the Visual Studio project setting Build/General/Platform Target, shall be set to "x86" explicitly, and not "Any CPU" which I think is the default in Visual Studio 2005.

     

    Please try to change that and see if the application runs on the 64-bit machine.

    Best Regards, Niklas Skoglund
    ABB Robotics

    Developer Center
    RobotStudio Blog
  • ok, tank you very much, resolved!!! Thumbs Up

    this topic can be closed!!

    bye Ema