2 Replies Latest reply: Jan 2, 2013 5:01 AM by gimbal2 RSS

    UnsatisfiedLinkError:Invalid access to memory location - Please advise

    Marcello
      In my project I use 2 dll's. Most of the time they are loaded successfully, however sometimes only one is getting loaded and for the other I get an Exception.

      UnsatisfiedLinkError:Invalid access to memory location

      Sometimes a Restart of windows solves the problem and sometimes I need to Update windows7 and then I works again. This is really strange, I have posted this issue earlier here:
      DLL: invalid access to memory location (after win7 has installed updates)

      In google I see that others do have the same issue but nobody have figured out yet where this problem comes from. I spent days on this searching in google but you only find workarounds and hacks to get rid of this problem.

      To my opinion this is a windows7 issue, because on my XP computer I never had this problem and in google nobody ever reported this error on MAC or Linux

      Is anyone familliar with this ? How can I debug the DLL loading process ?

      Please help, thanks
        • 1. Re: UnsatisfiedLinkError:Invalid access to memory location - Please advise
          gimbal2
          Marcello wrote:
          Sometimes a Restart of windows solves the problem and sometimes I need to Update windows7 and then I works again. This is really strange
          Indeed strange, but what it tells me is that it is likely not in any way related to Java, this is caused by an outside influence. The link you provide also hints in that direction. DLL loading problems I have had in the past were caused by a virus scanner / malware scanner for example. They tend to hook a little too deeply into the system.
          To my opinion this is a windows7 issue, because on my XP computer I never had this problem and in google nobody ever reported this error on MAC or Linux
          Too easy. The only thing you know is that on one computer you don't get the problem and on another you do. You have no proof that it is related to the OS, there is only a possibility. There are many more differences between those two systems, including what software, services and drivers are installed.
          • 2. Re: UnsatisfiedLinkError:Invalid access to memory location - Please advise
            Marcello
            Indeed strange, but what it tells me is that it is likely not in any way related to Java, this is caused by an outside influence

            To proof this I would need to debug the step: System.loadLibrary("myDll"), however I do not know to to retrieve more information from this step.
            Is there a way in Java and/or in the DLL itself ?

            By the way reducing the Stack used in my dll sometinmes helps as well. But these are all workarounds and I need to find out why this happens