Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

U3simple crashes with 64-bit build on Visual Studio 2012

u3 visual studio 2012 64bit

  • Please log in to reply
4 replies to this topic

#1 stevec

stevec
  • Members
  • 2 posts

Posted 25 July 2013 - 10:30 AM

I am using a U3HV in our products and recently updated our build environments to use 64bit drivers and Visual Studio 2012. Upon updating we started running into problems.  The OpenLabJack command works fine, but ePut causes the driver to crash (exception in LabJackUD.dll).  This same behavior happens in the U3simple example distributed in your code samples.  Building with win32 does not result in a crash.  Both win32 and x64 in Visual Studio 2008 also work fine.



#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 26 July 2013 - 03:14 PM

Would it be possible to send us one of the .exes that crash for you to [email protected]?  With a build of the .exe that is having this issue we should be able to track down the error.  It sounds likely something with array size allocation.  Does the PC it is crashing on have more than 4GB of ram?



#3 stevec

stevec
  • Members
  • 2 posts

Posted 29 July 2013 - 09:49 AM

I've got 16GB RAM.



#4 swtandy

swtandy
  • Members
  • 1 posts

Posted 28 April 2014 - 09:24 AM

Hi Folks - I have a new U3 and a C#/.net 4.5 64 bit application on Windows 8  where I'm trying to use the I2C functionality.  If I compile for 32 bit, things work, but if I compile for 64 bit i get the System.AccessViolationException when calling LJUD.GoOne(u3.ljhandle);.  I reference LJUDDotNet in my project, and can't find versions of this wrapper specific for 64 bit, so I assume that it is in charge of wrapping either the 32 bit or 64 bit LabjackUD dll.   I'm a bit stuck since I need a 64 bit application.   Any help would be apreciated.  Thanks Scott



#5 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 28 April 2014 - 04:32 PM

The current versions of the installers provide both a 64-bit and 32-bit version of the LabJackUD.dll.  You can find them in the C:\windows\system32 and C:\windows\SysWOW64 folders.  The LJUDDotNet.dll .NET assembly is a combined 32-bit/64-bit assembly, so it works for both and picks the correct version of the LabJackUD.dll at runtime.

 

An easy way to check and see if it is using the correct .dll would be to call LJUD.GetDriverVersion().  This will call that function from the LabJackUD.dll and return the driver version as a double.  If that function works without error (on both 32-bit and 64-bit versions) that means there is no issue with calling functions from the correct LabJackUD.dll version.

 

In this case the error is probably related to the specific GoOne() call, especially if you are using arrays.  If you send us your project, or one that can recreate the same issue, to [email protected] we can take a closer look.





Also tagged with one or more of these keywords: u3, visual studio 2012, 64bit

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users