Dll conflicts

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Dll conflicts

Greg Babcock

I inherited an mingw 3.4.2 analytics application that has been in production for over 10 years that implements algorithms using dynamically linked DLLs.  I created 20 very simple new DLL’s that are essentially copy pastes of each other. 

·        All DLL’s loaded properly with a test application that verifies the interface is correct

·        Fourteen of the new DLLs load and work properly

·        Three DLL’s fail to load all of the time with an “Invalid access to memory location” error

·        Three DLLs fail to load (“Invalid access to memory location”) when a conflicting DLLs is loaded

·        DllMain is just stubbed out, so it should not be causing any problems

 

The problem feels like a DLL is attempting to load at an address that another DLL has already been loaded, but this doesn’t make any sense because windows should handle that situation by relocating the DLL. 

 

I would greatly appreciate any insight to what might be causing this issue, or suggested approaches or tools to use to debug the problem.

 

Thank You,

 

GB

 

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Dll conflicts

MinGW-users mailing list
On 7/31/2017 11:27 PM, Greg Babcock wrote:

> I inherited an mingw 3.4.2 analytics application that has been in
> production for over 10 years that implements algorithms using
> dynamically linked DLLs.  I created 20 very simple new DLL’s that are
> essentially copy pastes of each other.
>
> ·        All DLL’s loaded properly with a test application that verifies
> the interface is correct
>
> ·        Fourteen of the new DLLs load and work properly
>
> ·        Three DLL’s fail to load all of the time with an “Invalid
> access to memory location” error
>
> ·        Three DLLs fail to load (“Invalid access to memory location”)
> when a conflicting DLLs is loaded
>
> ·        DllMain is just stubbed out, so it should not be causing any
> problems
>
>  
>
> The problem feels like a DLL is attempting to load at an address that
> another DLL has already been loaded, but this doesn’t make any sense
> because windows should handle that situation by relocating the DLL.
>
>  

Very possible the problem is as you suspect.

>
> I would greatly appreciate any insight to what might be causing this
> issue, or suggested approaches or tools to use to debug the problem.
>

Look into rebasing your DLL to load into a different memory space.
Sorry other than the Cygwin version (which may be able to be built
without Cygwin, don't know, haven't tried) I don't know of a link to
give you.

--
Earnie

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Loading...