[Zlib-devel] Fwd: Error when using zlib 1.2.5 in VS 2005

John Bowler jbowler at frontiernet.net
Fri Aug 6 11:08:11 EDT 2010


It turns out that the problem only arises in ‘debug’ mode.  Setting /OPT:NOREF doesn’t help (but then I don’t imagine it was set anyway in debug).  The ‘release’ build gives the same text segment warning in the build but runs fine.

So… next guess is that it is a /MDd, /MD debug vs non-debug C runtime problem, but the fact that the error code corresponds to application initialization is suspicious.  That error code is also produced by some viruses, I doubt very much that this is the problem in this case (normally a virus infected machine is obvious), but system error code 0xc000007b (123) is actually a fatal (0xc0000000; top two bits IRC) version of ‘syntactically invalid file name’:

http://msdn.microsoft.com/en-us/library/ms681382(v=VS.85).aspx

In other words a syntactically bad string has caused a system error 123 in some initialization code and the code has called, probably, FatalAppExit(“The application failed to initialize properly”)

John Bowler <jbowler at acm.org>

From: zlib-devel-bounces at madler.net [mailto:zlib-devel-bounces at madler.net] On Behalf Of Cosmin Truta
Sent: Thursday, August 05, 2010 3:35 PM
To: zlib-devel at madler.net
Subject: Re: [Zlib-devel] Fwd: Error when using zlib 1.2.5 in VS 2005

On Thu, Aug 5, 2010 at 3:49 PM, Mark Adler <madler at madler.net> wrote:
On Aug 4, 2010, at 11:44 PM, <jbowler at acm.org> <jbowler at acm.org> wrote:
> I would guess, it was recompiled too - i.e. I don't think it's an issue caused by an ABI change.
I verified that, yes, the user recompiled the application.

Could it be that the user is having the issue that we used to argue about, approx. 5 years ago, and that lead to redoing the DLL completely: when we moved from the old ZLIB.DLL to the new ZLIB1.DLL?

If the user is using zlib-1.1.4 and having trouble running the DLL, he or she might or might not be required to add -DZLIB_DLL=1 when compiling the application. It depends on what kind of DLL s/he happens to have in the system. The wrong setting leads to a mysterious crash.

Best regards,
Cosmin





More information about the Zlib-devel mailing list