[DLLCC] Could not load library

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[DLLCC] Could not load library

Boris Popov, DeepCove Labs (SNN)
Hey,

We're having a slight problem with one of the external libraries that we
use. It seems that after a while it simply fails to load with an "io error"
998 and yet restarting an image fixes it. MSDN lists 998 as "ERROR_NOACCESS
Invalid access to memory location". The path from which the dll is being
loaded never changes and indeed points to the correct file at the time of
the exception happening. The test case that executes a single call and
unloads the library 100,000 times doesn't fail, so I'm a tad puzzled by
this. Any ideas?

Unhandled Exception:
        class: LibraryNotLoadedError
        creator: LibraryNotLoadedError
        errorString: Could not load library
        parameter: a SystemError(#'io error',998)
------------------------------------------------------------
Initial Context Stack Arguments:
[1] ExternalLibrary>>primLoadLibrary:
[2] ExternalLibrary>>load
[3] ExternalLibraryHolder>>load

Cheers!

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [DLLCC] Could not load library

Ralf Propach
Boris Popov wrote:

> Hey,
>
> We're having a slight problem with one of the external libraries that we
> use. It seems that after a while it simply fails to load with an "io error"
> 998 and yet restarting an image fixes it. MSDN lists 998 as "ERROR_NOACCESS
> Invalid access to memory location". The path from which the dll is being
> loaded never changes and indeed points to the correct file at the time of
> the exception happening. The test case that executes a single call and
> unloads the library 100,000 times doesn't fail, so I'm a tad puzzled by
> this. Any ideas?
>
> Unhandled Exception:
> class: LibraryNotLoadedError
> creator: LibraryNotLoadedError
> errorString: Could not load library
> parameter: a SystemError(#'io error',998)
> ------------------------------------------------------------
> Initial Context Stack Arguments:
> [1] ExternalLibrary>>primLoadLibrary:
> [2] ExternalLibrary>>load
> [3] ExternalLibraryHolder>>load
>
> Cheers!
>
> -Boris
>

The Microsoft Linker has an option /FIXED , which means that a dll linked with
this option can only be loaded at a certain address. If this address is already
occupied by another dll, the load fails, but the documentation does not state
with which error code it will fail.

Can you check if your dll was linked this way?

Ralf Propach
Georg Heeg eK