[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GSWeb crash upon startup [Was: Re: Eeeagh! I'm at my wits end.]
From: |
Simon Stapleton |
Subject: |
Re: GSWeb crash upon startup [Was: Re: Eeeagh! I'm at my wits end.] |
Date: |
Tue, 27 Apr 2004 13:28:04 +0200 |
On 27 Apr 2004, at 12:31, Richard Frith-Macdonald wrote:
It occurs to me that for some reason, base has built with garbage
collection, although I neither want nor need it (as the offending
_gnu_arguments and friends are disappearing, never to be seen again,
between +initialize and +processInfo - if gc was not being expected,
they should be being retained).
Does this make sense?
No ... in the first place, garbage collection should not have this
effect.
Well, it would if garbage collection were not working (as it doesn't
under my setup) but the system were configured for gc - RELEASE(),
RETAIN, AUTORELEASE et al would then be defined to be effectively
no-ops - any calls to them which one might expect to do something to
the retain count of an object would (silently) have no effect
whatsoever.
By the way, what's with all the IF_NO_GC(RELEASE(x)) stuff in
NSProcessInfo.m, anyway? The RELEASE/RETAIN etc macros should deal
with GC transparently anyway, no? Seems like a bunch of irrelevancies
to me, although I'm willing to admit I may well be wrong on this ;-)
in the second, you would have to explicitly turn on garbage collection
when you configured .... pretty much impossible to do by accident.
OK. That makes sense. I was wondering if configure might have done
something behind my back, but it seems not.
The values of _gnu_noobjc_argv and _gnu_noobjc_env should be zero
after +initialize is called, while _gnu_processName, _gnu_arguments
and _gnu_environment should be non-nil.
Yep, that's what I'm seeing (at least at the end of +initialize). It
seems that they are being released later, although why, I can't say.
I _can_ say it's not me (explicitly) doing it, though. They might be
being trampled, but I can't see any reason why that should happen,
either.
I suggest you run under gdb (version 6 or later) and examine
_gnu_processName, _gnu_arguments, and _gnu_environment at the end of
+initialize and after stepping through each instruction until
+processInfo.
That way you can find where these variables are being cleared.
Currently running with a watch on _gnu_environment to see what's going
on, but of course that takes an age on my (prehistoric) machine.
Still, I'll leave it chundering away, it seems like a reasonable course
of action.
If you can't run under gdb, add a function to NSProcessInfo.m to print
them out along with a label, and call that function after each line of
your code.
I suppose that might work, but I might be better off hooking into the
Objc runtime to do that. I have a _LOT_ of code... And for some
reason, other apps are working fine - the 'Hello' example that comes
with gsweb, for example. So it's got to be something to so with my
code, or its organisation, or a relatively obscure bug that doesn't get
exercised by that code.
more later. thanks for the indulgence.
Simon
--
PGP Key Id : 0x50D0698D
--
Eagles may soar, but weasels don't get sucked into jet engines.
- Eeeagh! I'm at my wits end., Simon Stapleton, 2004/04/26
- RE: Eeeagh! I'm at my wits end., Adam Fedor, 2004/04/26
- Re: Eeeagh! I'm at my wits end., Simon Stapleton, 2004/04/27
- Re: Eeeagh! I'm at my wits end., Simon Stapleton, 2004/04/27
- Message not available
- Re: GSWeb crash upon startup [Was: Re: Eeeagh! I'm at my wits end.],
Simon Stapleton <=
- Message not available
- Re: GSWeb crash upon startup [Was: Re: Eeeagh! I'm at my wits end.], Simon Stapleton, 2004/04/27
- Message not available
- Re: GSWeb crash upon startup [Was: Re: Eeeagh! I'm at my wits end.], Simon Stapleton, 2004/04/28
- Re: GSWeb crash upon startup [Was: Re: Eeeagh! I'm at my wits end.], Simon Stapleton, 2004/04/28
- Re: GSWeb crash upon startup [Was: Re: Eeeagh! I'm at my wits end.], David Ayers, 2004/04/28
- Re: GSWeb crash upon startup [Was: Re: Eeeagh! I'm at my wits end.], Simon Stapleton, 2004/04/28