Re: [Mingw-users] DLL/.NET invalid access to memory location
- Date: Wed, 09 Apr 2008 16:34:48 +0200
- From: dnorrell@xxxxxxx
- Subject: Re: [Mingw-users] DLL/.NET invalid access to memory location
DaveK and others - many thanks for the help on this. After reading your pointers I tracked down the problem to the fact that I was using dllwrap in my build scripts, which apparently is broken in that it inserts duplicate relocs, so whenever a DLL is rebased it seems to fail with this exception. I've switched to building with 'gcc -shared' and it all works great!
It seems to be the same as this problem:
http://readlist.com/lists/lists.sourceforge.net/mingw-users/0/4750.html
Cheers, David
> Roumen Petrov wrote on :
>
> > dnorrell@gmx wrote:
> >>
> >> Unable to load DLL 'mydll.dll': Invalid access to memory
> > location. (Exception from HRESULT: 0x800703E6)
> >>
> >> Now, this behaviour seems to be random, it can work fine
> > but switch to a different machine, or even a different app on
> > the same machine, and I started getting the error again. It
> > seems to occur when the DLL is being loaded initially when
> > the app is starting and before anything in the DLL even gets
> > called. I've checked permissions, dependencies and nothing
> > seems to consistently fix the problem.
> >>
> >> Has anyone had similar problems or know what might be going wrong here?
> >>
> >> Thanks, David
> >>
> >
> > May be one dependent shared library(dll) export some variables.
>
> Ooooh, that gives me a (half-remembered) idea: maybe it happens when the
> memory space of the process is crowded enough that the dll has to be
> loaded at
> a different address than usual, meaning it has to be rebased, and there
> are
> some relocs pointing at a read-only section of the DLL, meaning an access
> violation when the dll loader tries to adjust them?
>
> cheers,
> DaveK
> --
> Can't think of a witty .sigline today....
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Register now and save $200. Hurry, offer ends at 11:59 p.m.,
> Monday, April 7! Use priority code J8TLD2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> MinGW-users mailing list
> MinGW-users@xxxxxxxxxxxxxxxxxxxxx
>
> You may change your MinGW Account Options or unsubscribe at:
> https://lists.sourceforge.net/lists/listinfo/mingw-users
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users