This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Cygwin 1.1 Acces Violation in NTDLL.DLL


Hi.

Please send "TEXT" to the list.
I extracted the HTTP flotsam for ya this time ...

I'm not sure if this your problem but I have noticed that on
some machines that either the cygwin1.dll, my dll or both will
either not load or cause corruptions in other supporting dlls,
most notably ntdll, if certain types of other products are loaded
on the system.  The most notorious are: video utilities, desktop
expansion utilities or any other odd item that lives in the systray.

This problem seems to be worsened on faster and/or multi CPU boxes.

Unfortunately, I think that cygwin generated dlls are still less than
100% compatible w/ the windoze dynamic memory mapping scheme :(

Of course, I can only speak to b20.x, which I still heavily use.
Hopefully v1.1.x behaves much more politely w/M$ dlls et. al.

I've always got to wait till I've got about a week clear before
I dare attempt to upgrade !!!  I invariably get bit somewhere.

Oh, one other thing, that dll included on the green CD will NOT dynamically
load (via LoadLibrary) from non-cygwin apps.  That's probably your 1.1.0 trouble.
AFAIK Mumit Khan fixed that and so I guess its fixed in the newer net releases. 
That's the one that screwed me most recently (MK was a HUGE help) - but w/ all the 
time lost I still had to scurry back to b20.1 and pull a couple long nights  
to keep
my work on schedule !!!

Try emptying out your systray + make sure you don't have any ant-virus stuff going.
Although, I haven't personally had trouble with the latter, I've heard others have.

Let me know how it goes.

bisk


Begin forwarded message:

Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sourceware.cygnus.com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin@sourceware.cygnus.com>
List-Help: <mailto:cygwin-help@sourceware.cygnus.com>,  
<http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner@sourceware.cygnus.com
Delivered-To: mailing list cygwin@sourceware.cygnus.com
From: "Robert Rose" <rrose@mass.co.uk>
To: <cygwin@sourceware.cygnus.com>
Subject: Cygwin 1.1 Acces Violation in NTDLL.DLL
Date: Fri, 2 Jun 2000 13:04:04 +0100
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600

Hello anybody who can help,

CygwinDLL version 1.1 and version B20.1

Further to my email on 26-May-00 I have tried a different approach.
However, I seem to get similar results.

My main problem is trying to link Visual C++ compatible C libraries
developed by National Instruments with a GNU compiled dll which uses
the Cygwin Win API dll (version B20.1).

I tried the 'How do I link against .lib files' appraoch but that did not
work because I could not extract all the objects out of all the libraries.
One of the libraries seem to have several references to a single dll.
I can only seem to extract the first reference.

Having satisfied myself that GNU would understand the NI .lib files if I
 simply by renaming them. I tried this approach. It linked, however, when
I tried to execute the program, it fell over before the first line of code
with a STATUS_ACCESS_VIOLATION.

Beacause the NI libraries are extensive I tried a different approach.
This was to explicitly link to the GNU dll in a Visual C++ developed executable.
This was possible because the dll had a C++ class interface.
I cannot explicitly link to it without some knowledge of the class, in order to
type cast the class methods into method pointers.

My next approach was to provide a further GNU developed wrapper dll which had a
pure C style interface to the other dll. I could then expilicitly link to  
this in my
Visual C++ executable.

This works fine until I actually try to invoke a function pointer retunred by
GetProcAddress. It complains about an ACCESS VIOLATION to the NTDLL.DLL.
This dll is called by the Cygwin1.dll which is being called by my wrapper dll.

I have written a simple program in GNU which links to my wrapper dll implicitly.
This hangs when trying to invoke the first function in the dll.

I have also written a simple program which includes the dll object in its build.
It also hangs when trying to access the first function call in the dll object.

I guess these are hanging for the same reason.

I have provided the strace output for each.
The dll test program strace output is named dll_strace.txt and the non dll
version is called main_strace.txt.

I have also provided the cygcheck output for each. Similarly named.

I linked all these programs with Cygwin 1.1.0, which appears to use a later
version of the Cygwin1.dll to the dll I am providing a C wrapper for.

I would prefer to be able to explicitly link the GNU wrapper dll to a Visual C++
program. This appears to me to be the simplest solution, if only I could find it.

Could there be a bug with the new Cygwin1.dll and its interaction with the  
NTDLL.DLL.
Would it be best to compile all the dll's and the executable with the same version
of the Cygwin1.dll.

I am going to download B20.1 full.exe and I will get back to you.

If anyone can help then I would be very grateful.

Cheers,

Robert Rose.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]