discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSProcessInfo is not initialized when debugging


From: Richard Frith-Macdonald
Subject: Re: NSProcessInfo is not initialized when debugging
Date: Fri, 21 May 2004 08:22:39 +0100

Ah ... I misunderstood ... I use GNUstep built from source rather than the debian packages.

I don't know how you can get an app linked with both debug and non-debug libraries, but I can see that it could cause problems if one version of NSProcessInfo gets initialised and somehow another version from a different library then gets used (uninitialised).

Is one of the debug libraries (eg the gui library) linked with a non-debug version of the base library? Perhaps when the debian package was built the maintainer did it in the wrong order, so that the debug gui library was linked with the non-debug base library because the debug version of the base library hadn't yet been built/installed?

On 20 May 2004, at 18:43, Martin Kuball wrote:

I should add that the problems only apeared after I installed the
debug versions of the gnustep libs.
OK I tried gdb to see whats happening. I set a breakpoint on the line
with [NSProcessInfo processInfo]. When I step into the message call I
end up in NSProcessInfo _gnu_process_args method. But no line number.
The backtrace looks odd (missing the main function I'm coming from)
and besides that claims that the method is from the non-debug version
of the library. ldding the program reveals that it is indeed linked
against both versions of libgnustep-base, the debug one and the non
debug one. Strange!

Martin


Am Thursday 20 May 2004 15:53 schrieb Richard Frith-Macdonald:
On 20 May 2004, at 09:25, Martin Kuball wrote:
Nobody knows an answer? Or am I simply not in the right group to
ask this question?

Am Tuesday 18 May 2004 22:37 schrieb Martin Kuball:
Hi!

My system is a debian unstable on Linux 2.4.26. When I try to
debug a programm that uses the gnustep-gui lib I get the
following message: ./shared_debug_obj/imgmerger: Uncaught
exception NSInternalInconsistencyException, reason:
        GNUSTEP Internal Error:
        The private GNUstep function to establish the argv and
environment variables was not called.

I tried to initialize the NSProcessInfo by myself using
        [NSProcessInfo initializeWithArguments: argv
                                     count: argc
                               environment: environ];
or
        [NSProcessInfo load];
right at the beginning of the main method. But nothing helped.
Note that the methods got executed because the error comes up
only when I call [NSProcessInfo processInfo] later in the code.

Any workaround known?

I use debian unstable.
Currently I'm on kernel 2.6.4-1, but I had no problem on older
kernels either.
You should not need to do anything special ... initialisation
should be done automatically,
so if you are having this problem, something is very messed up and
you probably need to
reconfigure/rebuild the base library.

Looking at the core/base/config.log might help figure out what
could have gone wrong ...
but if not, your only option is to build the library with
'debug=yes' and run gdb on your
application to step through the code and see what is happening.




_______________________________________________
Discuss-gnustep mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/discuss-gnustep






reply via email to

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