in reply to Invalid Access to Memory location using DynaLoader

If it's Strawberry Perl, you should be able to compile the XS code since Strawberry distribution comes with gcc. Was that how this module was installed - with a local compile, or was it copied from another machine? That could cause issues just copying XS code from one machine to another (32-bit vs 64-bit, Windows patch level, etc...)

  • Comment on Re: Invalid Access to Memory location using DynaLoader

Replies are listed 'Best First'.
Re^2: Invalid Access to Memory location using DynaLoader
by MattN (Novice) on Dec 08, 2015 at 21:16 UTC

    Thank you for the response. That's a good question. I'm not 100% sure. There is only a .dll file, no .xs file. I think that the .dll is created when I install the program because there is no ifeffit.dll (or .xs) on the github site, though I suppose it could have brought it in from elsewhere.

    I have a working copy of the software on a WinXP and there is also only a .dll. That .dll of course does not work on the Win7 computer, but it does give a different error than the correct .dll.

      The DLL is created during the Perl incantation (perl Makefile.PL, make, make test, make install) for XS modules. I'm guessing this was copied there and certainly from WinXP to Win7 you may experience issues and can't just copy a DLL from one system to the other.

      Assuming this is the GitHub site you reference, you'll find Perl notes here:

      https://github.com/newville/ifeffit/tree/master/wrappers/perl

        That is one of the github sites. There's also https://github.com/bruceravel/demeter which is the program that makes use of ifeffit. The installation that is used comes from http://bruceravel.github.io/demeter/.

        I copied the XP .dll because I wanted to see if the error would change indicating that it is actually calling the correct file (when it's there of course). The error does change:

        Can't load 'C:/demeter/perl/site/lib/auto/Ifeffit/Ifeffit.dll' for module Ifeffit: load_file:%1 is not a valid Win32 application at C:/demeter/perl/lib/DynaLoader.pm line 190. at (eval 18) line 1.

        as would be expected. The ifeffit / demeter software is not to blame because it's only our office that can't get it to work and it does strangely work on our computers in safe mode, but not clean boot mode.

        I can try rebuilding the ifeffit library from the source code though if you think that may help.