discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Odd build behavior?


From: Richard Frith-Macdonald
Subject: Re: Odd build behavior?
Date: Fri, 24 May 2002 17:31:54 +0100

On Friday, May 24, 2002, at 12:01 PM, e.sammer wrote:

All:

I am getting NSRangeExceptions when making a call to [NSUnarchiver unarchiveObjectWithData:] as it tries to read the typestream. With some help from some folks on #gnustep, we tried to track it down to no avail.

Here's what's strange... What _does_ fix the problem is compiling with debug=yes. Any other build "styles" (i.e. debug=no, warn=blah, etc.) yeild a nonfunctional binary with the above problem. Of course, I can't say for sure if this is a GS thing (I don't think it is) but if anyone else sees this behavior in GS, please let me know as I do need to build non-debugging versions of my work at some point.

One of the things that may be a contributing factor (this is shotgun debugging) is that I compiled gcc 3.1 but did not update glibc anytime recently which just feels wrong. Either way, it's really really odd and if anyone has an idea about what it could be... etc, etc...

You might try rebuilding with debug=no, but with -g explicitly set in the flags to build the library. If the problem still occurs you could then use gdb to track down its location. You could add an abort() to [NSException-raise:format:] and debug the core dump even if you haven't
built with -g, but that would be painful.

You could also try building with/without optimisation.

This could be an obscure bug with an improperly initialised variable ... that's the most common problem I find with code which works when built for debug, and not otherwise.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]